Repository navigation
Retain Markdown reading offsets for open panel tabs - #5185
Merged
Merged
Conversation
3 tasks done
This was referenced Oct 10, 2026
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
The secondary panel renders only the active file surface. Activating a browser surface removes the file's scroll container, and returning recreates it at offset zero. Switching to a shorter document can also clamp the shared wrapper. No scroll state outlives the ready Markdown body, even though its tab remains open. See the verified reproduction report.
What changed
The patch stays in the existing secondary-panel subsystem: 4 files, 284 additions + 6 deletions = 290 changed text lines. No dependency, stored-data, public API, CLI, protocol, or schema change is required.
How you verified
expected +0 to be 780; the close/reopen control passes. Repeated in a second clean checkout, then refreshed onto178fd3c2c4aeef162dea517d850ead11f3b034dfand reproduced again.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.tsxpnpm exec turbo run typecheck lint --filter=@bb/apppasses; lint retains existing warnings.git diff --checkpasses; the fix has no binary changes.The browser harness uses real source components with deterministic file retrieval and a local browser-surface activation callback. Installed desktop and Safari verification are not claimed.
Fixes #5181