Repository navigation
fix(web): every thread and agent hover comes from the preview registry - #394
Merged
Merged
Conversation
Thread chips showed a sparse hover while the sidebar, an agent's "Read thread" row and the thread details list each drew their own, richer one. Agent rows in the conversation, Lineage and workflow members used a compact tooltip while `@agent` chips showed the Agents panel card. The registry only governed context chips, so nothing stopped surfaces from rendering their own previews. The registry's `thread` preview is now the single thread hover: the sidebar's metadata plus the thread's latest messages, loaded while open. Sidebar rows, the read-thread tool card (showing what the agent read), and related-thread rows use it. Every agent hover uses the registry's Agents panel card, which gains the catalog model name, effort and speed, and branch or worktree lines from the old tooltip. ContextPreviewHover takes a placement and a disabled flag so rows can use it, and a new `t3code/no-unregistered-context-preview` lint rule keeps preview bodies reachable only through the registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adampeterhiggins
added a commit
that referenced
this pull request
Oct 20, 2026
* test(web): fix agents relationship browser tests The upstream sync merge (2523410) took upstream's useThreadProjection mock, dropping the fork's guard that leaves child agent threads unloaded, so the fork's SubagentActivityLine read a parent projection with no turnItems. Restore the guard alongside upstream's per-ref projections map, give the new supervisor test's shell the createdAt every real shell has, and pick the agent card tooltip rather than the fork's header tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(web): agent preview tests read the card every agent hover now shows #394 made Lineage rows and workflow members preview agents with the Agents panel card, so this file's tests now render that card inline. Its fixtures lacked fields every real record and shell has (a prompt, createdAt, the shell's provider and model selection), the projection mock handed workflow members' threads the parent's projection, and several assertions still read the old tooltip's format. The fixtures gain those fields, only the viewed thread counts as loaded, the owner's shell and project resolve from the fixtures, and assertions follow the card: its status label, account before model, and a clamped rather than cut long result. A blank reported model now falls back to the thread's model as a missing one already did, and the card's identity line reads with spaces around its separators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The same thread showed different hover previews depending on where you hovered it. A thread chip in a user message showed a sparse card (title, project, model, branch), while an agent's "Read thread" row showed status and recent messages, and sidebar rows showed a third, richer card. Agents had the same split: conversation rows, Lineage and workflow members used a compact tooltip, while
@agentchips showed the Agents panel card.The context presentation registry from #369 only governed context chips. Sidebar rows, tool cards and relationship rows drew their own hovers, and nothing stopped them.
Fix
threadbody (ThreadHoverCard.tsx) now has the sidebar's metadata (project, environment, branch and checkout mismatch, provider/model, handoff, started-by, terminals, errors, PRs) plus the thread's latest messages, which load only while the preview is open. v2 shells never carry a message (latestVisibleMessageis always null), so the old chip preview's message line was dead.SubagentTooltipContentis deleted. Its catalog model name, effort, speed icon and branch/worktree lines moved into the card (SubagentModelLabel.tsx). Workflow members without a thread yet still preview, viaagentFleetEntryFromRuntime.ContextPreviewHovertakes aplacementanddisabled.t3code/no-unregistered-context-previewlint rule (with tests) stops anything outside the registry from importing preview bodies.state/providerEntries.tsso the preview can share it.Verification
latestThreadPreviewItems.contextPresentationRegistry,ThreadRelationshipsControl.logic,V2LifecycleRow.logic,agentFleet,toolPreviewWorkflowOpeningBlock,ThreadDetailsPrRowsThreadRelationshipsControl.agents.browser.test.tsxstill has the same 13 failures it has onmain(child.turnItemsundefined inSubagentActivityLine). I confirmed this on an unmodified checkout, and a separate fix is in progress. This PR only updates that file's mocks so preview cards render inline.Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code