Skip to content

fix(admin): open the date column newest-first - #155

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

fix(admin): open the date column newest-first#155
guarzo merged 1 commit into
mainfrom
design-sweep/2026-08-06b-5

Conversation

@guarzo

@guarzo guarzo commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Round five of an unattended design sweep. One sentence: the "Tier changed" column now opens newest-first.

Based on #154 — merge #148, #149, #151, #154, then this. Superseded: #148, #149, #151 and #154 have all merged, and GitHub retargeted this PR to main. It is now standalone and merges on its own. See Merge order at the bottom.

What changed

admin/accounts/page.tsx — a new SORT_OPENS map gives each sortable column the direction it opens on its first press. Name, Tier and Cryo keep ascending. Only tierChangedAt changes.

The cost it removes. An admin returning to the roster asks one question of that column: what moved while I was away. Ascending answers the opposite question — the top of the table fills with the accounts nothing has happened to since last spring, and the thing they came for sits at the bottom of a three-screen table behind a second click, on every visit. The page's own lede says the sync jobs change tiers without telling anyone; the column that reports when is the one place that has to be readable in one press.

Scope held deliberately narrow. Once a column is active it toggles exactly as before — ascending ⇄ descending. This is the opening direction only, and the other three keys are unchanged, because a value you already have in mind (a name, a tier) is found from the top and a recency question is not.

The spec

admin.spec.ts:415, verified to fail with the fix reverted (Received: …&dir=asc).

It asserts three things rather than one, because each alone is weak: the URL's dir, the header's aria-sort, and the rendered row order. The URL alone would pass if dir stopped reaching the query; the row order alone would pass on a table that never sorted at all. The two seeded accounts are named Ancient and Zeta so alphabetical order and recency order disagree — with names that happened to agree, a sort doing nothing would pass every assertion.

The tier-change instants are stamped with a direct db.update rather than by adding a field to seedMember, which five other spec files share. Widening a shared helper for one spec is the kind of change this run leaves alone.

Skipped this round, and why

The Tokens badge's wording (page.tsx:631) was ranked next and is being reported rather than changed. The finding was that a red badge reading "4/5 ok" says "ok" on the row that is broken. On reading the actual markup that argument is thinner than the backlog entry made it sound: the word qualifies the numerator, the number beside it already says 4 of 5, and the badge's tone already carries the severity. Cutting it to "4/5" trades one ambiguity for another — "4/5" of what — and this is a copy judgement on a scanning surface, which is exactly the class of call an unattended run should not make on the strength of a one-line finding. Left open.

.log td.num > .stack is dead CSS (globals.css:3159-3170) and stays that way this round. It is verifiable and the deletion is safe, but it costs no user anything, which puts it below this run's floor. Named so it is not rediscovered as new.

docs/settled-design-decisions.md:155 records the inverse of InlineEdit's current contract. It says actions must reject via redirect; inline-edit.tsx:17-32 deliberately reversed that and five actions now return StringFieldEditState. This one matters more than its size — every reviewer in this sweep is told that file is closed, so a future pass will "restore" the redirect contract and reintroduce the defect of a rejected edit wiping an operator's typed number on a money screen. It is left for a human on purpose: the settled-decisions file is the record of what people already decided, and an unattended run editing it is the one thing this loop should never do, even to correct it. Worth someone's five minutes.

Gates

Run on this branch's tip in the worktree, quoted:

  • tsc --noEmit — clean
  • eslint . — clean
  • prettier --check . — "All matched files use Prettier code style!"
  • npm test77 files, 1134 tests passed, matching the known-good baseline
  • npx playwright test233 passed (4.5m), exit 0, with 233 lines counted in the captured log. That is fix(admin): arm grant the way its own opposite is armed #154's 232 plus exactly the one spec this round adds.

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

Merge order

No ordering left to respect. Every branch this one stacked on has merged (#148#149#151#154, in that order), and this PR's base is now main. The squash caveat that used to sit here no longer applies to it.

One thing worth knowing about the history below it: main moved under this run — #150, #152, #153 and #156 merged while the sweep was working, and #153 landed in confirm-submit.tsx, which round one had rewritten. That conflict was resolved on the round-one branch (kept both edits: round one's CSS-generated-content width reservation, #153's confirm prop and its below-the-hooks throw) and verified by running #153's own regression spec, e2e/payouts.spec.ts:2212, on the merge. It passed. That resolution is in main now.

#158 is also open and independent of this one — it touches only e2e/payouts.spec.ts.

@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: 5217b1ad-955a-4315-8015-c15865316c31

📥 Commits

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

📒 Files selected for processing (2)
  • e2e/admin.spec.ts
  • src/app/admin/accounts/page.tsx

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

@guarzo
guarzo force-pushed the design-sweep/2026-08-06b-5 branch from f5ad7ca to 474682d Compare August 6, 2026 12:36
@guarzo
guarzo force-pushed the design-sweep/2026-08-06b-5 branch from 474682d to 740b6ae Compare August 6, 2026 12:40
@guarzo
guarzo force-pushed the design-sweep/2026-08-06b-5 branch from 740b6ae to 27ecfe3 Compare August 6, 2026 12:51
Base automatically changed from design-sweep/2026-08-06b-4 to main August 6, 2026 13:15
An admin coming back to /admin/accounts asks one question of "Tier
changed": what moved while I was away. The column opened ascending, so
the top of the table filled with the most settled accounts on the roster
— the ones nothing has happened to since last spring — and the answer
sat at the bottom, behind a second click, every visit. On a page whose
own lede says the sync jobs change things without telling anyone, that
is the wrong end of the column to land on.

`SORT_OPENS` gives each key the direction it opens on its FIRST press.
Name, Tier and Cryo keep ascending, which is right for a value you
already have in mind and are scanning for. Only `tierChangedAt` opens
descending. Once a column is active it toggles exactly as before — this
changes the opening direction and nothing else.

The spec asserts the URL, `aria-sort`, and the rendered row order, with
the two seeded accounts named so alphabetical order and recency order
disagree — otherwise a sort that did nothing at all would pass. The
tier-change instants are stamped with a direct update rather than by
widening `seedMember`, which five other spec files share. Verified to
fail with the fix reverted (`Received: …dir=asc`).

typecheck, eslint, prettier --check .: clean.
npm test: 77 files, 1134 tests passed.
npx playwright test: 233 passed, 233 ✓ lines counted.
@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