Repository navigation
fix(projects): show task-run status in the app language - #36808
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a display-only change that removes nothing, and the PR includes images of both changed sites. Notes
[DESIGN-REVIEWED] f1987ed Description read[DESCRIPTION-READ] b4a4d102c0f3800d8508fa0aa4b67bdd75d31d00ba22500ce23d9410e264219d 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 The fix is narrow and backed by an issue (#36805) and a test that fails on main. Only the reordered rail row (state first, id last) rides along, and it is reversible. Notes
What this change shipsInventory (5 items) — 3 justifiedIntent: show each task run's state on the Projects page in the user's language (FIX).
[FIRST-PRINCIPLES-REVIEWED] f1987ed Description read[DESCRIPTION-READ] ff946772f02b8ecbc1a20e1b45b7acc686876fc0de715d60b0bfca2e790577de That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. All three changed spots (rail state label, the new count · state · id order, header state) appear in English and German screenshots, and the blind reader read the labels correctly. Notes
[UX-REVIEWED] f1987ed Description read[DESCRIPTION-READ] e1a25ec5e53a659f7bd374c24649e8cc222491858559e95ef073b9afc7aa33b0 That sha256 names everything this verdict read: the PR description, plus the 11 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: |
7599479 to
2ccf100
Compare
Code change approver recommendation: ApproveWhy: the decider estimates a 10% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. This is a display-only fix, and it does what it says. Before, the Projects page printed the raw status string in two places: the run rail and the run header. A new An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
2ccf100 to
60b8e3a
Compare
The Task Runner rail and the run header printed the raw run status
("completed", "failed", "planned", ...) and a literal English
"running", so every non-English dashboard showed English states. Map
each status to a catalog label, keeping an unknown one verbatim.
Fixes #36805
60b8e3a to
f1987ed
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review covered the full diff on this head: 17 frontend files, all in ProjectsPage.tsx, the locale catalogs and tests. runStatusLabel covers all eight RunStatus values. A running run takes priority over its stored status, and an unknown status still shows as-is. Both raw-status sites from #36805 (the rail row and the header fallback) now use it. All six new keys exist in every shipped locale plus en-XA, and each file parses as valid JSON. No other screen prints a raw run status. The change is plain text rendering only. PR Readiness is green on this head.
Done well: the German rail test fails on main. It checks that "Fehlgeschlagen" shows and "failed" is absent, and it restores the language in onTestFinished, so a timeout cannot leak German into later tests.
Optional:
- The rail row reorder (
count · state · id), the two-span flex split and the rowtitlego beyond the Goal. The original single div, with only the state swapped torunStatusLabel(r), would also meet it. A maintainer may want to accept the new layout on purpose or revert it in a follow-up. - The runner briefly sets
cancellingduring cancel cleanup. That value is not inRunStatus, so it still shows in English. A follow-up could add the value, a matching case and astatus_cancellingkey. - A table-driven
it.eachover the eight statuses would pin every switch arm. Today only the failed, running and unknown paths are tested.
Problem / Motivation
Goal: Task-run states on the Projects page show in the app language.
The run rail printed
{r.running ? 'running' : r.status}and the run header printedselectedRun.status, so "completed", "failed", "planned", "paused" and a hard-coded "running" appeared in English in every language.Why it matters
The state is the one word a user reads on each run row, and it was the only untranslated text in an otherwise translated list.
Not a goal
What changed (motivation → approach → change)
Symptom: English run states in a translated UI. Root cause: raw status strings rendered directly. Change, in
website/src/pages/ProjectsPage.tsx: arunStatusLabel(run)helper maps everyRunStatus(planning,planned,running,completed,failed,cancelled,paused,pausing) to a catalog label, reusing the page's existingrunningandplanningkeys; a status outside that set is shown verbatim. Both sites use it, and the rail's meta row now leads with the step count and state ("2/5 · Fehlgeschlagen · run-…"): they are never truncated, and where a long label cannot fit the narrow rail it wraps, breaking before the "·" so the separator stays with the state. The run id follows and takes only the space left, so it truncates first and drops out entirely; the full row stays in its title. Six keys (status_completed,status_failed,status_cancelled,status_planned,status_paused,status_pausing) are added to every shipped locale, reusing each locale's existing wording for the same states elsewhere in the catalog;en-XAis regenerated.Backwards compatibility
Compatible: display only; no status value or API changes.
Removes nothing.
Tests
website/src/test/ProjectsPage.test.tsxandwebsite/playwright/projects.spec.ts: two expectations that pinned the rawrunning/plannedtext now expect the labels (and the rail row's new count · state · id order).website/src/test/ProjectsPageCoverage.test.tsx: in German, a failed run's rail row reads "Fehlgeschlagen" and not "failed", as "1/2 · Fehlgeschlagen" in an element that wraps rather than truncates (fails on main);runStatusLabelkeeps an unknown status verbatim and labels a running run "Running".Proof: not provable -- frontend test (prove.py runs Python only). Checked by hand: the rail test fails against the main-branch page; the file's 64 tests, the i18n suite (
I18N_BASE_REF=origin/main),check-i18n-keys,check-i18n-strings,tscand eslint pass.Manual verification
Captured with a local Playwright harness (not part of this PR) that mounts the real
ProjectsPagewith five runs (completed, failed, cancelled, planned, paused) and checks the rail text for raw and labelled states before writing each frame. The frames below use long run ids; the runner checks that every rail row's count and state are rendered whole, with no clipping or overflow past the text column, and, after selecting the failed run, that the header shows its label. The same check over all 12 shipped locales finds no row clipped; the labels that cannot fit one line (de "Fehlgeschlagen", and longer ru, hi and bn labels) wrap.Screenshots / video
Projects run rail, English and German.
Before (main):
After (this PR):
Updated after frames for this revision, with long run ids: the count and state lead and stay whole, the id truncates after them, and German "Fehlgeschlagen" wraps instead of being cut.
Run header of the selected failed run (the second site this PR changes):
Related Issues
Fixes #36805
Sibling sweep
Swept: grep -n ".status}" website/src/pages/ProjectsPage.tsx
Sibling: ProjectsPage.tsx rail row and run header -- changed here
Pattern harvest
Rule candidate: none
Pattern: a raw enum value rendered as text; covered by the existing untranslated-strings checks only when it is a literal.
Overlap
Open PR #25471 also edits
ProjectsPage.tsx; its hunks (imports, the YAML panel) do not touch the lines changed here. Open PRs #36361 and #30515 match a search for the page but change none of its lines.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.