Skip to content

test(comments): e2e for below-fold comment scroll (spec 09)#77

Merged
sam-powers merged 1 commit into
mainfrom
test/below-fold-comment-scroll-e2e
Jul 10, 2026
Merged

test(comments): e2e for below-fold comment scroll (spec 09)#77
sam-powers merged 1 commit into
mainfrom
test/below-fold-comment-scroll-e2e

Conversation

@sam-powers

Copy link
Copy Markdown
Owner

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), and computeBottomSpacer unit 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

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
@sam-powers
sam-powers merged commit 87fb23a into main Jul 10, 2026
3 checks passed
@sam-powers
sam-powers deleted the test/below-fold-comment-scroll-e2e branch July 10, 2026 14:40
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