Skip to content

test(payouts): pin the notes Save control to the standalone hit target - #158

Merged
guarzo merged 1 commit into
mainfrom
design-sweep/2026-08-06b-6
Aug 6, 2026
Merged

test(payouts): pin the notes Save control to the standalone hit target#158
guarzo merged 1 commit into
mainfrom
design-sweep/2026-08-06b-6

Conversation

@guarzo

@guarzo guarzo commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Round six of an unattended design sweep, and the only one that came from the automated reviewer rather than from the sweep's own backlog. One sentence: pin /payouts/[id]'s notes Save control to the 36px standalone hit target, which nothing asserted.

Based on main, not on the stack. #154 and #155 are still open and still stack on each other; this touches only e2e/payouts.spec.ts, which neither of them goes near, so it merges in any order relative to them.

Why

CodeRabbit's review of #149 said it plainly: that PR raised this control to the standalone grade and shipped spec coverage only for the separate NoteForm on /admin/accounts. src/app/payouts/[id]/notes-form.tsx is a different component with a different comment explaining the same decision, and no test held it.

The cost. An operator working a payout on a phone — the case this grade exists for — gets a 28px target for the control that saves what the fleet was, if the class ever drifts back. Every other gate stays green while it happens: the change is one word in a className, invisible to typecheck, lint, unit tests and format.

What the spec does

e2e/payouts.spec.ts:2452. It measures Save notes against Finalize rather than asserting a bare toBe(36), so the number means "the same grade this page's own standalone controls use" instead of restating a constant.

The obvious comparison — Save notes against a per-row mark paid at 28px — is impossible, and the docblock records why: the notes form renders only while the operation is a draft (page.tsx:161) and mark paid only once it is finalized. No page state shows both grades at once.

Verified to pin, not merely to pass. With notes-form.tsx reverted to .btn btn--micro, the spec fails Expected: 36, Received: 28. The source file was restored from that mutation and git status confirms the diff is the spec alone.

Gates

Run on this branch in the worktree, quoted:

  • tsc --noEmit — exit 0
  • eslint . — exit 0
  • prettier --check . — "All matched files use Prettier code style!"
  • npm test77 files, 1145 tests passed
  • npx playwright test233 passed (4.0m), exit 0, 233 lines counted in the captured log. That is main's 232 plus exactly the one spec this branch adds.

Not run here: docker build . and scripts/check-node-version.sh — environment-bound. CI runs both on this PR; treat them as unchecked until it does.

What this round did not do

CodeRabbit's other two findings on the merged PRs were not acted on, and both are judgement calls a human should make rather than an unattended run:

#149 raised this button to the 36px standalone grade and shipped spec
coverage only for the separate `/admin/accounts` note form, which
CodeRabbit flagged on that PR. Nothing on `/payouts/[id]` asserted the
height, so a regression to `.btn--micro` would leave the whole suite
green while an operator on a touch screen — the one holding the device
one-handed in a fleet — gets a 28px target for the control that saves
what the payout was for.

Measured against `Finalize` rather than as a bare `toBe(36)`, so the
number means "the same grade this page's own standalone controls use".
The comparison cannot be `mark paid`: the notes form renders only on a
draft operation and `mark paid` only on a finalized one, so no page
state carries both grades at once.

Verified to pin: with the control reverted to `.btn btn--micro` the
spec fails "Expected: 36, Received: 28".
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: ASSERTIVE

Plan: Pro Plus

Run ID: a50263a2-4ec8-4f58-a868-3ee8e3f3179e

📥 Commits

Reviewing files that changed from the base of the PR and between d9ea2f0 and 0302cfb.

📒 Files selected for processing (1)
  • e2e/payouts.spec.ts

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

@guarzo

guarzo commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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