Skip to content

fix(website): join channel mentions and preset roles by locale - #31887

Merged
RohanK6 merged 1 commit into
mainfrom
crew/conductor/channel-list-join
Nov 7, 2026
Merged

RohanK6 merged 1 commit into
mainfrom
crew/conductor/channel-list-join

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On the Channels page, the @mentions a message was sent to and a preset's agent roles are joined the way the reader's language joins a list.

The page built both lists with a hard-coded .join(', '). A German reader saw @Researcher, @Coder, @Reviewer instead of @Researcher, @Coder und @Reviewer. A zh-CN reader saw an English comma-space instead of @Researcher、@Coder和@Reviewer. The New Channel dialog's preset roles had the same problem.

Why it matters

Anyone who runs the dashboard in a language other than English sees these two lists in English punctuation. The rest of the page already follows the locale.

Not a goal

What changed (motivation → approach → change)

Symptom: two natural-language lists ignore the locale. Root cause: each one is joined with a literal ', '. Change: both now go through fmtList from website/src/i18n/format.ts, which this page already imports and uses for the clear-context roster. fmtList wraps Intl.ListFormat. English output gains its conjunction (@Researcher and @ghost), which is the same style as every other fmtList list in the app.

Backwards compatibility

Compatible: display text only. No API, payload or stored value changes.

Removes nothing: the two lists render the same items, joined differently.

Tests

  • website/src/test/ChannelPage.listJoin.test.tsx (new): renders a three-agent mention and the built-in incident preset in en and zh-CN. It expects → @Researcher, @Coder, and @ghost / → @Researcher、@Coder和@ghost and (Orchestrator, Logs Agent, and Code Agent) / (Orchestrator、Logs Agent和Code Agent). On main, all four cases fail. With the fix, all four pass.
  • website/src/test/ChannelPageCoverage.test.tsx: the two-item mention now expects → @Researcher and @ghost.
  • vitest run src/test/ChannelPage src/i18n: 79 files and 1325 tests pass. npm run typecheck, eslint on the changed files, and lint:i18n are clean.

Proof: not provable -- frontend test

Manual verification

I built the SPA from main and from this branch, served it with serveDist, stubbed /api/channels*, and read the rendered text with Playwright:

                 mention header                          preset roles
main  en     → @Researcher, @Coder, @Reviewer        (Orchestrator, Logs Agent, Code Agent)
main  de     → @Researcher, @Coder, @Reviewer        (Orchestrator, Logs Agent, Code Agent)
main  zh-CN  → @Researcher, @Coder, @Reviewer        (Orchestrator, Logs Agent, Code Agent)
this  en     → @Researcher, @Coder, and @Reviewer    (Orchestrator, Logs Agent, and Code Agent)
this  de     → @Researcher, @Coder und @Reviewer     (Orchestrator, Logs Agent und Code Agent)
this  zh-CN  → @Researcher、@Coder和@Reviewer         (Orchestrator、Logs Agent和Code Agent)

The capture host has no CJK font, so zh-CN is shown as text above only.

Screenshots / video

Real built SPA, dark theme. The images live at commit 7bc37ac. The final commit drops them, so nothing lands on main.

New Channel dialog, preset roles:

en de
before before preset en before preset de
after after preset en after preset de
Channel view, mention header (full page)

before, en:
before mention en

after, en:
after mention en

before, de:
before mention de

after, de:
after mention de

Related Issues

Fixes #31877

Sibling sweep

Swept: git grep -nE "join([\x27"], [\x27"])" -- website/src/pages/ChannelPage.tsx
Siblings: none -- no other comma join remains in ChannelPage.tsx; joins on other pages are outside this PR.

Pattern harvest

Not generalizable: a comma-space join is also correct for technical lists (paths, CSS values, payloads), so a blanket rule would misfire; the fmtList doc comment already names the distinction.

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.

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 6, 2026 23:26
@RohanK6
RohanK6 requested a review from tim-finnigan November 6, 2026 23:26
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/channel-list-join branch from 406c086 to 7bc37ac Compare November 6, 2026 23:44
The Channels page joined two natural-language lists with a hard-coded
", ": the @mentions a message was addressed to and the roles a New
Channel preset brings. A CJK reader saw an English comma-space instead
of the list separator their language uses (zh-CN reads A、B和C).

Both lists now go through fmtList, which the page already uses for the
clear-context roster, so they follow the active locale.

Fixes #31877
@RohanK6
RohanK6 force-pushed the crew/conductor/channel-list-join branch from 7bc37ac to c4d1672 Compare November 6, 2026 23:46
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks. Only the list separators change: two inline lists now go through the fmtList helper the page already uses, and the layout stays the same.

Notes

  • The evidence file lists no downloaded images. I didn't apply the missing-evidence trigger, because the diff only changes the text inside two existing spans and adds no new surface. The Playwright text table in the description covers what the screenshots would have shown.

[DESIGN-REVIEWED] c4d1672

Description read

[DESCRIPTION-READ] b064e906c48e84d285b9de2485ca6cb8e31ad33065847fe305652fe1d2d2ab11

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of c4d167295bbc26b89cd5aeda7041e00e33112bde — 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. Both lists now use the page's existing fmtList helper, so the fix removes the hard-coded join itself. The one rewritten test assertion is declared in the description.

What this change ships

Inventory (3 items) — 3 justified

Intent: readers of the Channels page in a language other than English see the mention list and preset role list joined the way their language joins items. This is a FIX.

  1. The mention header after "→" joins its names by locale; English gains "and" — justified
  2. The preset roles in the New Channel dialog join by locale — justified
  3. The two-item mention assertion in the coverage test now reads "→ @researcher and @ghost" — justified

[FIRST-PRINCIPLES-REVIEWED] c4d1672

Description read

[DESCRIPTION-READ] 1b2242fc971093ef63b1143d87a9bce3fe2be9d459991703558e0f2dfe11be91

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 7, 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 c4d167295bbc26b89cd5aeda7041e00e33112bde — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing screenshots of the changed mention header and preset-role text. The blind read was not performed because the PR supplies no image this review can accept.

Evidence gaps

  • Mention header in a channel message (→ {fmtList(...)} in MessageBubble): there is no screenshot of the joined @mentions, in English or another language. Attach before/after images of a message with three mentions to the PR description.
  • Preset roles in the New Channel dialog (({fmtList(p.agents.map(a => a.role))})): there is no screenshot of the preset row with its role list. The longer English string ("…, and Code Agent") could wrap the row. Attach a screenshot of the dialog in English and German.
  • The images in the description don't count. They point to commit 7bc37ac, which the description itself says the final commit drops, so they aren't attached to the PR or committed under temp-screenshots/ or .github/screenshots/. Re-attach them as github.com/user-attachments uploads.

[UX-REVIEWED] c4d1672

Description read

[DESCRIPTION-READ] b402c639de9117509b1fa9ec3f4b10fc2d03c9c5e3a3255d4eee6cde095a6df2

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c4d1672

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] c4d1672

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

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@RohanK6
RohanK6 enabled auto-merge (squash) November 7, 2026 01:30

@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 at c4d1672. The Channels page now joins a message's @mentions and a preset's agent roles with the existing locale-aware fmtList instead of a hard-coded .join(', '), so each language gets its own list punctuation and conjunction. Only those two display strings change, and the new tests cover both lists. No regex is added. CI is green apart from Publish readiness signal.

@RohanK6
RohanK6 merged commit ecb3d62 into main Nov 7, 2026
99 of 105 checks passed
@RohanK6
RohanK6 deleted the crew/conductor/channel-list-join branch November 7, 2026 06:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
The Channels page joined two natural-language lists with a hard-coded
", ": the @mentions a message was addressed to and the roles a New
Channel preset brings. A CJK reader saw an English comma-space instead
of the list separator their language uses (zh-CN reads A、B和C).

Both lists now go through fmtList, which the page already uses for the
clear-context roster, so they follow the active locale.

Fixes #31877

(cherry picked from commit ecb3d62)

Original author: Rohan Khanderia (#31887).
buluoray added a commit that referenced this pull request Nov 8, 2026
The Channels page joined two natural-language lists with a hard-coded
", ": the @mentions a message was addressed to and the roles a New
Channel preset brings. A CJK reader saw an English comma-space instead
of the list separator their language uses (zh-CN reads A、B和C).

Both lists now go through fmtList, which the page already uses for the
clear-context roster, so they follow the active locale.

Fixes #31877

(cherry picked from commit ecb3d62)

Original author: Rohan Khanderia (#31887).
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.

Channels page joins mentions and preset roles with a hard-coded English comma

2 participants