Commit 27ecfe3
committed
fix(admin): open the date column newest-first
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.1 parent 38bb6bd commit 27ecfe3
2 files changed
Lines changed: 91 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
402 | 460 | | |
403 | 461 | | |
404 | 462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
57 | 79 | | |
58 | 80 | | |
59 | 81 | | |
| |||
420 | 442 | | |
421 | 443 | | |
422 | 444 | | |
423 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
424 | 456 | | |
425 | 457 | | |
426 | 458 | | |
| |||
0 commit comments