Repository navigation
Show the thread context banner when the card does not fit - #6875
Merged
ymichael merged 1 commit intoNov 2, 2026
Merged
Conversation
A pane with the thread context card turned on reported its context kind as "card" even when it was too narrow to draw the card, so plugins hid their banner segments and that context only appeared in the header popover. The kind is now "card" only while the measured layout fits the card beside the transcript; narrower panes show the banner and keep the header popover. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/show-context-banner-on-narrow-cards-thr_82etaevp8i
branch
November 2, 2026 23:49
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.
Human comments
What was wrong
With the
threadContextCardexperiment on,useThreadContextKind()returnedcardfor every thread page, whatever its width. In a pane narrower than 1072px (760px transcript + 312px card) the card isn't drawn, but plugins still sawcardand hid their banner segments: the parent thread, git changes and pull request. Narrow windows and split panes only showed that context in the header popover.What changed
apps/app/src/components/plugin/PluginThreadContextCard.tsxuseThreadContextKind()now returnscardonly while the measured layout isgutterorshift, so the card fits beside the transcript.banner, so the context row above the composer shows those segments.overlaytobannerto match.experimental_useThreadContextKindkeeps its values; it just returnsbannerin more cases. The plugin-authoring reference,docs/api_to_audit.mdanddocs/configuration.mdnow describe the width rule.How you verified
PluginThreadContextCard.test.tsx:bannerbelow 1072px.useThreadContextKindcases measure the pane: 1600px →card, 900px →banner. Before the fix the 900px case returnedcard.ThreadPromptContextBanner.segments.test.tsxrenders a measured wide card so itscard-mode assertions still hold.pnpm exec turbo run typecheck --filter=@bb/apppasses, and both test files pass (24 tests).pnpm start:worktreeserver with a child thread that has uncommitted changes:🤖 Generated with Claude Code