Skip to content

Centralize live route confirmation on CoordinationAccess - #1168

Merged
trissim merged 1 commit into
mainfrom
fix/route-confirmation
Oct 23, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/route-confirmation

Conversation

@trissim

@trissim trissim commented Oct 23, 2026

Copy link
Copy Markdown

Confirming that a selected route is still live was implemented three times, and member reconnect silently returned when it saw a stale route. CoordinationAccess.confirm now owns that comparison and its RouteChangedError.

  • require calls confirm before service lookup.
  • open_selected keeps its separate service-root check, then calls confirm while hold_client_route is held.
  • NativeSessionEntry.reconnect calls the owner's confirm first. Its separate replaced-entry check remains; a stale route now raises rather than returning silently.

Existing visible error path, read before editing:

  1. session_entry.py:157 raises from confirm; session_navigation.py:187 awaits member.reconnect.
  2. thread_actions.py:104 awaits SessionNavigation.reconnect from ThreadAction.completed.
  3. thread_actions.py:77 awaits completed inside ThreadActionExecution.run. Its finally at :78-80 clears the pending action without swallowing the error.
  4. thread_actions.py:64 creates the Textual worker via app.run_worker. Installed Textual dom.py:786 defaults exit_on_error=True; worker.py:431 forwards WorkerFailed to app._handle_exception, preserving the original cause.
  5. ToadApp._handle_exception at app.py:281-286 calls show_error for a mounted screen; textual_colours.py:474-477 emits the visible error notification. No catch was added.

Step 5 at a825ba7:

src/toad/comms_root.py:365:        if RouteSelection.capture() != selected:

That line is inside confirm. Both changed Python files parse. No tests run, as directed.

Assumed: these interactive thread actions run with a mounted screen, as required by the existing visible-error handler. The installed Textual worker path was read from core-a02979325.

@trissim
trissim marked this pull request as ready for review October 23, 2026 21:33
Copilot AI balanced review requested due to automatic review settings October 23, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 96ab9fe into main Oct 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants