Skip to content

fix(i18n): say the crewmate schedule countdowns in unit words - #36734

Merged
bolichen97 merged 1 commit into
mainfrom
fix/35442-schedule-countdown-unit-words
Nov 13, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/35442-schedule-countdown-unit-words

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In Japanese, a crewmate's Schedules tab says its countdowns and the patrol's time limit in unit words (次回は13 分後, 13 分後に実行, 7 日の時間制限に達しました), never with a narrow Latin unit inside the sentence.

With the dashboard in Japanese, the profile card's Schedules tab read 次回は13m後 on the patrol row and on every schedule row, 13m後に実行 on the Up next card, and 7dの時間制限に達しました on a patrol stopped by its time budget.

Why it matters

Everyone using the dashboard in Japanese sees a Latin abbreviation glued into a Japanese sentence on every crewmate Schedules tab. The patrol interval on the same card already reads 15 分ごと since #35603, so the card mixed 15 分ごと and 13m後 one line apart.

Not a goal

  • The live patrol countdown (nextCycle in website/src/components/autoNudgeLoop.ts), which keeps its compact 13m 57s reading on purpose.
  • Relative times (timeAgo: Last check 2m ago, 前回の実行 50分前).
  • Rewording any catalog value in website/src/i18n/locales/*.json. The English stop reason now reads Hit its 7 days time limit; rewording it so the duration is not a modifier needs all 12 catalogs and is English: a patrol stopped by its time budget reads "Hit its 7 days time limit" #36711.

What changed (motivation → approach → change)

The Schedules tab now says its countdowns and the time limit in unit words, in every language. Japanese reads 13 分後, 1 時間30 分後 and 7 日; English reads Next in 13 min, Runs in 10 min and Hit its 7 days time limit.

All three sentences take their duration from one helper, inDuration in website/src/pages/members/CrewScheduleList.tsx. It used the formatter's narrow default, which is meant for tight chrome, not for a word inside a sentence. It now asks for the short unit display, the same one-line change #35603 made for the patrol interval on the same card.

The crew-mode spec (docs/system-specs/modules/crew-mode.md), the expected phrase in the capture harness (website/scripts/capture-crewmate-panel-ia.mjs) and the translator note for pages.membersPage.patrol_stopped_runtime (website/src/i18n/en.context.json) quoted the old narrow form and now quote the new one.

Backwards compatibility

Compatible: only the rendered wording of three duration phrases changes; no API, key, stored value or catalog value changes.

Removes nothing: the same three phrases render, with unit words instead of narrow units.

Tests

  • CrewScheduleList.test.tsx: a new Japanese test renders the list in ja and checks 13 分後に実行 on the Up next card and 次回は13 分後 / 次回は1 時間30 分後 on the rows. The English expectations moved to Next in 1 hr … 30 min and Runs in 10 min.
  • CrewOnItsOwn.test.tsx: a new Japanese test checks 次回は13 分後 in the patrol facts line and 7 日の時間制限に達しました for a runtime_budget stop. The English expectations moved to Next in 13 min and Hit its 7 days time limit; Last check 2m ago is unchanged.
  • Red before the fix: with the base CrewScheduleList.tsx put back, the two files run 8 failed / 30 passed, both new Japanese tests among the failures (Received: 次回sooner13m後に実行); with the fix, 38 passed.
  • Determinism: both files 5 runs at 38/38, plus one --sequence.shuffle run (seed 1794573864145) at 38/38. The clocks are pinned the way the existing tests pin them.

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

Manual verification

Reproduced and smoke-tested on Linux (Ubuntu 24.04.5 LTS) against the real built dashboard bundle, served locally with stubbed /api/** through the repository's capture harness, with the language set to ja and to en. A fresh gateway cannot hold a crewmate with a running task patrol and a time-budget stop without a live agent backend, which is why the harness was used.

Before (base):

[ja] patrol: … 最終チェック 2分前 · 次回は12m後 · 未完了のタスク 3件
[ja] up-next: 次回 Triage new issues 13m後に実行
[ja] row: Triage new issues … 次回は13m後
[ja] stopped patrol: … 7dの時間制限に達しました · まだ未完了のタスク 3件
[en] stopped patrol: … Hit its 7d time limit · 3 tasks still open

After (fixed build):

[ja] patrol: … 最終チェック 2分前 · 次回は12 分後 · 未完了のタスク 3件
[ja] up-next: 次回 Triage new issues 13 分後に実行
[ja] row: Triage new issues … 次回は13 分後
[ja] row: Daily digest … 次回は20 時間59 分後
[ja] stopped patrol: … 7 日の時間制限に達しました · まだ未完了のタスク 3件
[en] patrol: … Last check 2m ago · Next in 12 min · 3 tasks open
[en] stopped patrol: … Hit its 7 days time limit · 3 tasks still open

Nearby happy path: the committed harness's own checks pass on the fixed build (exit 0), including Hit its 7 days time limit and the #35603 interval every 15 min; relative times are unchanged.

Screenshots / video

Japanese, running patrol: before, then after.

before-ja-schedules
after-ja-schedules

Japanese, patrol stopped by its time limit: before, then after.

before-ja-schedules-stopped
after-ja-schedules-stopped

English, before and after

before-en-schedules
after-en-schedules
before-en-schedules-stopped
after-en-schedules-stopped

Related Issues

Closes #35442

Sibling sweep

Swept: git grep -nE "fmtDuration(" -- website/src
Sibling: website/src/pages/members/deployShared.tsx:53 -- tracked in #36611
Sibling: website/src/components/autoNudgeLoop.ts:177 -- not affected -- nextCycle is the live countdown chip, which keeps the compact 13m 57s reading on purpose
Sibling: website/src/components/SessionTurnLimitMenu.tsx:33 -- not affected -- the limit is a compact value inside parentheses after a label, not a word in a sentence
Sibling: website/src/pages/settings/InstancesPanel.tsx:70 -- not affected -- the token time left is a compact value after a label, not a word in a sentence

Pattern harvest

Rule candidate: review-prompt
Pattern: a fmtDuration/fmtUnit result interpolated into a translated sentence keeps the narrow unit default instead of unitDisplay: 'short' (#33514, #35442, #36611).

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

The crewmate Schedules tab formatted its countdowns and the patrol's
time limit with fmtUnit's narrow default, so Japanese sentences read
次回は13m後, 13m後に実行 and 7dの時間制限に達しました, and English
read Next in 13m and Hit its 7d time limit. inDuration, the one source
for all three, now uses the short unit display, the form the patrol
interval already uses: 13 分後 and 7 日 in Japanese, 13 min and 7 days
in English.

Closes #35442

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 13, 2026 16:17
@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 db2342aed65182920c2aad6e17ba9fe26af84eda and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] db2342a

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

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks. All four inDuration callers are the sentence-embedded phrases the description names, and the one-option change follows the pattern #35603 set for the same card.

Notes

[DESIGN-REVIEWED] db2342a

Description read

[DESCRIPTION-READ] 631927d513e306ebcd26e2ca480fcb34efcd0bec1b0f85f57c287171123c3b2a

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of db2342aed65182920c2aad6e17ba9fe26af84eda — 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. A one-line change in the shared helper inDuration fixes the reported defect (#35442) at its source. The one sibling, in deployShared.tsx, is tracked separately in #36611.

What this change ships

Inventory (5 items) — 5 justified

Intent: a person using the dashboard in Japanese should see crewmate schedule countdowns and the patrol time limit written with unit words, not a Latin abbreviation inside a Japanese sentence. This is a FIX.

  1. Schedule rows and the Up next card now read 13 分後 / Runs in 10 min, not 13m後 / 10m — justified
  2. The patrol facts line now reads 次回は13 分後 / Next in 13 min — justified
  3. The patrol's time-limit stop reason now reads 7 日 / Hit its 7 days time limit — justified
  4. The English wording of all three phrases changes in every locale — justified
  5. The crew-mode spec, the capture harness's expected phrase and the translator note now quote the new form — justified

[FIRST-PRINCIPLES-REVIEWED] db2342a

Description read

[DESCRIPTION-READ] 99a6087908df5582fb02aa20e23fcddb1bab82d336927506bd8128fcfe647e58

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] db2342a

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

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

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks. The PR changes only the wording of three duration phrases, and all eight before/after screenshots show those phrases, which the blind reader read correctly.

Notes

[UX-REVIEWED] db2342a

Description read

[DESCRIPTION-READ] 1b33ee4f36ed8f5f2916206f5b065a036c12e4d7277224faae45e31142793c20

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 .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.

@bolichen97
bolichen97 enabled auto-merge (squash) November 13, 2026 16:20
@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: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 13, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The review checked head db2342a. The one code change, unitDisplay: 'short' in inDuration (CrewScheduleList.tsx:25), reaches all four countdowns that sit inside a sentence: both CrewScheduleList sites and both CrewOnItsOwn sites. No compact chrome reader is affected. The new ja tests check the real catalog output. Reverted, the fix turns 8 assertions red, which matches the red-before count in the body. The tests are deterministic: the clock is pinned, the language is reset with onTestFinished, and there are no sleeps. The branch merges cleanly onto current main, and PR Readiness is green on this head.
Done well: the fix sits in the one shared helper, so every sentence changes together. The spec, the translator note and the capture script change in the same commit.
Optional: the English stop reason now reads "Hit its 7 days time limit". #36711 tracks that. Changing only the en.json value (for example "Hit its time limit of {{limit}}") would close it, and the other locales would not need to change.
Optional: the sibling line in the body points at #36611. That issue is closed, and #36685 already fixed deployShared.tsx on main.

@bolichen97
bolichen97 merged commit e5a0eb7 into main Nov 13, 2026
154 of 161 checks passed
@bolichen97
bolichen97 deleted the fix/35442-schedule-countdown-unit-words branch November 13, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Japanese UI: the crewmate schedule countdowns say "次回は13m後" (narrow unit inside a sentence)

2 participants