Repository navigation
Retain Markdown reading offsets for open panel tabs - #5185
Merged
Merged
Conversation
3 tasks done
This was referenced Oct 10, 2026
brsbl
added a commit
that referenced
this pull request
Oct 18, 2026
## Human comments ## What was wrong Markdown used a content-height layout that required a scrolling parent. Plugin file openers render the built-in preview inside a full-height, overflow-hidden region, leaving long documents without a scroll container. #5185's offset tracking did not change these layout classes. ## What changed - Markdown previews now own a bounded scroll container inside the secondary panel. - The existing per-tab offset tracking saves and restores that container. - A regression covers full-height opener hosts and returning from a shorter document. ## How you verified - Remote regression proof: test-only [CI run](https://github.com/get-bb/bb/actions/runs/38068969721) fails with `Missing file scroll container`. - Chrome 155.0.0.0: hard reload, wheel scroll to 800px, short-document switch, and return restore exactly 800px. - Final [remote CI](https://github.com/get-bb/bb/actions/runs/38069347516) passes: all six Markdown scroll tests, app tests, lint, and typecheck. - Focused review at 561d36a found no P0–P2 issues; the final follow-up only formats the test harness. Before: e9ad6b0 · After: 54ee42f · Captured at 2×. Both captures use the same fixture, Preview tab, and 800px wheel input; before remains at zero. | Screen / state | Viewport | Before | After | | --- | --- | --- | --- | | Thread Markdown Preview after wheel input | Desktop · 1280×577 |  |  | | Thread Markdown Preview after wheel input | Compact web · 390×844 |  |  | User QA approval is pending. <details> <summary>Preview ownership and fixture</summary> [Branch dev app](http://localhost:15456/projects/proj_7p5tk5zht6/threads/thr_78gf3vvetj) remains running in terminal `term_pbpi7vf66x` on host `host_57pj4zhqxr`, environment `env_unhfrbci6j`, from this PR worktree via `pnpm dev`. App port 15456, server port 23456, daemon port 31456. Fresh dev data; synthetic long and short documents; a minimal file opener delegates to `Original`. This reproduces the same full-height opener path without needing a production plugin or personal data. </details> Fixes #5336 BB-Thread-ID: thr_frq37qj86d > AGENT GENERATED
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