Update AgentLive.Index to properly handle browser back/forward buttons by syncing the setup token modal to URL parameters. Changes: - Update handle_params/3 to read modal param and set modal state - Update show_setup handler to use push_patch with ?modal=setup - Update close_token_modal handler to use push_patch (remove modal param) - Update handle_agent_creation_success to use push_patch after creating agent Behavior: - Browser back button now closes the setup modal without navigating away - URL reflects current modal state (?modal=setup) - Bookmarkable URLs restore exact modal state (can share agent setup URL) - After creating agent, modal opens via URL state Follows idiomatic Phoenix LiveView pattern using push_patch/2 and handle_params/3 as documented in CLAUDE.md. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| channels | ||
| components | ||
| controllers | ||
| helpers | ||
| live | ||
| plugs | ||
| endpoint.ex | ||
| gettext.ex | ||
| gettext_helpers.ex | ||
| permissions.ex | ||
| plug_exceptions.ex | ||
| router.ex | ||
| telemetry.ex | ||
| user_auth.ex | ||