Skip to content

fix(i18n): say the deploy age in unit words inside sentences - #36685

Merged
bolichen97 merged 2 commits into
mainfrom
crew/issue-radar/fix-36611-deploy-age-unit-words
Nov 13, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
crew/issue-radar/fix-36611-deploy-age-unit-words

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The deploy views say how long ago a task stopped or a deploy finished in unit words, so the Japanese sentence reads 13 分前に停止しました。 instead of 13m 前に停止しました。.

With the dashboard in Japanese, a stopped task on a crewmate's cloud deploy view reads 13m 前に停止しました。: a narrow Latin unit inside a Japanese sentence. English reads It stopped 13m ago. The EC2 view's A deploy finished {{age}} ago in {{region}}. sentences take the same narrow age.

Why it matters

Every reader of those sentences outside English meets an abbreviation their language does not use mid-sentence. The crew patrol interval was fixed the same way in #35603 (#33514), so these deploy sentences are left reading the narrow form.

Not a goal

What changed (motivation → approach → change)

deployAge in website/src/pages/members/deployShared.tsx called fmtDuration with fmtUnit's narrow unit default. That form is meant for tight chrome, and it is right for the stat cards, but three callers drop the age into a sentence.

deployAge takes a third unitDisplay argument, defaulting to 'narrow', so the two stat-card callers are unchanged. The three sentence callers pass 'short', the form #35603 used:

  • website/src/pages/members/FargateCrewView.tsx: pages.membersPage.deploy_task_stopped_when.
  • website/src/pages/members/DeployMyCrew.tsx: pages.membersPage.deploy_state_gone / deploy_state_unknown.

The ja value of deploy_task_stopped_when was {{age}} 前に停止しました。, with a space before 前 that its two sibling sentences ({{age}}前に …) do not have. With unit words that space would read 13 分 前に, so it is dropped to give the 13 分前に停止しました。 the issue expects.

Backwards compatibility

Compatible: deployAge's new argument is optional and defaults to the old narrow output, so every existing caller renders the same unless it opts in; no catalog key, prop or API moves.

Removes nothing: only the unit width of three rendered sentences and one ja space change.

Tests

  • website/src/pages/members/FargateCrewView.test.tsx: the stopped-task case expects It stopped 25 min ago.; a new case renders the view in Japanese, with the clock pinned by vi.setSystemTime, and expects 25 分前に停止しました。.
  • website/src/pages/members/DeployMyCrew.test.tsx: a new deployAge case pins the narrow default (13m, the stat card) and the short form (13 min, a sentence).

With the production hunks reverted those three tests fail (3 failed, 83 passed); with them, all pass. npx vitest run src/pages/members/ (65 files, 1197 tests) and npx vitest run src/i18n (78 files, 1234 tests) pass; tsc, eslint on the touched files, lint:i18n, i18n:check, jscpd and npm run build are clean, and python -m pytest -n0 test/test_flake_pattern_ratchet.py -k test_no_changed_file_gains_a_flaky_shape passes.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

FargateCrewView (and DeployMyCrewDialog, which lazy-loads it) is not mounted by any page on main, so it cannot be opened in the running dashboard. I rendered the real component instead in a throwaway Vite harness (not committed): FargateCrewView inside the app's own providers and src/index.css, with a finished Fargate launch whose task ECS reports STOPPED 13 minutes ago. Playwright loaded the build through page.route, with no server and no gateway. The same harness was built once from origin/main (before) and once from this head (after). The capture host has no CJK system font, so the harness put Noto Sans JP first in --script-fallbacks, limited to CJK code points, so the Japanese glyphs are drawn and Latin text keeps its normal font.

Screenshots / video

The stopped-task card on the Fargate deploy view; the second line is the changed sentence.

Japanese, before (13m 前に停止しました。):

Fargate view, Japanese, before: 13m 前に停止しました。

Japanese, after (13 分前に停止しました。):

Fargate view, Japanese, after: 13 分前に停止しました。

English, before and after

Before (It stopped 13m ago.):

Fargate view, English, before: It stopped 13m ago.

After (It stopped 13 min ago.):

Fargate view, English, after: It stopped 13 min ago.

Related Issues

Fixes #36611

Sibling sweep

Swept: git grep -n "deployAge" -- website/src
Sibling: website/src/pages/members/FargateCrewView.tsx:381 -- changed here
Sibling: website/src/pages/members/DeployMyCrew.tsx:589 -- changed here
Sibling: website/src/pages/members/DeployMyCrew.tsx:556 -- not affected -- stat card value, keeps the narrow form
Sibling: website/src/pages/members/FargateCrewView.tsx:397 -- not affected -- stat card value, keeps the narrow form

Pattern harvest

Rule candidate: review-prompt
Pattern: a fmtDuration / fmtUnit value interpolated into a full-sentence catalog string uses the narrow unit default instead of unitDisplay: 'short'

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners November 13, 2026 15:03
@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

deployAge gains an optional unitDisplay argument (default 'narrow') and passes it through to fmtDuration and then fmtUnit, which honours the override. The three sentence callers pass 'short'; the two stat-card callers keep the narrow default, so they render as before. The ja deploy_task_stopped_when value drops a stray space to match its sibling sentences. The tests pin both widths and the Japanese render. CI failures are GitHub API rate-limit/infra errors, not code verdicts.

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 edddeb9bb0 · 48 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of edddeb9bb06450d4977c4c9bfb195322ded91ae1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. This is a small, opt-in change to how wide the age units are in three sentences. The stat cards keep the narrow default, and four screenshots of this revision show the result.

Notes

[DESIGN-REVIEWED] edddeb9

Description read

[DESCRIPTION-READ] aa3b3f15d86594484e47d754630e9e24773ef60c30297e4d968d0047c43cc92b

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of edddeb9bb06450d4977c4c9bfb195322ded91ae1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. This PR changes copy only and adds no controls. In the after shots the blind reader read "13 分" and "13 min" correctly and was sure of both, where "13m" had read as "metres or months".

Notes

  • The EC2 sentences deploy_state_gone / deploy_state_unknown ({{age}}前に {{region}} で…) use the same 'short' change, but no screenshot shows them. One still of that EC2 state would show they read the same way.

[UX-REVIEWED] edddeb9

Description read

[DESCRIPTION-READ] 0904278e7e98f875bc7676f42b87516df11443ef085ea2f06d0182695a6312d9

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of edddeb9bb06450d4977c4c9bfb195322ded91ae1 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The new unitDisplay parameter has callers using both values (2 narrow, 2 short), and the fix is pinned by linked issue #36611 and by tests that fail on base.

What this change ships

Inventory (4 items) — 4 justified

Intent: make the deploy views state a stopped task's age, or a finished deploy's age, in unit words inside a sentence, so Japanese reads 13 分前に停止しました。 (FIX).

  1. In the stopped-task sentence on the Fargate deploy view, the age now uses unit words (25 min, 25 分) instead of the narrow form (25m) — justified
  2. In the EC2 view's deploy_state_gone and deploy_state_unknown sentences, the age now uses unit words — justified
  3. The Japanese deploy_task_stopped_when string drops the stray space before 前 — justified
  4. deployAge takes an optional unitDisplay argument that defaults to narrow, so the stat cards are unchanged — justified

[FIRST-PRINCIPLES-REVIEWED] edddeb9

Description read

[DESCRIPTION-READ] 1e0ec91681bde571384f6c6182a1053382020e94448c132535d98b774edfb9c9

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed edddeb9bb06450d4977c4c9bfb195322ded91ae1 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] edddeb9

Verdict parsed from the review's SHA-scoped output markers for commit edddeb9bb06450d4977c4c9bfb195322ded91ae1.

False positive or not applicable? A repository writer can comment:
/ai-review override fable edddeb9bb06450d4977c4c9bfb195322ded91ae1 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of edddeb9bb06450d4977c4c9bfb195322ded91ae1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] edddeb9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt edddeb9bb06450d4977c4c9bfb195322ded91ae1 false-positive: <reason, 20 to 500 characters>

Kyle Seaman added 2 commits November 13, 2026 16:00
The stopped-task line on the Fargate deploy view rendered its age with
the narrow unit default, so the Japanese sentence read
13m 前に停止しました. The EC2 view's "A deploy finished ... ago"
sentences had the same narrow age.

deployAge takes a unitDisplay argument, defaulting to narrow for the
stat cards, and the three sentence callers pass short: Japanese now
reads 13 分前に停止しました, English "It stopped 13 min ago". The ja
value for deploy_task_stopped_when drops the space before 前 to match
its two sibling sentences.

Fixes #36611
The new #36611 render test computed its stop time from the real
Date.now(), which the flake-pattern ratchet (J3-unpinned-date) rules
out. Pin the instant with vi.setSystemTime and restore it in
onTestFinished.
@kyleseaman
kyleseaman force-pushed the crew/issue-radar/fix-36611-deploy-age-unit-words branch from 8f4a4eb to edddeb9 Compare November 13, 2026 16:00
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 13, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. I read the whole diff on this head. All checks pass: the failed GPT 6.1 Review, PR Policy and Publish readiness signal runs, and the cancelled Sensitive Change Review, each have a newer passing run on this head.

  • deployAge takes an optional unitDisplay, defaulting to the narrow form, which it passes to fmtDuration. The two sentences that hold an age now pass short: the Fargate "stopped … ago" line and the EC2 "deploy finished … ago" line. So Japanese reads 25 分前に停止しました。 instead of 25m 前.
  • Stat cards keep the narrow default, so their compact value is unchanged.
  • In ja.json, the space before 前 is dropped, because the short unit already ends in a word.
  • Tests pin both forms and the Japanese sentence on a fixed clock.
  • Display only. No regex, and nothing is refused.

@bolichen97
bolichen97 merged commit 9957120 into main Nov 13, 2026
137 of 154 checks passed
@bolichen97
bolichen97 deleted the crew/issue-radar/fix-36611-deploy-age-unit-words branch November 13, 2026 19:26
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 13, 2026
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.

Japanese UI: a stopped crew deploy task says "13m 前に停止しました" (narrow unit inside a sentence)

3 participants