Skip to content

fix(settings): pass counts and names into the translated text instead of gluing them on - #28806

Merged
bolichen97 merged 1 commit into
mainfrom
crew/conductor/settings-glued-text-ao4
Nov 5, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
crew/conductor/settings-glued-text-ao4

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Five settings lines read as one translated sentence in every language, with the count or channel name where that language puts it.

Each of these lines is glued from separate catalog pieces with a raw value between them, so a translation keeps English word order and a count cannot pick its plural. In German the policy heading reads "Slack Richtlinienstatus nicht verfügbar" and the posture button reads "Anzeigen 3 mehr".

Why it matters

Anyone using the dashboard in another language sees broken grammar on the channel policy screens, the remote crew list and the security posture list.

Not a goal

What changed (motivation → approach → change)

Line Before After
ChannelDisabledPanel.tsx headings {label} + fragment channel_policy_status_unavailable / channel_turned_off with {{channel}}
InstancesPanel.tsx crew row port and TTL around two fragments remote_port_ttl with {{port}} and {{ttl}}
InstancesPanel.tsx warm cap note "Up to" + {warmCap} + fragment plural warm_cap_count
PostureDisclosure.tsx "Show N more" "Show" + {hidden} + "more" plural show_more_count
BotChannelPanel.tsx loading line "Loading" + {spec.name} + "config…" loading_channel_config with {{channel}}
BotChannelPanel.tsx load error "Cannot load" + {spec.name} + fragment cannot_load_channel_config with {{channel}}
BotChannelPanel.tsx read-only notice {spec.name} + fragment channel_settings_read_only with {{channel}}
RemoteCrewPanelCrewRow.tsx port fragment + {inst.remote_port} remote_port_value with {{port}}

Review update: the two "Not a goal" sites are now fixed here instead of deferred. #28625 has merged, and the RemoteCrewPanelCrewRow.tsx line takes the whole-sentence key; #13337 will need a one-line rebase there.

The new keys are in every shipped catalog under website/src/i18n/locales/ (en-XA from npm run i18n:pseudo), in each language’s plural forms and with the informal "you" each style guide asks for. Both plural bases are added to website/src/i18n/pluralKeys.json, and the fragment keys nothing reads any more are removed.

Backwards compatibility

Compatible: English reads the same; only how the lines are assembled changes.

Removes nothing: the removed catalog keys had one reader each, and each reader is replaced in this diff.

Tests

website/src/i18n/settingsGluedFragments.test.ts checks the English sentences (now including the BotChannelPanel lines and the crew-row port), a German and a Japanese order, every Russian plural form of the warm cap note, and that the six files no longer place a value next to a translated fragment. All of them fail on main and pass with the fix.

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

153 related frontend test files pass (the i18n suites and the settings panel, instance and bot channel tests), and so do tsc -p tsconfig.app.json, eslint and npm run i18n:check with I18N_BASE_REF=origin/main.

Manual verification

I rendered ChannelDisabledPanel in German with the app’s stylesheet in headless Chromium, on main and with the fix (screenshots below).

Screenshots / video

Before (main, German): "Slack Richtlinienstatus nicht verfügbar".

Before: German channel panel with the channel name glued in front

After (German): "Richtlinienstatus für Slack nicht verfügbar".

After: German channel panel with the channel name inside the sentence

Related Issues

Fixes #28802

Sibling sweep

Swept: git grep -nE "instancesPanel.port_2|{spec.name} {i18nT(|${spec.name} ${i18nT(" -- website/src/pages
Sibling: website/src/pages/settings/InstancesPanel.tsx -- changed here
Sibling: website/src/pages/settings/RemoteCrewPanelCrewRow.tsx -- changed here
Sibling: website/src/pages/settings/BotChannelPanel.tsx -- changed here

Pattern harvest

Rule candidate: lint
Pattern: a JSX text run that places a raw value between two i18nT(...) fragments.

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

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 3, 2026 03:13
@RohanK6
RohanK6 requested a review from dodgeblaster November 3, 2026 03:13
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks. Each glued fragment is replaced by a whole-sentence key or a plural key. A search of the tree turned up no other code that still reads any of the removed catalog keys.

Notes

  • The description has both Compatible: and Removes nothing: lines, and the second is the wrong shape for this PR: it does delete catalog keys. The grep found no other code reading them, so nothing breaks, but the section should list each removed key's reader as a Reader: line instead.

[DESIGN-REVIEWED] 296ba79

Description read

[DESCRIPTION-READ] c80fb2d470bcb80f21a924fa9ea60b8e17cc0bee4ffd32150055a9f06133a311

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 296ba79b20919ac3d38ede84f6342e1469d160e0 — 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 the settings sites at the mechanism level. The same glued-fragment pattern still appears 22 times outside these files.

Notes

  • Item 9 — point patch with counted unfixed siblings: git grep -nE "i18nT\([^)]*\)\} \{[a-zA-Z_.]+\} \{i18nT\(" (tests excluded) matches 22 sites outside these six files, for example pages/overview/UsageTab.tsx:242, pages/LocalStorageDebug.tsx:233 and components/WebAppArtifactCard.tsx:697. The test's hand-listed it.each of seven spellings only guards these files, and each new per-area *Plural.test.ts adds another list. A general fix is bigger than this PR, so deferring it is fine. Subtraction: none in this PR.

What this change ships

Inventory (10 items) — 10 justified

Intent: in every language, the settings screens read as whole translated sentences, with the count or name where the grammar needs it. This is a FIX (#28802).

  1. Channel-policy "unavailable" and "turned off" headings read as one sentence, with the channel placed per language — justified
  2. Remote crew row "remote port N · ttl X" is one translatable string — justified
  3. The warm-crew cap note picks its plural from the count — justified
  4. The posture "Show N more" button picks its plural from the count — justified
  5. Bot channel loading, error and read-only lines take the channel name inside the sentence — justified
  6. Remote crew panel port line is one translatable string — justified
  7. Fragment keys nothing reads any more are removed from every catalog — justified
  8. Two plural bases are registered in pluralKeys.json — justified
  9. A new test pins the sentences and the absence of the seven glued spellings — justified
  10. Two German before/after screenshots are committed under temp-screenshots/28802/ — justified

[FIRST-PRINCIPLES-REVIEWED] 296ba79

Description read

[DESCRIPTION-READ] f54a2191e5d3ecbc3bafec63bc0262ed53dfa73800547f0d7d8f771d8cd039ba

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

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

UX-Verdict: PASS

cannot evaluate: missing screenshots of four of the six changed surfaces. The two German shots show only ChannelDisabledPanel, and they also show its heading switching from formal to informal "you".

Evidence gaps

  • PostureDisclosure "Show N more" button (show_more_count): its label changes in every non-English language (German "Anzeigen 3 mehr" → "3 weitere anzeigen"). No screenshot shows it. A non-English screenshot with N=1 and N>1 would close this.
  • InstancesPanel crew row (remote_port_ttl) and warm-cap note (warm_cap_count): no screenshot. A non-English render of the remote crew list would close this.
  • BotChannelPanel loading line, load error and read-only notice (loading_channel_config, cannot_load_channel_config, channel_settings_read_only): no screenshot of any of the three states.
  • RemoteCrewPanelCrewRow port suffix (remote_port_value): no screenshot.

Notes

  • In German, channelDisabledPanel.channel_turned_off changes "Ihrem" to "deinem", but the body text and the error box below it still say "Ihrer" and "Sie". The blind reader said the page "switches between talking to me casually and formally, which feels careless." Either keep "Ihrem" here, or move the whole panel to "du" together.

[UX-REVIEWED] 296ba79

Description read

[DESCRIPTION-READ] e360909c525111ecbea377c6c7fc3639f38f8894810fc70195f1bc915e8c3581

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 296ba79

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

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 296ba79

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

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

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 3, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from 7f38bde to f0cfb9f Compare November 3, 2026 04:35
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 3, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from f0cfb9f to 8e2c5f2 Compare November 3, 2026 05:11
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 3, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from 8e2c5f2 to 5ad4bff Compare November 3, 2026 07:33
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 3, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from 5ad4bff to 9ad381f Compare November 3, 2026 15:57
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 3, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 4, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from ec1b6a8 to 7d1fef5 Compare November 4, 2026 13:12
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 4, 2026
@RohanK6
RohanK6 dismissed iamwhatever’s stale review November 4, 2026 14:53

Approved by a maintainer. The previous rounds of feedback where changes were requested have now been resolved. I'm dismissing this to enable automated reviewers to take a second pass

@RohanK6

RohanK6 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@iamwhatever Ready for review now

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 4, 2026
bolichen97
bolichen97 previously approved these changes Nov 4, 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.

[operator: bolichen97] Approving at this head. I found no breaking issue.

Checked: every changed call site (BotChannelPanel, ChannelDisabledPanel, InstancesPanel, PostureDisclosure, RemoteCrewPanelCrewRow) now uses one whole-sentence key with the right parameters, and the English output is unchanged. The new keys are in every shipped locale with complete plural forms per language, both plural bases are in pluralKeys.json, and none of the removed fragment keys has a remaining reader. The items from the earlier review are fixed.

Non-blocking notes:

  • ru.json channelDisabledPanel.channel_turned_off uses the informal form while its siblings use the formal one; the tone is mixed.
  • The "Not a goal" section still lists the two files this PR now fixes.
  • Open PR #13337 touches the same RemoteCrewPanelCrewRow.tsx line and will need a one-line rebase.

AI-assisted, approved by bolichen97

@bolichen97
bolichen97 enabled auto-merge (squash) November 4, 2026 20:44
@RohanK6
RohanK6 requested a review from bolichen97 November 4, 2026 21:13
@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from 7d1fef5 to 988cbba Compare November 4, 2026 21:13
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 4, 2026
bolichen97
bolichen97 previously approved these changes Nov 4, 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.

Approving 988cbba again. A range-diff against 7d1fef5, the head I approved earlier, shows one change: pluralKeys.json was rebased onto main's new entries (staged_flow_hint, rail_flow), and this PR's two plural bases, warm_cap_count and show_more_count, are still listed. Every other hunk is unchanged, so the review at 7d1fef5 covers all 22 files here.

The earlier non-blocking notes still apply (the mixed formal and informal tone in ru.json, and the "Not a goal" list).

The Windows shard 4 failure on this head was three strict XPASS rows in test/scale_budget/test_catalog_budget.py. That is backend agent-catalog code this frontend-only PR does not touch. The shard is being rerun.

No regex, glob or case-blind matching is added in product code.

@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 4, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

@RohanK6, could you update this branch onto main? Backend Tests (Windows) (4) fails on 988cbba, and the rerun failed the same way.

The failure is not from this PR. Three rows in test/scale_budget/test_catalog_budget.py are strict XPASS: they were marked as expected to fail, and they now pass. Main removed those markers in e86fbdc (#29942), but this branch's merge base, 3c0cbfd, is older than that commit. Updating onto main brings the fix in, and the shard should go green.

The rest of the PR is unchanged from my approval, so nothing else is needed.

@RohanK6
RohanK6 force-pushed the crew/conductor/settings-glued-text-ao4 branch from 988cbba to 3c40ac3 Compare November 4, 2026 22:47
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention labels Nov 4, 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.

Approving 296ba79 again. A range-diff against 3c40ac3 shows only rebase context in pluralKeys.json (main's new pastedChip entries); this PR's two plural bases, warm_cap_count and show_more_count, are still listed and every other hunk is unchanged. Thanks for updating onto main: the branch now includes e86fbdc, and Windows shard 4 passes on this head.

No regex, glob or case-blind matching is added in product code. Only two backend shards and PR Readiness are still running.

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.

Settings lines glue a count or channel name between translated pieces, so word order and plurals break

3 participants