test(comments): e2e for below-fold comment scroll (spec 09)#77
Merged
Conversation
The dynamic bottom spacer + scrollCardIntoView that let a comment anchored at the end of a viewport-filling document be scrolled fully into view already shipped (App.tsx / CommentLayer.tsx), with computeBottomSpacer unit-tested. This adds the missing end-to-end coverage from the spec's verify section: comment the last line of a tall doc, click it, assert the card lands fully in the scroll viewport with a positive bottom gap — without adding content. Verified it fails without the spacer (card overshoots by ~19px) and passes with it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESi6dnK3Wc1jYRpZN5qfZA
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.
Adds the end-to-end coverage from spec 09's "Verify" section.
Context: spec 09 (comments anchored past the document's end can't be scrolled into view) was flagged as deferred, but on inspection its feature is already on main — the dynamic
.editor-bottom-spacer, the sizing effect with the feedback guard, print suppression,scrollCardIntoView(rAF-deferred,behavior:'instant'anchor), andcomputeBottomSpacerunit tests all shipped in the #72/#73 lineage. The only missing piece from the spec was the real-layout e2e test.This PR is test-only — no runtime change:
e2e/below-fold-comment.spec.ts: fill a viewport-filling document, comment the last line, scroll to top, click the commented text, and assert the activated card lands fully within the scroll viewport with a positive bottom gap — without adding content to the doc.Verified it fails without the spacer (card overshoots the viewport by ~19px → negative bottom gap) and passes with it, per the spec's requirement.
No user-facing change, so no version bump / release accompanies this.
🤖 Generated with Claude Code