Repository navigation
Scope Markdown reader offsets by panel identity - #5616
Merged
Merged
Conversation
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.
🚨 SLOP COP 🚨 ·
new-issue-autopilotHuman comments
What was wrong
Markdown reader offsets live in one panel instance even though the panel's tab list changes between threads. A different thread's tabs prune the previous thread's positions; remounting discards the map, while equal tab IDs can leak positions across threads.
Reproduction and root-cause report: https://get-bb.github.io/reports/issues/5615.html
What changed
Keep the in-session offset maps keyed by the existing panel-state identity. Preserve per-instance behavior for unscoped panels and keep closed-tab pruning within the current scope.
Extend the existing real-panel regression harness for disjoint tab lists, shared tab IDs, remounting, and scoped close/reopen behavior. Two secondary-panel files change; no new dependency, generated file, stored-data change, public API, or daemon protocol change.
Changed-line count against trusted
origin/main: 83 text lines (69 additions + 14 deletions), 2 files.How you verified
01affc197dc621cddc7343e09b1c5c10a5b9efcb. The same agent repeats those failures in a second clean checkout at that exact commit.pnpm exec turbo run test --filter=@bb/app -- src/components/secondary-panel/ThreadSecondaryPanel.markdown-scroll.test.tsx src/components/secondary-panel/ThreadSecondaryPanel.collapseControl.test.tsx src/components/secondary-panel/FilePreview.test.tsx src/components/secondary-panel/ThreadSecondaryPanelTabContent.markdown-images.test.tsxpasses 72/72 across four files.pnpm exec turbo run typecheck lint --filter=@bb/apppasses; lint reports 250 existing warnings and 0 errors, with none in the changed panel file.git diff --checkand the secret-model scan pass. No binary changes.Fixes #5615