Skip to content

A drawn thread opens its tab at once; its birth was already on the row - #1559

Merged
trissim merged 3 commits into
mainfrom
instant-thread-tab
Nov 6, 2026
Merged

trissim merged 3 commits into
mainfrom
instant-thread-tab

Conversation

@trissim

@trissim trissim commented Nov 6, 2026

Copy link
Copy Markdown

1 commit, 17 files, +70/-41. Clicking a thread in the sidebar now shows its tab right away. Before, the click waited on a Core round trip before the tab could even be keyed.

The wait

ThreadNavigator.open took a thread name and awaited observed.registry_for(name).require(name).incarnation to build the tab's MailboxTab identity. Against a remote Core, the TLS handshake alone measured 170–260 ms per call (RemoteCoreAccess.post opens a fresh connection per call, a separate defect). The incarnation it went to fetch was already on the clicked row's ThreadRowModel.incarnation. ThreadOpening.run already mounts its loading view before it reads, so all the waiting happened before the opening existed.

That's IDEN-3: a bare name standing in for an identity the caller already held, paid for in a round trip.

The change

  • The target answers its own birth. ThreadTarget.incarnation_in(preparation, observed) asks Core, for a name from text or a command. KnownThreadTarget(name, incarnation) already knows it. ThreadStatusRow.show holds a KnownThreadTarget built from the row model it draws.
  • ThreadNavigator.open takes the target. open_named(name) is the one place a bare name becomes a ThreadTarget, for a command's result (thread_actions) and a session label. thread_actions sits below navigation_target in the import graph, and importing it there closed a cycle.
  • If the row's birth is stale, the opening's own read refuses behind the loading view, and the tab shows the refusal instead of the UI waiting.
  • comms_sidebar's two imports from navigation_target are now one.

Also fixed: my breakage from #1555

#1555 deleted LineLink.click and left seven test files comparing style meta with it: test_existing_thread_link, test_block_menu_and_copy, test_wire_message_lines, test_hovered_name_link, test_scroll_down_bounce, test_channel_mentions and test_markdown_file_links. They now compare with OpenLineLink(link). I grepped src for the deleted name and not tests, and the PR's CI runs only the NRA guards.

Proof

  • Thread relationship, route reads, sidebar state, existing thread link, remote core, thread-action dispatch and session-entry tests pass. The native slow-load and journey tests need a native package and skip locally.
  • The repaired link tests: 13 passed. test_channel_mentions now fails on HistoryViews.channel_history() missing … 'worktree' inside agent-comms, an API mismatch unrelated to this change.

🤖 Generated with Claude Code

ThreadNavigator.open took a thread name and, before the tab could even be keyed, awaited
observed.registry_for(name).require(name).incarnation: a Core round trip (170-260 ms of TLS
handshake alone to a remote Core, measured) just to recover the incarnation the clicked sidebar
row's ThreadRowModel already held. ThreadOpening already mounts its loading view before it
reads; the wait was all before it existed.

- The target answers its own birth: ThreadTarget.incarnation_in asks Core (a name from text or
  a command), KnownThreadTarget(name, incarnation) already knows it. ThreadStatusRow.show holds
  a KnownThreadTarget from the row model it draws.
- open() takes the target; open_named(name) is the one place a bare name becomes a ThreadTarget,
  for a command result and a session label (thread_actions sits below navigation_target).
- comms_sidebar's two imports from navigation_target are one.

Also: toad#1555 deleted LineLink.click and left seven test files comparing meta with it; they
now compare with OpenLineLink(link).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 06:42

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. Try requesting a review at a lower effort level.

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 and others added 2 commits November 6, 2026 01:45
…rves them now

It called channel_history with a bare string and no worktree, counted an InboxPage with len(),
and expected a mention to be OpenTarget("alpha") where main draws it as a reference to alpha's
exact incarnation on the wire. It reads through ChannelTarget.display_history and the page's
messages, and expects that reference. ui.link_at returns the StyleAction a click runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uple

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim merged commit a260e3e into main Nov 6, 2026
2 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