Repository navigation
fix(dev-fleet): localize the UPDATED column age and the prune result toast - #27491
Conversation
7a88305 to
255a45a
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the page now uses the existing Notes
[DESIGN-REVIEWED] 39fa750 Description read[DESCRIPTION-READ] 928c0a094f16d1e10782bc63b9162709b9b3081da2f997ae8b785cb5ccbf0ce5 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Both fixes use the existing What this change shipsInventory (7 items) — 7 justifiedIntent: Dev Fleet users in a non-English language see row ages and the prune toast in their own language. FIX (#27487).
[FIRST-PRINCIPLES-REVIEWED] 39fa750 Description read[DESCRIPTION-READ] 133f5bf3824b973afff2455f7892038c978b77b56c9e58cd09d2980b5dc8cc75 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the prune result toast. The PR rewrites all three toast states in 12 catalogs, and none of the four screenshots shows any of them. Evidence gaps
Notes
[UX-REVIEWED] 39fa750 Description read[DESCRIPTION-READ] 2d7f0dd2b8831c9bad5dacee1eb673136d731307de1c25165b4c1cce5ccd76a1 That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
255a45a to
5d98593
Compare
5d98593 to
edb619f
Compare
edb619f to
76b1f59
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
APPROVE at 76b1f59.
relTime() now uses the existing fmtRelative and clamps a future timestamp to "now". The prune toast uses three registered plural keys, and the removed just_now key had no other reader. The new Japanese test and the updated English tests would fail on main's ladder. Every AI lane passes, CI is green, and the branch merges cleanly.
AI findings judged non-blocking
- UX: Russian ages read like negative numbers ("-5 мин"). That is CLDR's narrow form, and
fmtRelativeuses it as the app-wide default. Changing the style is a separate, app-wide choice. - UX: no screenshot of the prune toast. The toast text is asserted in tests, and the lane passed.
- UX: "Prune: N failed" gives no next step. This is a copy suggestion; the English text is the same as on main.
- UX: the Russian BEHIND and UPDATED headers overlap. The before shots show the same overlap, and it comes from the BEHIND column's 48px width, which this PR does not change.
- Design:
relTime()is called twice per row. This is a style nit. - First Principles item 3: ages under a minute show seconds, not "just now". That is the locale's own wording from
fmtRelative, as on other pages.
— crew-pr-reviewer (r141)
76b1f59 to
39fa750
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
APPROVE at 39fa750bfb19129cb022e8867e171716eaf679a3.
This head is the previously approved 76b1f59 rebased onto main; the only patch difference is that untranslated-baseline.json keeps main's copy. relTime() uses the existing fmtRelative and clamps a future timestamp to "now", and the prune toast uses three registered plural keys. Every AI lane passed on this head and CI is green. One small note: the baseline entry stays at 20 because it is a ceiling, so the body's "drops from 20 to 14" sentence no longer matches the diff.
AI findings judged non-blocking
- UX: no screenshot of the prune toast. The toast text is asserted in DevFleetPage.test.tsx.
- UX: narrow style reads like "-5 мин" / "vor 5 m".
fmtRelativedefaults to narrow app-wide; changing it is a separate app-wide choice. - UX: Russian BEHIND and UPDATED headers overlap. It comes from the unchanged 48px BEHIND column and shows in the before shots too.
- Design: the wider UPDATED column narrows the worktree-name column on small viewports. A layout trade-off, easy to undo, no broken behaviour.
— crew-pr-reviewer (r142)
The red Sensitive Change Review entries are cancelled runs; a newer run of the same check on this head (39fa750) passed.
Problem / Motivation
Goal: The Dev Fleet table’s UPDATED column and the prune result toast read in the user’s language, not English.
In any language, the UPDATED column reads "5m / 3h / 4d / 2mo":
relTime()glues English unit letters onto a number, then the row strips " ago" again. After a prune, the toast reads "Pruned 2 worktree(s) (1 failed)" or "Prune: 1 failed", an English template literal with a "(s)" plural.Why it matters
Every Dev Fleet user on one of the 11 non-English languages sees English ages on every row and an English toast after every prune.
Not a goal
DevFleetPage.tsxinto the app folder (refactor: make core independent of the dev-fleet and pptx-maker apps #27435 does that).What changed (motivation → approach → change)
fmtRelative, the locale’s own wordstitleIn
website/src/pages/DevFleetPage.tsx,relTime()now returnsfmtRelativefromwebsite/src/i18n/format.ts. A timestamp ahead of the browser clock still reads "now", as before, not "in 5m". The localized words are longer than "5m" ("vor 2 Monaten"), so the column grows from 44px to 104px in both grid templates; a longer value ends in an ellipsis and its full text is the cell’stitle.The toast uses
pruned_worktrees,pruned_worktrees_some_failedandprune_failed_count, each with every plural form its language needs, registered inpluralKeys.json. The oldjust_nowkey had no other reader, so it is removed from every catalog.The new keys ship in all 12 catalogs under
website/src/i18n/locales/plusen-XA. This file’s entry inuntranslated-baseline.jsondrops from 20 to 14.Backwards compatibility
Compatible: no API, prop or stored value changes; only the displayed text changes.
Reader: website/src/i18n/locales/en.manual.json:pages.devFleetPage.just_now -- crew page -- its one caller was
relTime(), which no longer uses it;git grep devFleetPage.just_nowfinds no other readerEnglish shows "5m ago" where it showed "5m", and the toast says "Pruned 1 worktree" where it said "Pruned 1 worktree(s)".
Tests
website/src/test/DevFleetPage.updatedColumnLocale.test.tsx(new): under Japanese the column reads 5分前 / 3日前 and no "5m" / "3d" is left; a timestamp ahead of the clock reads "now", not a future time.website/src/test/DevFleetPageCoverage.test.tsx: the bucket test now expects 5m ago / 3d ago / 2mo ago.website/src/test/DevFleetPage.test.tsx: the prune tests now expect "Pruned 1 worktree" and "Pruned 1 worktree (1 failed)".With
origin/main’s page, all 5 of these assertions fail. The new file passed 10 of 10 runs with--sequence.shuffle.Proof: not provable -- frontend test (prove.py runs Python only)
Also run:
I18N_BASE_REF=origin/main npm run i18n:check(all checks pass),vitestonsrc/i18nand the 8 Dev Fleet test files,tsc -p tsconfig.app.json, eslint on the touched files.Manual verification
Rendered the built SPA in German and Russian with Playwright and API fixtures, before and after (screenshots below). The prune toast is covered by the tests, not a screenshot.
Screenshots / video
Before (main), German: UPDATED reads 5m / 2mo / 4d / 3h.
After, German: vor 5 m / vor 2 Monaten / vor 4 Tagen / vor 3 Std.
Before (main), Russian.
After, Russian.
Related Issues
Fixes #27487
Sibling sweep
Swept: git grep -nE "(m|h|d|mo) ago" -- website/src/pages/DevFleet* website/src/pages/devFleet*
Siblings: none -- relTime() is the only age ladder in the Dev Fleet files, and the prune toast is its only "worktree(s)" string
Pattern harvest
Not generalizable: the class is already gated; the i18n lint and the untranslated baseline found both sites, and fmtRelative is the existing fix.
Checklist