Skip to content

fix(i18n): say the crew patrol interval in unit words - #35603

Merged
bolichen97 merged 1 commit into
mainfrom
fix/33514-patrol-interval-short-unit
Nov 12, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/33514-patrol-interval-short-unit

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The crewmate patrol row says how often it wakes in unit words, so the Japanese sentence reads 15 分ごとに起動します instead of 15mごとに起動します.

With the dashboard in Japanese, Members > a crewmate > Schedules > On its own reads タスクから報告があったとき、または15mごとに起動します: a narrow Latin m inside a Japanese sentence. English reads Wakes when a task reports back, or every 15m.

Why it matters

Every reader of that row outside English meets an abbreviation their language does not use mid-sentence. The Heartbeat row right above it in the same tab already says 30 min, and the Schedule template cadence was fixed the same way in #33700, so today the patrol row is the one line on the tab that still reads 15m.

Not a goal

What changed (motivation → approach → change)

The patrol row on a crewmate's Schedules tab put a narrow 15m inside its sentence, because intervalText in website/src/components/autoNudgeLoop.ts called fmtDuration with the narrow unit default. That form is meant for tight chrome such as log rows and tab pills, not for a value dropped into a sentence.

intervalText passes unitDisplay: 'short', the form its own doc comment already promised (20 min, 1 hr 30 min) and the one the Heartbeat row uses. Japanese reads 15 分ごとに起動します, English every 15 min. The row is its only caller. The row keeps the grammar the 2026-10-23 decision chose (docs/decisions/2026-10-23-crewmate-watch-is-a-schedules-row-not-a-profile-readout.md: "Wakes when a task reports back, or every …", not "Every …"); only the unit width of its 15m example changes.

The translator note for pages.membersPage.patrol_wakes (en.context.json), the crew-mode spec's quote of the row (docs/system-specs/modules/crew-mode.md) and the expected text in the panel capture script (website/scripts/capture-crewmate-panel-ia.mjs) say 15 min to match.

Backwards compatibility

Compatible: only the rendered interval text changes; no catalog key, value, prop or API moves.

Removes nothing: the row keeps every word it had, with the unit spelled out.

Tests

website/src/pages/members/CrewOnItsOwn.test.tsx: the running-patrol case expects every 15 min in English, and a new case renders the row in Japanese and expects …または15 分ごとに起動します. With the intervalText change reverted both fail (2 failed, 20 passed); with it, all 22 pass.

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

Manual verification

Rendered the crewmate Schedules tab from this head's built dashboard with the repo's capture harness (website/scripts/capture-crewmate-panel-ia.mjs, fixture API, no gateway), in English and in Japanese, and read the patrol row: Wakes when a task reports back, or every 15 min and タスクから報告があったとき、または15 分ごとに起動します.

Screenshots / video

The patrol row on a crewmate's Schedules tab, from this head.

English:

Schedules tab, English: Wakes when a task reports back, or every 15 min

Japanese:

Schedules tab, Japanese: タスクから報告があったとき、または15 分ごとに起動します

Related Issues

Closes #33514

Sibling sweep

Swept: git grep -nE "fmtDuration(|fmtUnit(" -- website/src ':!website/src/apps', and every ja value with a placeholder right before ごと
Sibling: website/src/components/autoNudgeLoop.ts:151 -- changed here
Sibling: website/src/pages/members/CrewScheduleList.tsx:18 -- tracked in #35442
Sibling: website/src/pages/members/CrewGoals.tsx:241 -- not affected -- the Heartbeat interval already uses the short unit display
Sibling: website/src/cards/kindBodies.tsx:33 -- not affected -- the goal heartbeat note already uses the short unit display
Sibling: website/src/cards/scheduleText.ts:27 -- not affected -- the change-card cadence uses the long unit display
Sibling: website/src/utils/scheduleCadence.ts:56 -- not affected -- the Schedule template cadence uses the short unit display since #33700

Pattern harvest

Rule candidate: lint
Pattern: a fmtDuration(...) or fmtUnit(...) value with the narrow default passed as an interpolation value into an i18nT/t sentence

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

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 11, 2026 21:28
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of f59bbdc4274f40c35bfd4bd47ed1a96ddfc7c19d — 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

This fixes one sentence through the helper's only caller. The defect is pinned by a test that fails on base.

What this change ships

Inventory (5 items) — 5 justified

Intent: Make the crewmate patrol row say its wake interval in unit words, so the Japanese sentence reads naturally. This is a FIX (#33514).

  1. The patrol row on a crewmate's Schedules tab reads "every 15 min" in English and "15 分ごと" in Japanese, instead of "15m" — justified
  2. A new Japanese test case pins the row's sentence — justified
  3. The translator note for patrol_wakes describes the interval as unit words — justified
  4. The crew-mode spec's quote of the row says "15 min" — justified
  5. The expected text in the panel capture script says "15 min" — justified

[FIRST-PRINCIPLES-REVIEWED] f59bbdc

Description read

[DESCRIPTION-READ] 8bc12e4da62bd8a97fa997a126fc07b5138fa739a86ea02c3274b674824d39a7

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 11, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: a one-argument unit-width fix at the formatter's one caller, with screenshots of this revision in both languages.

[DESIGN-REVIEWED] f59bbdc

Description read

[DESCRIPTION-READ] c0beaa79095e452c735eb9e11c6429243c1707665c320097dc61c84dd300915d

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 11, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks. The only change is the unit width of one interval string. Both screenshots show the row, and the blind reader read it correctly in English and Japanese ("starts every 15 minutes").

Notes

[UX-REVIEWED] f59bbdc

Description read

[DESCRIPTION-READ] 14a79e2cfdb839da0c9997fdc92343925cd31c2ac353cf7e41b5c9e1f4e18286

That sha256 names everything this verdict read: the PR description, plus the 5 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 11, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] f59bbdc

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

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

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f59bbdc

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

@bolichen97
bolichen97 enabled auto-merge (squash) November 11, 2026 21:48
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

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

This one-line change makes intervalText pass unitDisplay: 'short' to fmtDuration, which is what its doc comment already promised. I recommend approving it. I checked these points against the code:

  • One caller. intervalText is only used by the patrol row (CrewOnItsOwn.tsx:88). kindBodies.tsx has its own local function with the same name.
  • How the option flows. fmtDuration passes the option on to fmtUnit. There it overrides the narrow default, and the code still swaps spaces for non-breaking spaces.
  • Cache. The formatter cache is keyed on locale and options, so switching languages mid-test picks up the right format.
  • Japanese test. The ja catalog value …または{{interval}}ごとに起動します gives exactly the string the new test expects.
  • Test setup. The test switches language and switches it back with onTestFinished, a pattern McpShareRefusedNotice.test.tsx already uses. It imports i18n/all, which exists.
  • Tests that would fail without the fix. The updated English assertion and the new Japanese case both fail if the change is reverted.
  • No stale expectations. No other test or capture still expects the patrol row to read every 15m. The

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

@buluoray buluoray 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 on bed4c15. On a Bot's Schedules tab, the "Watching its tasks" row under "On its own" used to say the patrol interval in the narrow form, so English read "every 15m" and Japanese read "15mごと". This PR formats that interval with short unit words, so it reads "every 15 min" and "15 分ごと". The change is one option on intervalText, and the patrol row is that function's only caller. No catalog value or key changed; only the English translator note moved from '15m' to '15 min'. A new Japanese test fails without the fix, and so does the updated English test. Non-blocking: the facts line on the same card still mixes 2分前 with 次回は12m後, which #35442 already tracks. Decisive lines: website/src/components/autoNudgeLoop.ts:151, website/src/pages/members/CrewOnItsOwn.test.tsx:87-92

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 11, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] The red Backend Tests shards (3.12 5 and 6, Windows 2 and 4), and the Coverage Gate that fails closed on them, are main's red, not this diff's. CI tested this head merged into main at bb7048c, and the same node ids are red on main's own push run https://github.com/kirodotdev/KiroCrew/actions/runs/43111938067 (e8283ce):

This PR changes only the patrol row's unit width, its translator note, spec quote, capture script and frontend test, so it waits for those two fixes to merge, then re-syncs onto main and re-runs CI. No push, rerun or override for this red until then.

The crewmate patrol row on the Schedules tab rendered its wake interval
with the narrow unit default, so the Japanese sentence read
15mごとに起動します and English read every 15m. Format the interval
with the short unit display its doc comment already describes, the
form the Heartbeat row above it uses: 15 分ごと in Japanese, every
15 min in English.

Closes #33514
@bolichen97
bolichen97 force-pushed the fix/33514-patrol-interval-short-unit branch from bed4c15 to f59bbdc Compare November 12, 2026 08:52
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in the Crew Mode spec (docs/system-specs/modules) and website/src/i18n/en.context.json since this head went green (ee7a026 -> 9ef0fc4); CI re-running. The new base carries #35625, the fix for the two Backend Tests node ids that were red on main and on the old head. The patch is unchanged and the screenshots above were re-taken from this head.
[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running 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 readiness: checking Automated validation is still running labels Nov 12, 2026
@bolichen97
bolichen97 merged commit 4ca7f55 into main Nov 12, 2026
101 of 102 checks passed
@bolichen97
bolichen97 deleted the fix/33514-patrol-interval-short-unit branch November 12, 2026 13:55
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 12, 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: the crew patrol row says "15mごとに起動します" (narrow unit inside a sentence)

3 participants