Skip to content

Fix file preview line scrolling - #1611

Merged
ymichael merged 2 commits into
mainfrom
bb/fix-file-preview-line-scrolling-thr_w5nq35gffx
Aug 14, 2026
Merged

Fix file preview line scrolling#1611
ymichael merged 2 commits into
mainfrom
bb/fix-file-preview-line-scrolling-thr_w5nq35gffx

Conversation

@ymichael

@ymichael ymichael commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • find Pierre source lines inside the renderer's open shadow root
  • rerun target-line scrolling when the worker-backed code view mounts or swaps to highlighted output
  • center the target through the panel's vertical scroll offset without touching Pierre's horizontal code scroller
  • scope target lookup and cleanup to the active file preview
  • add regression coverage for delayed worker readiness, shadow-root line markup, and horizontal-scroll preservation

Testing

  • pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/secondary-panel/FilePreview.test.tsx (14/14)
  • pnpm exec turbo run typecheck --filter=@bb/app
  • pnpm exec turbo run lint --filter=@bb/app (passes with existing warnings)
  • SawyerHood/dev-browser against the real dev app: clicked an assistant file://.../FilePreview.tsx#L1100 link with Pierre's inner code scroller preset to scrollLeft=240; confirmed line 1100 was selected and fully visible after vertical scrolling to scrollTop=19417, while horizontal scroll remained exactly 240

AGENT GENERATED: by GPT-5.6 Codex

@ymichael
ymichael merged commit bc4b05b into main Aug 14, 2026
16 of 18 checks passed
@ymichael
ymichael deleted the bb/fix-file-preview-line-scrolling-thr_w5nq35gffx branch August 14, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant