towerops/lib/towerops_web
Graham McIntire e68ebdb62d
fix: sync AgentLive.Index modal state to URL for browser navigation
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>
2026-02-12 09:28:39 -06:00
..
channels test: expand agent channel coverage from 8% to 66% 2026-02-11 16:52:12 -06:00
components add IP allowlist link to superadmin nav, rename whitelist/blacklist to allowlist/denylist 2026-02-11 11:40:44 -06:00
controllers Add CI-triggered mass agent update webhook 2026-02-10 13:40:32 -06:00
helpers more tests and fixes 2026-02-07 11:50:18 -06:00
live fix: sync AgentLive.Index modal state to URL for browser navigation 2026-02-12 09:28:39 -06:00
plugs Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
endpoint.ex Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
gettext_helpers.ex feat: migrate email templates to gettext (Phase 2 - Emails) 2026-02-02 09:48:30 -06:00
permissions.ex Replace conditionals with functional pattern matching 2026-02-10 17:11:37 -06:00
plug_exceptions.ex handle exceptions gracefully on api endpoints 2026-02-04 12:18:14 -06:00
router.ex Add 404-based brute force protection system 2026-02-10 16:31:48 -06:00
telemetry.ex fix: add Oban config to dev.exs and replace Exq telemetry with Oban 2026-01-24 16:39:45 -06:00
user_auth.ex test fixes 2026-02-09 15:30:52 -06:00