Skip to content

fix(mobile): show an agent identifier example as the slash command agent placeholder - #8461

Merged
iscekic merged 2 commits into
mainfrom
drain/slash-command-agent-placeholder
Oct 22, 2026
Merged

iscekic merged 2 commits into
mainfrom
drain/slash-command-agent-placeholder

Conversation

@iscekic

@iscekic iscekic commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Change

The slash command add/edit form's Agent field carries an agent identifier (code, architect, plan, or a profile agent slug) and must not use the mode picker's localized label as its hint. That identifier placeholder already landed on main through #8205: the field reads profiles.slashCommands.agentPlaceholder (reviewer), every catalog keeps that example untranslated, and tools/i18n/check-catalogs.mjs allowlists it.

Merging main into this branch therefore leaves the component, the catalogs, and the checker byte-identical to main; this pull request now carries only the regression guard:

  • apps/mobile/src/components/profiles/kilo-command-form-sheet.mounted.test.tsx adds a mounted suite that renders the sheet in Khmer and asserts the Agent field's placeholder is the identifier example while agentChat.modeOptions.code still resolves to the localized label.
  • The same file keeps main's server-bounds and dismissal suites; the merge resolved the shared top-level test helper region so all four tests run together.
  • agentChat.modeOptions.code stays untouched for the picker.

Verification

  • pnpm --filter kilo-app check:i18n → check-catalogs: 87 languages, every catalog matches en.json; the i18n oxlint run reports 0 findings. The working tree's catalogs and checker are identical to main, so the checker's duplicate-key and one-wording rules see the shipped state.
  • pnpm --filter kilo-app exec vitest run src/components/profiles/kilo-command-form-sheet.mounted.test.tsx → 4 tests pass (server bounds, agent identifier field, dismissal without asking, dismissal confirmation gate).
  • Guard effectiveness, measured by pointing only the Agent field's placeholder back at agentChat.modeOptions.code: the suite fails with AssertionError: expected 'សរសេរកូដ' to be 'reviewer', then passes again once the shipped line is restored.
  • oxlint over apps/mobile/src/components/profiles reports no finding on the test file; its only diagnostics are type-resolution artifacts in unrelated files on a VM without the generated types.

The Android emulator capture in the evidence comment below was taken before this branch was reduced to the test; the placeholder string it shows is superseded by the one main shipped, and the branch no longer changes rendered copy.

Proxy answers

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

  1. Question: Placeholder: The slash-command Agent field takes an agent identifier (built-in slug such as code/architect, or a profile agent slug), and its placeholder must stop borrowing the translated mode label. What should the new untranslated placeholder say?
    Answer: code
    Confidence: 0.75 · Precedent: Keep similar elements consistent across surfaces ("thought row match the tool call row"); 'code' matches the untranslated sibling placeholders and the brief's suggested slug
  2. Question: Placeholder: Fact correction: bare "code" is not free. The catalog checker's one-wording rule folds case, so a new key holding "code" collides with the picker's modeOptions.code ("Code") and fails every locale unless the English string is added to tools/i18n/wording-exceptions.json 86 times. Which placeholder copy do you want?
    Answer: e.g. code, architect
    Confidence: 0.50 · Precedent: Keep similar elements consistent across surfaces ("thought row match the tool call row")
  3. Question: PR scope: main merged its own fix for this finding (fix(mobile): localize subagent card status and the slash-command agent placeholder #8205), so the component, all catalogs, and the checker already carry the identifier placeholder and the merge leaves duplicate catalog keys. How should this follow-up finish?
    Answer: Keep only a regression test
    Confidence: 0.55 · Precedent: A work item must converge rather than end blocked; do not redo work that was already done. So the redundant catalog changes are dropped and the guard test stays.

…ent placeholder

The slash command form's Agent field carries an agent identifier, but its
placeholder was the picker's localized mode label, which some catalogs render
as an action phrase (Khmer read as "write code").

Point the field at a new placeholder, "e.g. code, architect", the same example
the web profile editor shows, and keep it English in every catalog beside the
other profile-editor examples that name the value's syntax. Assert in Khmer
that the field keeps the identifier example while the picker's mode label stays
translated.
@iscekic iscekic added drain Work item from the findings drain janitor:i18n Janitor finding: mobile copy and catalog checks labels Oct 21, 2026
@iscekic

iscekic commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Android emulator proof for the slash command Agent field, captured on the local dev stack with a local fake account and a seeded test profile.

What I exercised: opened Profiles → the test profile → Slash commands → Add slash command, with the app language set to Khmer, and read the form's fields from the accessibility tree plus a screen capture.

Observed, after this branch:

  • Agent field hint: e.g. code, architect
  • Model override field hint stays localized: the Khmer "use session default" string
  • Slash command name and template hints stay explain and the localized template example

Observed before this branch, with only the placeholder line reverted and Metro restarted on a fresh bundle:

  • Agent field hint: សរសេរកូដ, the localized mode label, in a field that only accepts an agent identifier

The English capture shows the same form in the default language, where the Agent hint is the new example.

Slash command form in the Khmer app language, after this change: the Agent field hint is the identifier example

The same form in the Khmer app language before this change: the Agent field hint is the localized mode label

The same form in the default language: the Agent field hint is the identifier example

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The slash-command Agent field now points at a new profiles.slashCommands.agentPlaceholder key carrying the same identifier example the web editor shows, all 87 mobile catalogs gained the identical entry, the catalog checker allowlist covers it, and the mounted Khmer test pins the field to the identifier example; no defects found in the changed code.

Assumptions: [INFERENCE] verification was static only - check:i18n, tsc, and the vitest suites were not executed in this read-only review. Locale coverage, allowlist membership, and the absence of an English copy collision were checked by reading the catalogs and tools/i18n/check-catalogs.mjs. The Khmer assertion assumes agentChat.modeOptions.code stays translated in km.json, which it currently is (សរសេរកូដ).

Files Reviewed (90 files)
  • apps/mobile/src/components/profiles/kilo-command-form-sheet.tsx - placeholder retargeted; key exists in en.json and is referenced in source, so the checker's dead-key and usage checks hold
  • apps/mobile/src/components/profiles/kilo-command-form-sheet.mounted.test.tsx - new Khmer test uses the existing changeLanguage test pattern and restores en in afterEach; i18n is a real named export of @/i18n
  • apps/mobile/src/i18n/locales/en.json - new profiles.slashCommands.agentPlaceholder sits in the slashCommands namespace, and no other English key holds the same copy (one-wording rule)
  • apps/mobile/src/i18n/locales/*.json (86 non-English catalogs) - each adds exactly the one English-identical line; parity with en.json is complete (87/87 catalogs contain the key)
  • tools/i18n/check-catalogs.mjs - allowlist addition matches the documented profile-editor-example group, and the comment update covers the new entry

Reviewed by deepseek-flash-latest · Input: 83.5K · Output: 13.2K · Cached: 1.4M

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. label Oct 21, 2026
…gent-placeholder

# Conflicts:
#	apps/mobile/src/components/profiles/kilo-command-form-sheet.mounted.test.tsx
@iscekic iscekic removed the merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. label Oct 21, 2026
@iscekic

iscekic commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Supersession note for the Android capture above.

main shipped the identifier placeholder for the same field in #8205 (profiles.slashCommands.agentPlaceholder, example reviewer, untranslated in every catalog, allowlisted in the catalog checker). After merging main, this branch no longer changes the component, the catalogs, or the checker, so I am not re-capturing the emulator screen: the rendered copy is main's, and the earlier capture's placeholder string is superseded.

What the branch now carries is the regression guard, verified on this VM:

  • The mounted suite passes with the shipped line: 4 tests in kilo-command-form-sheet.mounted.test.tsx.
  • Pointing only the Agent field back at agentChat.modeOptions.code fails the guard with AssertionError: expected 'សរសេរកូដ' to be 'reviewer'; restoring the shipped line passes again.
  • check:i18n reports 87 languages matching en.json with no duplicate-key finding.
  • CI on the merged head is green; the iOS and Android mobile jobs completed.

No emulator screenshot is offered as proof of the fix itself, because the fix is not in this branch.

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; merge when ready once readiness passes and a review approves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants