towerops/lib/towerops_web/live/agent_live
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
..
edit.ex Allow superadmins to view and edit any agent regardless of org 2026-02-10 12:19:20 -06:00
edit.html.heex enable agent debugging 2026-01-27 13:25:04 -06:00
helpers.ex remove date helper 2026-02-10 09:15:41 -06:00
index.ex fix: sync AgentLive.Index modal state to URL for browser navigation 2026-02-12 09:28:39 -06:00
index.html.heex add row_link to table component for proper anchor tags 2026-02-11 08:46:03 -06:00
show.ex Add agent restart and self-update commands 2026-02-10 13:06:10 -06:00
show.html.heex Add agent restart and self-update commands 2026-02-10 13:06:10 -06:00