test(root): graduate the autoscroll acceptance point - #868
Conversation
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.
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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. Comment |
|
@codex please review this PR |
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
There was a problem hiding this comment.
💡 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".
|
@codex please review this PR |
|
@nextly-bot review |
|
Claude encountered an error after 33m 33s —— View job Review in progress
|
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |

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()threwCanvasCapabilityErrorrather than measuring, and the acceptance case asserted that throw before marking itselftest.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:
dnd-kit ships
AutoScrollerindefaultPreset, andgetElementFromPointexplicitly recurses into an iframe'scontentDocumentwith adjusted coordinates — so the cross-document canvas never defeated it.Note which element moves. The host wrapper around the iframe has
overflow: autoand 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 }>replacescanvasScrollTop(). The bound is not decoration:"Stops at the bounds" is the requirement, so the case now asserts the scroll reaches
max, does not exceed it, and stays there. Withoutmax, the stopping half was satisfied by a canvas that never moved.Two mechanics the old case got wrong
canvasBottomEdge()is on the driver rather than measured in the suite, for the same reasoncanvasCentre()is: a replacement canvas that is not an iframe still has a bottom.Break verified at the source
Removing
AutoScrollerfrom the provider's plugin list and rebuilding fails the case with: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
test.fail.check-types+lintgreen 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.