Skip to content

fix(mobile): localize subagent card status and the slash-command agent placeholder - #8205

Open
iscekic wants to merge 3 commits into
mainfrom
drain/mobile-localize-subagent-card
Open

iscekic wants to merge 3 commits into
mainfrom
drain/mobile-localize-subagent-card

Conversation

@iscekic

@iscekic iscekic commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

bot:

What changes

The subagent card in agent chat now draws and announces its task state from the catalog instead of the raw task-state token, and the slash-command form's Agent field shows an example agent identifier.

  • common.running and common.completed join the generic state words already in common (pending, queued, failed, cancelled). Their per-locale text moves unchanged from codeReviewer.status.*, and the code-reviewer list and detail screens now point at the common keys.
  • child-session-section.tsx maps the card's state to common.pending / common.running / common.completed / common.failed, and passes the resolved label both to the badge and to agentChat.childSession.accessibilityLabel, so the announcement keeps the five interpolations the catalogs define.
  • The slash-command Agent field uses a new profiles.slashCommands.agentPlaceholder (reviewer) instead of borrowing agentChat.modeOptions.code; the literal example is allowlisted alongside namePlaceholder, so the field shows an identifier in every language.
  • child-session-section.mounted.test.tsx asserts the localized badge label for every state and adds a Hungarian case that pins both the badge text and the accessibility label.

Verification

Catalog and suite checks on this VM:

node tools/i18n/check-catalogs.mjs
# check-catalogs: 87 languages, every catalog matches en.json

pnpm --filter kilo-app check:plurals
# check-plurals: every counted message and every locale declares its plural categories

pnpm --filter kilo-app exec vitest run src/i18n src/components/agents/child-session-section.mounted.test.tsx src/components/code-reviewer src/components/profiles
# Test Files 49 passed (49); Tests 1999 passed (1999)

pnpm --filter kilo-app typecheck   # tsgo --noEmit, clean
pnpm --filter kilo-app lint        # 0 warnings and 0 errors

Android 15 emulator, app language Hungarian, local dev stack (localhost):

  • Profiles → Slash commands → Add: the Agent field renders reviewer, while the surrounding fields stay Hungarian (A parancs neve / explain, Sablon / Magyarázza el $ARGUMENTS). Previously this field showed Kódolás, the localized mode name. Attached screenshot shows the form.
  • Subagent card: a locally seeded agent-chat transcript (session-ingest worker on this VM, owned fake account) opened from Agents → Session history renders the card in every state, in Hungarian: the badges read Fut, Befejezve and Sikertelen, and the running card's accessibility label reads Researcher, Hozzáférési szabályok ellenőrzése, Gondolkodás, Fut, so the announcement ends in the same Hungarian status word. The mounted suite covers the same states directly: it mounts the real ChildSessionSection against the real SDK jotai storage and switches the real i18n instance to hu.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: Status keys: Where should the four subagent-card status labels live? The catalog checker forbids two mobile keys with the same English copy unless the string is declared two-sense, so the options differ in catalog churn.
    Answer: Move Running/Completed into common.*
    Confidence: 0.70 · Precedent: Replace old paths instead of keeping them alongside: session ad6a3f589364, "alongside? why not instead?"; fix the class: session 00eb2a1d3e4b, "fix the class"
  2. Question: Agent placeholder: What literal example should the slash-command Agent field show, kept identical in every catalog (like namePlaceholder 'explain')?
    Answer: code
    Confidence: 0.55 · Precedent: none
  3. Question: Error label: Which word should the subagent card show for the 'error' status? The enum token is 'error'; web's subagent row labels this state 'Failed'.
    Answer: common.failed ("Failed")
    Confidence: 0.75 · Precedent: Keep similar elements consistent across surfaces: session a247f3c19b1e, owner asked that the thought row match the tool call row
  4. Question: Placeholder literal: Constraint found while implementing: a dedicated key with the English value "code" collides with agentChat.modeOptions.code ("Code") under the catalog one-wording rule, which would force both to share one translation in every locale — that is the current defect. Which literal should the new dedicated key use?
    Answer: Dedicated key, "reviewer"
    Confidence: 0.75 · Precedent: Keep CI checks that catch real errors: "we want to catch errors in PRs, as early as possible" (session 99e88001c4b4). Weakening the one-wording check with 84 exceptions goes against it, and the brief asks for a dedicated key with an example identifier.

…aceholder

- Move the shared status words into `common` (common.running, common.completed)
  with each catalog's existing text; the code-reviewer list and detail screens
  point at them.
- Map the subagent card's task state to common.pending, common.running,
  common.completed and common.failed, and pass the resolved label to the badge
  and to the card's accessibility label instead of the raw state token.
- Give the slash-command Agent field its own placeholder
  (profiles.slashCommands.agentPlaceholder, "reviewer") so it shows an example
  agent identifier rather than the localized mode name. Allowlist it with the
  other literal example values.
- Pin the localized status label, including a Hungarian case, in the mounted
  card suite.
@iscekic iscekic added drain Work item from the findings drain janitor:i18n Janitor finding: mobile copy and catalog checks labels Oct 20, 2026
@iscekic

iscekic commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Android 15 emulator, app language Hungarian, local dev stack on this VM.

Exercised: Profiles → Slash commands → Add. The Agent field renders reviewer as its example value, while the fields around it stay Hungarian (A parancs neve / explain, Sablon / Magyarázza el $ARGUMENTS, Ügynök label).

The screenshot is the add-command sheet from that run, captured after an accessibility dump of the same screen with the field texts above.

Hungarian add-slash-command sheet: the Agent field placeholder reads reviewer.

Comment thread apps/mobile/src/components/agents/child-session-section.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit is a single refactor that derives ChildSessionStatus from ToolPart['state']['status'], resolving the prior finding; the accompanying test hunk is formatting only, and the mapping still covers every SDK tool state.

Files Reviewed (2 files)
  • apps/mobile/src/components/agents/child-session-section.tsx - prior suggestion verified fixed at HEAD; STATUS_LABEL_KEY still satisfies all four SDK statuses
  • apps/mobile/src/components/agents/child-session-message.test.ts - formatting-only change, no issues

Incremental review of 2d244269..e488e91b: the type now comes from the shared SDK export instead of a copied literal union, so the satisfies Record<ChildSessionStatus, string> label map fails typecheck if the SDK adds a state rather than silently drifting. Typecheck and test execution were not run in this read-only review.

Previous Review Summaries (2 snapshots, latest commit 2d24426)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 2d24426)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The incremental commit is test-only and consistent with the localized status labels; the only remaining suggestion is the hand-copied ChildSessionStatus union in child-session-section.tsx, which is unchanged and already has an active inline comment.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
apps/mobile/src/components/agents/child-session-section.tsx 37 ChildSessionStatus copies the SDK's tool-state union instead of deriving ToolPart['state']['status'], against the apps/mobile/AGENTS.md rule not to copy shapes.
Files Reviewed (4 files)
  • apps/mobile/src/components/agents/child-session-section.tsx - 1 carried-forward issue verified at HEAD; incremental hunk is formatting only
  • apps/mobile/src/components/agents/child-session-message.test.ts - no issues
  • apps/mobile/src/components/agents/session-detail-content.test.ts - no issues
  • apps/mobile/src/components/agents/tool-part-renderer.test.ts - no issues

Incremental review of 208ca99..2d244269 (one test commit): the suites now derive expected status text through i18n.t('common.*') in all three touched test files, matching the component's STATUS_LABEL_KEY mapping, and no locale catalogs changed. No new findings. Test execution was not run in this read-only review; the PR description reports the catalog, plural, vitest, typecheck, and lint checks passing.

Fix these issues in Kilo Cloud

Previous review (commit 208ca99)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The localization change is consistent across all 87 catalogs and the renamed status paths have no stale references; the only finding is a copied status union that should be derived from the SDK type.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
apps/mobile/src/components/agents/child-session-section.tsx 37 ChildSessionStatus copies the SDK's tool-state union instead of deriving ToolPart['state']['status'], against the apps/mobile/AGENTS.md rule not to copy shared shapes.
Files Reviewed (95 files)
  • apps/mobile/src/components/agents/child-session-section.tsx - 1 issue
  • apps/mobile/src/components/agents/child-session-section.mounted.test.tsx - no issues
  • apps/mobile/src/components/code-reviewer/review-detail-screen.tsx - no issues
  • apps/mobile/src/components/code-reviewer/review-detail-screen.mounted.test.tsx - no issues
  • apps/mobile/src/components/code-reviewer/review-list-screen.tsx - no issues
  • apps/mobile/src/components/profiles/kilo-command-form-sheet.tsx - no issues
  • apps/mobile/src/i18n/label-reference.test.ts - no issues
  • apps/mobile/src/i18n/locales/*.json (87 catalogs) - no issues
  • tools/i18n/check-catalogs.mjs - no issues

Verified mechanically: every catalog moves the identical running/completed value from codeReviewer.status.* to common.* and adds agentPlaceholder with the same reviewer literal (+3/-2 in each locale), no codeReviewer.status.running/codeReviewer.status.completed references remain in source or tests, and common.running/common.completed each have only one English copy in en.json, so the one-wording rule is unaffected. Test execution was not run in this read-only review; the PR description reports the catalog, plural, vitest, typecheck, and lint checks passing.


Reviewed by deepseek-v4.1-flash-1017 · Input: 37.3K · Output: 2.3K · Cached: 323.8K

Review guidance: REVIEW.md from base branch main

The remaining child-card assertions built the expected text and the
accessibility label from the raw task state; point them at the same catalog
keys the card renders.
The card's status union is the SDK's own state union, so read it from
ToolPart instead of restating the four literals. Also format the child-card
test that the mobile format check flagged.
@iscekic iscekic added merge:human Substantive functional risk requires human review. merge:bot Bot-owned review; readiness checks still apply before merging. and removed merge:human Substantive functional risk requires human review. labels Oct 20, 2026
@iscekic

iscekic commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Android 15 emulator, app language Hungarian, local dev stack on this VM.

Exercised: Agents → Session history → a locally seeded agent-chat transcript that carries three subagent task cards. The status badges read Fut (running), Befejezve (completed) and Sikertelen (failed), and an accessibility read of the same screen gives the running card's label as Researcher, Hozzáférési szabályok ellenőrzése, Gondolkodás, Fut, so the announcement ends in the localized status word.

The screenshot is that transcript, captured from the same screen as the accessibility read.

Hungarian agent chat: subagent cards with status badges reading Fut, Befejezve, and Sikertelen

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain janitor:i18n Janitor finding: mobile copy and catalog checks merge:bot Bot-owned review; readiness checks still apply before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants