test(root): place the canvas pointer at a known depth inside a zone - #806
Conversation
|
@codex please review this PR |
|
Warning Review limit reached
Next review available in: 6 minutes 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 (4)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1cd42d3aad
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0e7a4e59f
ℹ️ 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".
@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: |
|
@codex please review this PR |
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbaeb23451
ℹ️ 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".
|
Claude finished @mobeenabdullah's task in 19m 21s —— View job Review round 1 — superseded before posting
Posting failed, and this run is superseded rather than clean. The gateway re-read the PR at post time and found the head at What the round had concluded, for whoever reads the next one:
|
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9dab26b83
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d367d5f3b
ℹ️ 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".
The refusal rewound the pointer by the last bracket's net movement, which for a boundary travelling DOWN is positive — carrying the pointer back above an edge it had already passed, while the result still named that zone. The pointer is now left where the bracket put it and the zone is read from its actual containment. The moving-edge control no longer keys its shift to the wall clock: it shifts on the probe's own settle wait, which is injectable for that purpose. A pause longer than the wait made the edge move before the first measurement, so the walk landed in the settled band and the test passed with the re-entry logic removed.
|
@codex please review this PR |
|
@nextly-bot review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87bf4f3b03
ℹ️ 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".
|
Claude finished @mobeenabdullah's task in 27m 35s —— View job Review round 2 — superseded before posting
Posting failed, and this run is superseded rather than clean. The gateway re-read the PR at post time and found the head at What the round had concluded, for whoever reads the next one:
|
The wait exists to separate one bracket from the next. After the last bracket there is no next one, so waiting gave the edge another interval to travel and invalidated the containment that bracket had just confirmed — the refusal then read back -1 and named no zone at all. The control could not see it: it compared the reported zone against the read-back, and two absent zones compare equal. It now requires a real zone first.
A 4px approach stride could place a whole zone between two commands. A 6 CSS-pixel drop zone is 3 host pixels at the 0.5 canvas scale this suite supports, so the walk reported a later zone, or none, and the helper could never say the first was too narrow. The stride is now the probe resolution and the budget is expressed in pixels, so a caller's maxSteps reaches exactly as far as before.
|
@codex please review this PR |
The loop was explained by the drop-zone rule that currently produces a moving edge. This driver is a vocabulary several canvases implement, so that rule is one canvas's business and free to change; a canvas whose zones are geometrically constant settles on the first two measurements and pays nothing.
|
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". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c95d756bd9
ℹ️ 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".
The probe carried its own 120ms, a second copy of a duration the canvas owns and animates in its own stylesheet. Lengthen that transition and the probe re-brackets while the edge is still travelling, agrees with itself on a whole pixel, and returns a stale depth with nothing reporting it. Declared per driver like dwellAllowanceMs. The value cannot be shared with the CSS -- the rule is a template string compiled into the iframe, and a zone only exists mid-drag -- so a guard parses the stylesheet and fails if the transition outgrows it.
|
@codex please review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71b809f0f0
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12d136387c
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12d136387c
ℹ️ 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".
| let boundaryY: number | null = null; | ||
| for (let attempt = 0; attempt < EDGE_SETTLE_ATTEMPTS; attempt += 1) { | ||
| const found = await bracketZoneEdge(driver, zone, retreatLimit); | ||
| if (!found) return refuse(zone, "boundary-not-found"); |
There was a problem hiding this comment.
Report the actual zone when re-entry exhausts its budget
When a selected edge moves downward by more than retreatLimit between settle attempts, bracketZoneEdge exhausts its forward search and restores the pointer to the previous boundary, which is now outside the zone, but this branch still returns the original positive zone. Fresh evidence after the earlier forward re-entry fix is this exhaustion path: for example, entering after 2px with maxSteps = 1 gives a 6px limit, so an 8px shift produces { zone: 5, refused: "boundary-not-found" } while containment is -1. Read back containment here or preserve a contained position; the existing boundary-failure control only exercises retreat exhaustion while the pointer remains inside.
AGENTS.md reference: AGENTS.md:L199-L216
Useful? React with 👍 / 👎.
Unblocks the B-7 hysteresis lane. Filed as §6 of
tasks/left-tasks/2026-08-14-0030-canvas-harness-dwell-follow-ups.md, deferred from #763.Why the existing control cannot answer a margin question
The requirement permits target-switch hysteresis as an 8-12px distance margin or a >100ms dwell. #763 addressed the dwell form thoroughly — waiting, settling, declared allowances. It addressed the margin form not at all, and one place makes that concrete.
dragUntilInsideZonestops at the first 4px step that puts the pointer inside a zone. A canvas whose hysteresis is a distance margin has correctly not switched there: that position is inside its margin, and holding the previous target is exactly what the requirement asks for. So the containment comparisons reject a compliant canvas.settledTargetcannot rescue it. Waiting does not move a pointer, and a distance-based resolver does not change its mind with time. No amount of settling turns "somewhere inside" into "far enough inside".The B-7 lane has chosen the margin form, so this is a live dependency rather than a hypothetical one.
What this adds
Three phases, and the middle one is what makes the answer exact:
driver.pointer()rather than inferred from a step count;Three properties the consumer asked for, and each is a test:
insetPxis what was achieved. Pointer positions and DOM geometry are fractional and a 4px scan overshoots, so the achieved depth is not always the requested one and a caller asserting on a band width has to know which it got.ZoneInsetDriveris declared as the capability (moveBy,zoneContainingPointer,pointer) rather than the wholeCanvasDriver, matchingEdgeSearchDriverandJitterDriver, so it runs against a simulated canvas as well as a real one.Why the unit is pixels of pointer movement
Collision.valueis not in consistent units — pointer distance for one collision type, overlap area for another — so a band expressed as a raw collision score means different things per candidate kind.pointer()is what makes the result assertable in the only unit a band width can honestly be stated in.Evidence
Six tests against a simulated canvas with bands at known pixel positions, so the expected answer is arithmetic rather than a second opinion. That matters more than usual here: this control is itself the measuring device for every band assertion built on it, so it cannot be checked against another instrument.
The separating assertion is
trueDepth(band, pointer().y) === insetPx— the reported depth compared against the band's real edge. Removing only the boundary bracketing (phase 2), which is exactly whatdragUntilInsideZonedoes today, fails 3 of 6: the control then reports a self-consistent depth measured from wherever its coarse approach happened to land. Comparing the report against the request would not catch that; comparing it against the real edge does.Also covered: the same depth from four different start offsets within one coarse step; a band too shallow refusing rather than approximating; never entering a zone reported as a refusal rather than as depth 0; a depth measured from the band entered rather than from a band crossed earlier; and depth 0 as a legitimate request, since a band assertion needs both ends.
No browser, matching
settle.test.tsanddwelling-canvas.test.ts.Not in scope
The suite still does not assert hysteresis width — §1 of the follow-up, and the reason it matters: the existing ±2px jitter probe is satisfied by a 3px margin, so it would accept an implementation the requirement forbids. The B-7 lane is writing that assertion in a file of their own, in pixels of pointer movement, mutation-checked. This is the control it needs.
dragUntilInsideZoneis left in place and unchanged — its callers ask a containment question it answers correctly, and changing where it stops would change what the whole suite measures.Test-only, so no changeset.