Repository navigation
fix: scroll to headings in Inbox Markdown attachments - #2316
Merged
backnotprop merged 1 commit intoOct 29, 2026
Merged
Conversation
Provide the attachment scroll viewport to the Markdown Viewer. Resolve anchors within the current Viewer so duplicate heading IDs in the thread cannot prevent navigation. Add browser coverage for attachment layouts and anchor edge cases. Closes backnotprop#2229
1 task
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.
Summary
Heading links in Inbox Markdown attachments were intercepted without scrolling because the attachment Viewer had no scroll viewport.
Pass the attachment’s scroll container through the existing
ScrollViewportProvider. Scope anchor lookup to the current Viewer so a matching heading in the thread cannot shadow the attachment’s target.Add browser coverage for side-by-side, full-screen, and phone-sized layouts, including duplicate headings, encoded Unicode anchors, missing targets, and preserving the Inbox route. Update the attachment guide.
Closes #2229
Verification
Reproduced both the original failure and the duplicate-heading case before fixing them.
bun run typecheckpassed.bunx playwright test -c tests/e2e/playwright.config.ts inbox-markdown-anchors.spec.ts inbox-attachments.spec.ts annotate-bundle-back-scroll.spec.tspassed all 20 tests.bun run --cwd packages/ui smoke:packagepassed.git diff --checkpassed.Validation was scoped to the affected behavior and shared UI dependencies.