Repository navigation
Conversation
There was a problem hiding this comment.
ℹ️ Minor suggestions only.
Reviewed changes
- Disable scroll anchoring on the rich Markdown scroller — adds
[overflow-anchor:none]to thescrollContainerRefelement so Chromium stops re-anchoring the already-restoredscrollTopwhen an image above the viewport finishes layout. - Regression E2E spec — new
markdown-tab-scroll-restore.spec.tsseeds a 100-section document with a 400×1500 SVG, forces the image to 1px across a tab round trip, then asserts the restored offset (4000) and the Section 45 heading position both survive the image regaining its height. Verified to fail pre-fix (observed 5484 vs expected 4000), so it is a genuine guard, and it asserts on DOM geometry rather than store state.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe editor scroll container now disables browser scroll anchoring. The end-to-end test defers fixture cleanup until after Electron shuts down. The final heading position assertion now uses Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The scroll-restoration change and its regression test updates do not show an unresolved issue that should block merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 240efc2a-6877-47d2-a6d1-654e5e38fdbf
📒 Files selected for processing (2)
src/renderer/src/components/editor/RichMarkdownEditorSurface.tsxtests/e2e/markdown-tab-scroll-restore.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta since the prior pullfrog review (4eead71 → 89a72f0), a test-only hardening commit that addresses the earlier nitpick.
- Cleanup moved to
registerPostElectronShutdownCleanup— replaces thetry/finallyteardown so fixture removal runs after Electron shuts down, matching the repo convention (Windows keeps worktrees locked until Electron and its daemons exit) and no longer risking teardown noise masking a real assertion failure. - Heading-position assertion relaxed —
toBe(originalTop)becomestoBeCloseTo(originalTop, 1), absorbing subpixel re-layout after the image regains height while the restored offset is still pinned exactly at4000, so the spec remains a genuine pre-fix regression guard.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Returning to a Markdown tab containing an image could jump to a different section. Keep the saved reading position when the image finishes laying out.
What Changed
Disable Chromium scroll anchoring on the rich-editor scroll container. Add an Electron regression test that delays image height until after tab restoration and checks both the saved offset and heading position.
Why
Orca already restores the scroll offset. Chromium then independently adjusts it when an image above the viewport gains height, overriding that restoration.
Linked Issue
STA-7618
Visual Proof
Native Windows reproduction on
awin(Windows 11 build 26200, Orca1.4.204-adhoc.20260916003841). Both runs start at 4,000 px / Section 31 and switch to another file tab and back. Windows validated the identical CSS declaration applied to the installed renderer; the patched source was built and tested on macOS.Full evidence and platform limits.
Testing
markdown-tab-scroll-restore.spec.ts. Before the fix: expected 4,000, received 5,484. Rebuilt patched app: 1 passed.tsc --noEmit -p config/tsconfig.tc.web.json), changed-file quality gate, formatting, andelectron-vite build --mode e2epassed.The exact reported Windows 10 / 1.4.200 binary and original document were unavailable. Linux and SSH-hosted documents were not executed; this changes renderer CSS only, with no host, filesystem, IPC, or path changes.
Review