Skip to content

test(root): graduate the autoscroll acceptance point - #868

Merged
mobeenabdullah merged 2 commits into
mainfrom
feat/graduate-autoscroll-acceptance
Aug 16, 2026
Merged

mobeenabdullah merged 2 commits into
mainfrom
feat/graduate-autoscroll-acceptance

Conversation

@mobeenabdullah

Copy link
Copy Markdown
Collaborator

The canvas autoscrolls. It has all along. Plan 04's B-8 is recorded as "not built" and that is wrong.

How it was hiding

createPocChromeReader.canvasScrollTop() threw CanvasCapabilityError rather than measuring, and the acceptance case asserted that throw before marking itself test.fail. A refusal cannot become a red, so the case would have passed forever whether or not the capability existed.

This is the second acceptance point with that exact shape — the first was B-7's invalid-target reader, graduated in #847. Both were recorded as product shortfalls when the evidence was a reader declining to look.

Measured, before any code was changed

A throwaway probe held a drag at the canvas's bottom edge and read every candidate scroller:

BEFORE  frameDoc {scrollTop: 0,    scrollHeight: 6003, clientHeight: 1041}
        host     {wrapScrollTop: 0, wrapScrollHeight: 1041, wrapClientHeight: 1041}
AFTER   frameDoc {scrollTop: 3192, ...}
DELTA   frameDoc: 3192   wrap: 0

dnd-kit ships AutoScroller in defaultPreset, and getElementFromPoint explicitly recurses into an iframe's contentDocument with adjusted coordinates — so the cross-document canvas never defeated it.

Note which element moves. The host wrapper around the iframe has overflow: auto and is the obvious thing to watch; it stays at 0, because the iframe is sized to it and the document that overflows is the one inside. A reader pointed at the wrapper reports "no autoscroll" about a canvas that is scrolling.

What the reader returns now

canvasScroll(): Promise<{ top, max }> replaces canvasScrollTop(). The bound is not decoration:

Two equal offsets are satisfied by a scroll that stalled for any reason, including one that never started.

"Stops at the bounds" is the requirement, so the case now asserts the scroll reaches max, does not exceed it, and stays there. Without max, the stopping half was satisfied by a canvas that never moved.

Two mechanics the old case got wrong

  • It walked the pointer down in fixed 40px steps. That runs off the viewport before dwelling anywhere, which reads as the canvas ignoring the gesture. It now goes to the edge via the shared stepped transport and dwells there.
  • A perfectly still hold produces no further signal. dnd-kit recomputes scroll intent from the drag position, so the dwell moves a pixel each tick. A motionless hold can measure a canvas that simply stopped being told anything.

canvasBottomEdge() is on the driver rather than measured in the suite, for the same reason canvasCentre() is: a replacement canvas that is not an iframe still has a bottom.

Break verified at the source

Removing AutoScroller from the provider's plugin list and rebuilding fails the case with:

Error: autoscroll must engage while the pointer rests near an edge
Expected: > 0
Received:   0

Restored → passes. The capability was removed at its origin, not stubbed in the harness, so the red is about the canvas rather than the reader.

Verification

  • The graduated case: passes, no test.fail.
  • Full canvas suite: 93 passed, 0 failed, and B-8 is no longer among the expected failures.
  • check-types + lint green for @nextlyhq/e2e, turbo --force.

Consequence for the plan

page-builder-master-plan.md §5c and the focus tracker both list B-8 under "Not built". It is built. Anyone sizing plan 04 from that list is over-counting, and B-8 should not be scheduled as work.

No changeset: test-only.

The canvas autoscrolls. It has all along: dnd-kit ships `AutoScroller` in
its default preset and `getElementFromPoint` recurses into an iframe's
own document, so the cross-document canvas never defeated it. Measured
during a drag held at the bottom edge, the frame document travelled
3192px.

The acceptance point recorded it as missing because `canvasScrollTop`
threw rather than measured, and the case asserted that throw before
marking itself expected-to-fail. A refusal cannot become a red, so the
capability arriving changed nothing.

The reader now measures, and reports the scroll RANGE alongside the
offset. Two equal offsets are satisfied by a scroll that stalled for any
reason, including one that never started, so "stops at the bounds" needs
the bound to mean anything.

It watches the FRAME's document rather than the host wrapper around the
iframe. The wrapper is the obvious candidate and never moves: the iframe
is sized to it, so the document that overflows is the one inside.
@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@mobeenabdullah, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 seconds

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ccba590-6074-4cec-8630-941844b0a54b

📥 Commits

Reviewing files that changed from the base of the PR and between 6b154cd and 35f77d6.

📒 Files selected for processing (3)
  • e2e/tests/canvas/acceptance.spec.ts
  • e2e/tests/canvas/driver.ts
  • e2e/tests/canvas/poc-driver.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@mobeenabdullah mobeenabdullah changed the title test(e2e): graduate the autoscroll acceptance point test(root): graduate the autoscroll acceptance point Aug 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@nextlyhq/adapter-drizzle

npm i https://pkg.pr.new/@nextlyhq/adapter-drizzle@35f77d6

@nextlyhq/adapter-mysql

npm i https://pkg.pr.new/@nextlyhq/adapter-mysql@35f77d6

@nextlyhq/adapter-postgres

npm i https://pkg.pr.new/@nextlyhq/adapter-postgres@35f77d6

@nextlyhq/adapter-sqlite

npm i https://pkg.pr.new/@nextlyhq/adapter-sqlite@35f77d6

@nextlyhq/admin

npm i https://pkg.pr.new/@nextlyhq/admin@35f77d6

@nextlyhq/admin-css

npm i https://pkg.pr.new/@nextlyhq/admin-css@35f77d6

@nextlyhq/blocks-engine

npm i https://pkg.pr.new/@nextlyhq/blocks-engine@35f77d6

@nextlyhq/blocks-react

npm i https://pkg.pr.new/@nextlyhq/blocks-react@35f77d6

@nextlyhq/builder

npm i https://pkg.pr.new/@nextlyhq/builder@35f77d6

create-nextly-app

npm i https://pkg.pr.new/create-nextly-app@35f77d6

nextly

npm i https://pkg.pr.new/nextly@35f77d6

@nextlyhq/plugin-form-builder

npm i https://pkg.pr.new/@nextlyhq/plugin-form-builder@35f77d6

@nextlyhq/plugin-page-builder

npm i https://pkg.pr.new/@nextlyhq/plugin-page-builder@35f77d6

@nextlyhq/plugin-sdk

npm i https://pkg.pr.new/@nextlyhq/plugin-sdk@35f77d6

@nextlyhq/plugin-seo

npm i https://pkg.pr.new/@nextlyhq/plugin-seo@35f77d6

@nextlyhq/storage-s3

npm i https://pkg.pr.new/@nextlyhq/storage-s3@35f77d6

@nextlyhq/storage-uploadthing

npm i https://pkg.pr.new/@nextlyhq/storage-uploadthing@35f77d6

@nextlyhq/storage-vercel-blob

npm i https://pkg.pr.new/@nextlyhq/storage-vercel-blob@35f77d6

@nextlyhq/ui

npm i https://pkg.pr.new/@nextlyhq/ui@35f77d6

commit: 35f77d6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4b619b84b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread e2e/tests/canvas/acceptance.spec.ts Outdated
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@nextly-bot review

@github-actions

github-actions Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 33m 33s —— View job


Review in progress

Reviewing PR #868 (test(root): graduate the autoscroll acceptance point) at 35f77d6e.

  • Phase 0 — Pre-flight: PR open, headRefOid matches 35f77d6e (no supersede), base 6b154cd3
  • Phase 1 — Loaded AGENTS.md, ARCHITECTURE.md, derived-checks.md, verifying-merged-work.md, both skills
  • Phase 2 — Round awareness: no prior pr-review-agent rounds (this is round 1); one Codex thread (resolved+outdated, fix landed at 35f77d6e)
  • Phase 3 — Task & stated guarantees extracted (test-integrity lens is primary here)
  • Phase 4 — Context expansion: all three changed files read whole at head + base, callers swept
  • Phase 5 — The hunt (test-integrity, separating-property, invariant sweep)
  • Phase 6 — Adversarial verification
  • Phase 7/8 — Compose & post the review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 35f77d6eae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mobeenabdullah
mobeenabdullah merged commit 6a35270 into main Aug 16, 2026
17 of 18 checks passed
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