Repository navigation
Open a comment card under its marker with Resolve in view - #543
Merged
Merged
Conversation
A clicked comment card that cannot sit in the right gutter now opens below (or above) its passage right-aligned to the prose column, beneath the marker that raised it, instead of at the passage's left edge across the page. Resolve stays visible whenever a card is open; the More actions menu keeps its hover and focus reveal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Review: Looks good I checked this in a real browser on a fake-GitHub server, with a heading thread of 8 replies, a table-cell thread and a thread on a low paragraph. Verified
Notes (non-blocking)
The code is minimal, uses tokens and follows conventions. The geometry unit tests and the e2e assertion (card right edge within 2px, Resolve opacity 1) cover the change. CI: all green (format/lint/types/tests, e2e, container, CLI, CLI Windows). |
A draft has no marker to open under, so commentCardPoint takes an align option and the draft composer keeps to the selection's left edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unfolding a long thread grew the card past the document because its height was measured only when placed. The card now observes its content, is re-placed for the new height, and caps to the room it has so it scrolls within itself with the reply box reachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reviewed dynamic owners in comment-layer.tsx keep the same data flow: PreviewSurface and CommentSurface still take style and className from their placed values and presence lifecycle, and hit rectangles are unchanged. CommentSurface only adds a ref and a ResizeObserver that re-run the surface's own onMeasure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Resolving a comment was laborious: clicking a margin marker opened the card at the passage's left edge, across the page from the marker, and its Resolve check only appeared after pointing at the card.
…) keeps its hover/focus reveal (still always shown on touch).commentCardPointtakesalign: "passage"and the composer keeps to the selection's left edge (inside the column), as before.The hover preview already sits beside the marker, flush with the column edge, so preview and clicked card now open on the same side.
Before / after (1440, chat open)
Several threads in one paragraph, table cell, near the bottom (flips above), phone
Draft composer by a left-side selection; unfolded long thread scrolls inside the viewport
Tests
comment-geometry.test.ts: below/above cards right-align to the column wherever the passage starts.sidecar.e2e.ts(narrow split): card's right edge within 2px of the paragraph's right edge after click; Resolve fully opaque without hovering the card.comment-sheet.e2e.ts: a desktop card that unfolds a 9-note thread stays inside a 640px viewport, scrolls internally, and its reply box is reachable.comment-geometry.test.ts: drafts align to the passage; a tall gutter card is capped.bun test packages/editor,bun run types, design contract, design check, dprint, oxlint pass locally. Local e2e skipped (shared ports held by other sessions); relying on CI.🤖 Generated with Claude Code