Skip to content

fix(mobile): make i18n formatting Hermes-safe - #5478

Merged
iscekic merged 14 commits into
mainfrom
fix/mobile-undefined-constructor
Aug 25, 2026
Merged

fix(mobile): make i18n formatting Hermes-safe#5478
iscekic merged 14 commits into
mainfrom
fix/mobile-undefined-constructor

Conversation

@iscekic

@iscekic iscekic commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Load the required FormatJS polyfills before mobile code creates Intl formatters.
  • Add the Intl.Locale prerequisite that Hermes omits.
  • Prewarm the FormatJS paths before the splash screen closes.
  • Load locale data for all 87 mobile languages.
  • Format money, numbers, dates, relative dates, durations, lists, percentages, and file sizes by locale.
  • Always show the supported United States dollar as $.
  • Keep the locale rules for the dollar position, spacing, digits, and separators.
  • Use Portugal rules for Portuguese and Brazil rules for Brazilian Portuguese.
  • Localize session groups, model groups, device labels, pull request limits, changelog dates, and gateway states.
  • Keep the selected Chinese script for voice input.
  • Complete every locale plural category and enforce the categories in the catalog check.
  • Localize structured values, week starts, voice regions, and right-to-left layout.

Root cause

The latest build loaded FormatJS locale data without Intl.Locale. Hermes does not provide that constructor.

Verification

  • pnpm test: 5,907 tests passed.
  • pnpm format: passed.
  • pnpm typecheck: passed.
  • pnpm lint: passed with zero warnings.
  • pnpm check:unused: passed.
  • pnpm check:i18n: all 87 catalogs passed.
  • The catalog audit found only the five intended additions in each catalog.
  • git diff --check: passed.
  • The final iOS Expo export passed with a 29 MB Hermes bytecode bundle.
  • pnpx expo-doctor: 20 of 21 checks passed.
  • The remaining Expo Doctor failure reports existing Expo patch-version drift.

Visual Changes: The app now shows localized copy and values. The component design did not change.

@iscekic iscekic self-assigned this Aug 25, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental commit 13f4b7176 localizes snapshot-init status and remote-session exit toasts while keeping English SDK/CLI matching, with no new high-confidence defects.

Files Reviewed (89 files)
  • apps/mobile/src/components/agents/compute-status.ts
  • apps/mobile/src/components/agents/exit-remote-session-with-feedback.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
Previous Review Summaries (10 snapshots, latest commit f782bcc)

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

Previous review (commit f782bcc)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental commits 501e0313a and f782bccc4 translate the six previously flagged catalog keys and localize Kilo Chat errors plus attachment preview labels, with no new high-confidence defects.

Files Reviewed (104 files)
  • apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/gate.tsx
  • apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/style.tsx
  • apps/mobile/src/components/kilo-chat/execute-action-feedback.ts
  • apps/mobile/src/components/kilo-chat/hooks/use-conversation-message-actions.ts
  • apps/mobile/src/components/kilo-chat/hooks/use-conversation-message-controller.ts
  • apps/mobile/src/components/kilo-chat/hooks/use-conversations.ts
  • apps/mobile/src/components/kilo-chat/hooks/use-messages.ts
  • apps/mobile/src/components/kilo-chat/kilo-chat-error.ts
  • apps/mobile/src/components/kilo-chat/message-presentation.ts
  • apps/mobile/src/components/pr-review/discussion/reply-input.tsx
  • apps/mobile/src/components/security-agent/finding-details-panel.tsx
  • apps/mobile/src/components/security-agent/finding-remediation-panel.tsx
  • apps/mobile/src/components/security-agent/settings-overview-screen.tsx
  • apps/mobile/src/lib/pr-review/mutation-error-display.ts
  • packages/kilo-chat/src/errors.ts
  • packages/kilo-chat/src/index.ts
  • packages/kilo-chat/src/utils.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)

Previous review (commit ed73052)

Status: 6 Issues Found | Recommendation: Address before merge

Executive Summary

Security Agent and Code Reviewer still render catalog keys for analysis mode, gate/style option labels, dismissal reasons, and remediation status badges.

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/security-agent/settings-overview-screen.tsx 155 Analysis mode interpolates a catalog key instead of translated copy
apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/gate.tsx 31 Gate threshold labels pass catalog keys into OptionList
apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/style.tsx 31 Review style labels pass catalog keys into OptionList
apps/mobile/src/components/security-agent/finding-details-panel.tsx 65 Dismissal reason interpolates a catalog key instead of translated copy
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 287 Remediation status badge renders the catalog key
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 457 Attempt status badge renders the catalog key
Files Reviewed (93 files)
  • apps/mobile/src/components/agents/session-list-helpers.ts
  • apps/mobile/src/components/force-update-screen.tsx
  • apps/mobile/src/lib/pr-review/classify-pr-review-query-state.ts
  • apps/mobile/src/lib/pr-review/diff/parse-patch.ts
  • apps/mobile/src/lib/pr-review/discussion/review-discussion-types.ts
  • apps/mobile/src/lib/pr-review/merge/pr-operation-ledger.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)

Fix these issues in Kilo Cloud

Previous review (commit f7bfff1)

Status: 6 Issues Found | Recommendation: Address before merge

Executive Summary

Security Agent and Code Reviewer still render catalog keys for analysis mode, gate/style option labels, dismissal reasons, and remediation status badges.

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/security-agent/settings-overview-screen.tsx 155 Analysis mode interpolates a catalog key instead of translated copy
apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/gate.tsx 31 Gate threshold labels pass catalog keys into OptionList
apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/style.tsx 31 Review style labels pass catalog keys into OptionList
apps/mobile/src/components/security-agent/finding-details-panel.tsx 65 Dismissal reason interpolates a catalog key instead of translated copy
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 287 Remediation status badge renders the catalog key
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 457 Attempt status badge renders the catalog key
Files Reviewed (115 files)
  • apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/focus-areas.tsx
  • apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/gate.tsx - 1 issue
  • apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/style.tsx - 1 issue
  • apps/mobile/src/app/(app)/kiloclaw/[instance-id]/billing.tsx
  • apps/mobile/src/components/add-credits-row.tsx
  • apps/mobile/src/components/agents/exit-remote-session-from-list.ts
  • apps/mobile/src/components/code-reviewer/action-required-keys.ts
  • apps/mobile/src/components/code-reviewer/option-list.tsx
  • apps/mobile/src/components/code-reviewer/platform-overview-rows.ts
  • apps/mobile/src/components/code-reviewer/platform-overview-screen.tsx
  • apps/mobile/src/components/organization/credit-activity-screen.tsx
  • apps/mobile/src/components/organization/invoices-screen.tsx
  • apps/mobile/src/components/security-agent/finding-details-panel.tsx - 1 issue
  • apps/mobile/src/components/security-agent/finding-remediation-panel.tsx - 2 issues
  • apps/mobile/src/components/security-agent/finding-row.tsx
  • apps/mobile/src/components/security-agent/settings-overview-screen.tsx - 1 issue
  • apps/mobile/src/lib/feedback.ts
  • apps/mobile/src/lib/hooks/security-command-failure-copy.ts
  • apps/mobile/src/lib/hooks/use-available-models.ts
  • apps/mobile/src/lib/hooks/use-code-reviews.ts
  • apps/mobile/src/lib/hooks/use-security-agent-commands.ts
  • apps/mobile/src/lib/hooks/use-session-model-options.ts
  • apps/mobile/src/lib/kilo-pass/store-products-loader.ts
  • apps/mobile/src/lib/kilo-pass/use-store-kilo-pass-products.ts
  • apps/mobile/src/lib/kilo-pass/use-store-kilo-pass-purchase.ts
  • apps/mobile/src/lib/kiloclaw-display.ts
  • apps/mobile/src/lib/pr-review/diff/parse-patch.ts
  • apps/mobile/src/lib/pr-review/merge/merge-result-error.ts
  • apps/mobile/src/lib/pr-review/merge/pr-operation-ledger.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)

Fix these issues in Kilo Cloud

Previous review (commit ad371ba)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

Security Agent still renders catalog keys for dismissal reasons and remediation status badges instead of translated copy.

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/security-agent/finding-details-panel.tsx 65 Dismissal reason interpolates a catalog key instead of translated copy
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 287 Remediation status badge renders the catalog key
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 457 Attempt status badge renders the catalog key
Files Reviewed (1 file)
  • apps/mobile/src/components/security-agent/finding-details-panel.tsx

Fix these issues in Kilo Cloud

Previous review (commit a84ae71)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

Security Agent now maps status and dismissal codes to catalog keys but forgets to translate them, so badges and dismissal copy show raw i18n keys.

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/security-agent/finding-details-panel.tsx 65 Dismissal reason interpolates a catalog key instead of translated copy
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 287 Remediation status badge renders the catalog key
apps/mobile/src/components/security-agent/finding-remediation-panel.tsx 457 Attempt status badge renders the catalog key
Files Reviewed (98 files)
  • apps/mobile/app.config.ts
  • apps/mobile/src/components/code-reviewer/review-list-screen.tsx
  • apps/mobile/src/components/security-agent/finding-analysis-panel.tsx
  • apps/mobile/src/components/security-agent/finding-details-panel.tsx - 1 issue
  • apps/mobile/src/components/security-agent/finding-remediation-panel.tsx - 2 issues
  • apps/mobile/src/components/security-agent/finding-row.tsx
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
  • apps/mobile/src/lib/hooks/use-security-remediation.ts
  • apps/mobile/src/lib/kilo-pass/use-store-kilo-pass-purchase.ts
  • apps/mobile/src/lib/pr-review/build-submit-review-input.ts
  • apps/mobile/src/lib/security-agent-copy.ts
  • packages/app-shared/src/security-agent/presentation.ts

Fix these issues in Kilo Cloud

Previous review (commit 0f9b478)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

Kilo Pass remaps the App Store not-linked error by comparing against i18n.t(), so non-English locales miss the English tRPC contract and skip the localized user copy.

Overview

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

WARNING

File Line Issue
apps/mobile/src/lib/kilo-pass/use-store-kilo-pass-purchase.ts 153 Locale-dependent match misses the English backend not-linked error
Files Reviewed (129 files)
  • apps/mobile/src/components/agents/attachment-chip-description.ts
  • apps/mobile/src/components/agents/chat-composer.tsx
  • apps/mobile/src/components/agents/chat-link-actions.test.ts
  • apps/mobile/src/components/agents/chat-link-actions.ts
  • apps/mobile/src/components/agents/chat-markdown-text.tsx
  • apps/mobile/src/components/agents/new-session-prompt.tsx
  • apps/mobile/src/components/agents/use-remote-spawn-dispatch.test.ts
  • apps/mobile/src/components/kilo-chat/use-message-input-clipboard-image-hint.ts
  • apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.test.ts
  • apps/mobile/src/components/security-agent/audit-report-screen.tsx
  • apps/mobile/src/components/security-agent/dashboard-screen.mounted.test.tsx
  • apps/mobile/src/components/security-agent/dashboard-screen.tsx
  • apps/mobile/src/components/security-agent/dismiss-finding-screen.mounted.test.tsx
  • apps/mobile/src/components/security-agent/dismiss-finding-screen.tsx
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
  • apps/mobile/src/i18n/resolve-language.ts
  • apps/mobile/src/lib/agent-attachments/agent-attachment-types.ts
  • apps/mobile/src/lib/agent-attachments/upload-task.ts
  • apps/mobile/src/lib/agent-attachments/use-agent-attachment-upload.ts
  • apps/mobile/src/lib/agent-attachments/use-clipboard-paste.ts
  • apps/mobile/src/lib/auth/poll-response.ts
  • apps/mobile/src/lib/external-link.ts
  • apps/mobile/src/lib/hooks/use-code-reviewer-repo-selection.ts
  • apps/mobile/src/lib/hooks/use-code-reviewer.ts
  • apps/mobile/src/lib/hooks/use-security-agent-mutations.ts
  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.test.ts
  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts
  • apps/mobile/src/lib/kilo-pass/use-store-kilo-pass-purchase.ts - 1 issue
  • apps/mobile/src/lib/organization-invoice-download.test.ts
  • apps/mobile/src/lib/organization-invoice-download.ts
  • apps/mobile/src/lib/pr-review/merge/use-pr-merge-mutations.ts
  • apps/mobile/src/lib/pr-review/mutation-error-display.ts
  • apps/mobile/src/lib/remote-spawn-admission.test.ts
  • apps/mobile/src/lib/remote-spawn-admission.ts
  • apps/mobile/src/lib/ui-deadline.ts
  • apps/mobile/src/lib/voice-input/use-voice-input-actions.ts
  • apps/mobile/src/lib/voice-input/use-voice-input-feedback.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-feedback.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.ts
  • apps/mobile/src/lib/voice-input/voice-input-state.ts
  • tools/oxlint/no-literal-copy/allowlist.json
  • tools/oxlint/no-literal-copy/index.ts

Fix these issues in Kilo Cloud

Previous review (commit 17f711a)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental commit 17f711aa4 localizes remaining hard-coded mobile copy, Chinese voice-region mapping, and FormatJS prewarm error handling with no new high-confidence defects; prior %% and voice-region warnings stay fixed.

Files Reviewed (116 files)
  • apps/mobile/src/app/(app)/(tabs)/(2_agents)/index.tsx
  • apps/mobile/src/components/kiloclaw/status-card.tsx
  • apps/mobile/src/components/organization/invited-member-row-state.ts
  • apps/mobile/src/components/pr-review/discussion/reaction-picker-sheet.tsx
  • apps/mobile/src/components/pr-review/merge/pr-merge-icons.tsx
  • apps/mobile/src/components/pr-review/merge/pr-merge-sheet-parts.tsx
  • apps/mobile/src/components/security-agent/audit-report-screen.tsx
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
  • apps/mobile/src/lib/agent-attachments/use-agent-attachment-upload.ts
  • apps/mobile/src/lib/agent-attachments/validate.ts
  • apps/mobile/src/lib/auth/device-auth-poll.ts
  • apps/mobile/src/lib/auth/poll-response.ts
  • apps/mobile/src/lib/auth/use-device-auth.ts
  • apps/mobile/src/lib/format.ts
  • apps/mobile/src/lib/hooks/use-kiloclaw-mutations.ts
  • apps/mobile/src/lib/hooks/use-model-preferences.ts
  • apps/mobile/src/lib/hooks/use-organization-mutations.ts
  • apps/mobile/src/lib/hooks/use-security-agent-commands.ts
  • apps/mobile/src/lib/hooks/use-session-mutations.ts
  • apps/mobile/src/lib/intl-cache.test.ts
  • apps/mobile/src/lib/intl-cache.ts
  • apps/mobile/src/lib/pr-review/discussion/reaction-pills.test.ts
  • apps/mobile/src/lib/pr-review/discussion/reaction-pills.ts
  • apps/mobile/src/lib/pr-review/discussion/review-discussion-types.ts
  • apps/mobile/src/lib/pr-review/merge/merge-blocked-reasons.ts
  • apps/mobile/src/lib/pr-review/merge/use-pr-merge-mutations.ts
  • apps/mobile/src/lib/pr-review/use-pr-review-mutations.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.ts
  • tools/oxlint/no-literal-copy/index.ts

Previous review (commit b07a6e8)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental commit b07a6e887 closes remaining i18n gaps (pt-PT vs pt-BR, Chinese voice-script matching, localized labels, FormatJS prewarm) with no new high-confidence defects; prior %% and voice-region warnings stay fixed.

Files Reviewed (107 files)
  • apps/mobile/src/app/_layout.tsx
  • apps/mobile/src/components/kiloclaw/changelog-list.tsx
  • apps/mobile/src/components/kiloclaw/status-card.tsx
  • apps/mobile/src/components/security-agent/dashboard-screen.mounted.test.tsx
  • apps/mobile/src/components/security-agent/dashboard-screen.tsx
  • apps/mobile/src/i18n/apply-language.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
  • apps/mobile/src/lib/agent-session-groups.ts
  • apps/mobile/src/lib/device-sessions.ts
  • apps/mobile/src/lib/format.test.ts
  • apps/mobile/src/lib/format.ts
  • apps/mobile/src/lib/formatjs-locale-data.ts
  • apps/mobile/src/lib/intl-cache-hermes-numberformat.test.ts
  • apps/mobile/src/lib/intl-cache.ts
  • apps/mobile/src/lib/model-picker-rows.test.ts
  • apps/mobile/src/lib/model-picker-rows.ts
  • apps/mobile/src/lib/pr-review/diff/pr-review-truncation.ts
  • apps/mobile/src/lib/relative-time-locales.ts
  • apps/mobile/src/lib/use-session-model-options.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.ts

Previous review (commit 7801cc0)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental commit 7801cc016 fixes both prior warnings (%% a11y interpolation and voice-input region matching) and the remaining locale-formatting changes introduce no new high-confidence defects.

Files Reviewed (136 files)
  • apps/mobile/package.json
  • apps/mobile/src/components/agents/attachment-preview-strip.test.ts
  • apps/mobile/src/components/agents/blocking-card-state.ts
  • apps/mobile/src/components/agents/child-session-section.tsx
  • apps/mobile/src/components/agents/context-usage-display.test.ts
  • apps/mobile/src/components/agents/preparation-group.tsx
  • apps/mobile/src/components/agents/session-context-sheet.tsx
  • apps/mobile/src/components/agents/session-list-helpers.ts
  • apps/mobile/src/components/agents/session-list-section-header.tsx
  • apps/mobile/src/components/agents/tool-card-display.ts
  • apps/mobile/src/components/code-reviewer/platform-overview-rows.ts
  • apps/mobile/src/components/code-reviewer/review-detail-screen.tsx
  • apps/mobile/src/components/kilo-chat/message-attachment-state.ts
  • apps/mobile/src/components/kilo-chat/message-reaction-pills.tsx
  • apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.tsx
  • apps/mobile/src/components/kiloclaw/billing-banner.tsx
  • apps/mobile/src/components/kiloclaw/onboarding/provisioning-step.tsx
  • apps/mobile/src/components/organization/org-kilo-pass-row-state.ts
  • apps/mobile/src/components/pr-review/diff/pr-diff-hunk-rows.tsx
  • apps/mobile/src/components/pr-review/discussion/reactions-row.tsx
  • apps/mobile/src/components/pr-review/discussion/thread-diff-snippet.tsx
  • apps/mobile/src/components/pr-review/pr-review-checks-section.tsx
  • apps/mobile/src/components/pr-review/pr-review-submit-view.ts
  • apps/mobile/src/components/security-agent/audit-report-screen.mounted.test.tsx
  • apps/mobile/src/components/security-agent/audit-report-screen.tsx
  • apps/mobile/src/components/security-agent/dashboard-screen.tsx
  • apps/mobile/src/components/security-agent/dashboard-sections.tsx
  • apps/mobile/src/components/security-agent/finding-analysis-panel.tsx
  • apps/mobile/src/components/security-agent/finding-remediation-panel.tsx
  • apps/mobile/src/components/security-agent/settings-overview-screen.tsx
  • apps/mobile/src/components/share/share-payload-preview.tsx
  • apps/mobile/src/i18n/label-reference.test.ts
  • apps/mobile/src/i18n/locales/*.json (87 catalogs)
  • apps/mobile/src/lib/agent-attachments/use-agent-attachment-upload.ts
  • apps/mobile/src/lib/format.test.ts
  • apps/mobile/src/lib/format.ts
  • apps/mobile/src/lib/hooks/use-kiloclaw-billing.ts
  • apps/mobile/src/lib/intl-cache.test.ts
  • apps/mobile/src/lib/intl-cache.ts
  • apps/mobile/src/lib/kilo-pass/subscription-card-state.ts
  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts
  • apps/mobile/src/lib/model-cost.ts
  • apps/mobile/src/lib/model-picker-rows.ts
  • apps/mobile/src/lib/platform-label.ts
  • apps/mobile/src/lib/tab-bar-layout.ts
  • apps/mobile/src/lib/use-kiloclaw-billing.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.test.ts
  • apps/mobile/src/lib/voice-input/voice-input-language.ts
  • pnpm-lock.yaml
  • tools/i18n/check-catalogs.mjs

Previous review (commit 122aac9)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

formatPercent is interpolated into a catalog string that already has %, producing a doubled percent in the context-usage accessibility label.

Overview

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

WARNING

File Line Issue
apps/mobile/src/components/agents/context-usage-display.ts 214 formatPercent already includes %, so tokensUsage becomes 42%%
apps/mobile/src/lib/voice-input/voice-input-language.ts 125 Region-less appLanguage is tried first, so device tags like en-GB never refine STT
Files Reviewed (176 files)
  • apps/mobile/package.json
  • apps/mobile/src/app/(app)/kiloclaw/[instance-id]/billing.tsx
  • apps/mobile/src/app/(app)/kiloclaw/[instance-id]/settings/device-pairing.tsx
  • apps/mobile/src/components/agents/attachment-chip-description.ts
  • apps/mobile/src/components/agents/child-session-section.tsx
  • apps/mobile/src/components/agents/context-usage-display.test.ts
  • apps/mobile/src/components/agents/context-usage-display.ts - 1 issue
  • apps/mobile/src/components/agents/markdown-a11y.test.ts
  • apps/mobile/src/components/agents/markdown-a11y.ts
  • apps/mobile/src/components/agents/markdown-palette.ts
  • apps/mobile/src/components/agents/markdown-table.test.ts
  • apps/mobile/src/components/agents/markdown-table.tsx
  • apps/mobile/src/components/agents/message-details-content.ts
  • apps/mobile/src/components/agents/model-selector.tsx
  • apps/mobile/src/components/agents/part-renderer.tsx
  • apps/mobile/src/components/agents/permission-card.tsx
  • apps/mobile/src/components/agents/preparation-group.tsx
  • apps/mobile/src/components/agents/question-card.tsx
  • apps/mobile/src/components/agents/read-tool-markdown.ts
  • apps/mobile/src/components/agents/session-context-sheet.tsx
  • apps/mobile/src/components/agents/session-list-helpers.ts
  • `apps/mobile/src/components/agents/session-pagination-head

[Snapshot truncated.]

Additional previous summary content was truncated to keep this comment within platform limits.


Reviewed by grok-4.6 · Input: 240.6K · Output: 7.9K · Cached: 463.7K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic changed the title fix(mobile): polyfill relative time on Hermes fix(mobile): make Intl formatting Hermes-safe Aug 25, 2026
Comment thread apps/mobile/src/components/agents/context-usage-display.ts
Comment thread apps/mobile/src/lib/voice-input/voice-input-language.ts Outdated
@iscekic iscekic changed the title fix(mobile): make Intl formatting Hermes-safe fix(mobile): make i18n formatting Hermes-safe Aug 25, 2026
Move every remaining English UI string into the catalog, and fix the
formatting bugs the i18n audit found.

Copy: GitHub install alerts, merge-blocked reasons, merge method labels,
screen-reader announcements, reaction labels, thread anchor labels,
attachment validation copy, mutation error fallbacks, Security Agent
command toasts, and device sign-in errors. 72 new keys, translated into
all 87 catalogs.

Formatting:
- The audit report labels its dates UTC, so format them in UTC.
- Format gigabytes with the unit formatter, and vCPU from the catalog.
- Read the Security Agent severity from the SLA keys, not capitalize().
- Treat zh-TW, zh-HK, and zh-MO as Traditional Chinese for voice input.
- Ensure NumberFormat before the RelativeTimeFormat polyfill, which
  constructs one internally.
- Never let a prewarm failure throw; it is only a cache fill, and a throw
  keeps the splash screen up forever.

Guard: no-literal-copy now flags announceForA11y literals and the
`error.message || 'English'` fallback shape, so neither can come back.

Also delete resolveVoiceInputLanguageTag, which has no caller.
Move the rest of the mobile app's English strings into the catalog, and fix
the four bugs the audit round confirmed.

Copy: attachment upload failures, voice-input feedback, pull request
mutation errors, external-link and invoice and remote-spawn toasts, Kilo
Pass purchase errors, Code Reviewer errors, and Security Agent mutation
copy. 43 new keys, translated into all 87 catalogs.

Bugs:
- The audit report labelled its event times UTC but rendered them in the
  device time zone. One call site was missed last round.
- poll-response.ts held two English sign-in errors.
- The merge announcement spelled English although its catalog keys existed.
- Voice input picked the wrong script for a region-only tag: zh-MY, sr-RS,
  pa-PK, and az-IR all resolved wrongly. Chinese now follows the same rule
  resolve-language.ts already states, and a small region map covers sr, pa,
  az, and uz.
- Six catalog values had come back in English (fil, mg, ms, so).

Guard: no-literal-copy now reads a conditional expression, so a ternary can
no longer hide copy. That change alone found three more English leaks, all
fixed here. KiloClaw is allowlisted as a brand name.

Copy that lived in a module-level constant now resolves per call, so an
in-place language change no longer leaves stale words on screen.
Comment thread apps/mobile/src/lib/kilo-pass/use-store-kilo-pass-purchase.ts Outdated
The largest remaining English surface came from `packages/app-shared`, which
web reads directly. Web has no translations, so the shared modules keep every
English string exactly as it is. Mobile now maps the stable code each module
already carries — an analysis state, a status, a severity, a reason — onto a
catalog key, and renders the translated word.

Surfaces: every finding row, analysis panel, remediation panel, details panel,
dashboard metric, and Code Reviewer status badge. 120 new keys, translated
into all 87 catalogs.

The deadline copy is computed from dates, so it carries no code to map.
`getSecurityDeadlinePresentation` now also returns a `state` union naming the
branch and the values the copy needs. The field is additive: web keeps reading
`label` and `detail`, and app-shared's own tests still pass. Mobile renders
from `state` and formats each date in the active language.

Day counts use plural keys, with the categories each language needs rather
than English's two.

Also localize the pull request submit block reason, and bump the app to 1.0.6.
The backend sends its purchase errors in English whatever the app's language
is, so the mobile match must compare English, not a translated catalog value.
The last commit translated one of the two matched constants, which made the
remapping silently skip in every other language and showed the raw English
server text instead.

Both matched constants are English again, and a comment names them as the
backend contract. Only the copy the user reads is translated. The
owned-by-another-account sentence is now the key
`kiloPass.purchaseOwnedByAnotherAccount`, and the contract sentence is no
longer a catalog key at all.

Reported by Kilo Code review on PR 5478.
The finding details panel mapped a severity and a lifecycle status onto a
catalog key, and fell back to the word "Unknown" when the backend sent a value
the app does not know yet. packages/app-shared renders the raw code there, so
web shows the new value and mobile hid it.

Fall back to the raw code, the same way the shared module does.
`capitalize()` on a database code reads as English in all 87 languages. It
was the app's largest systemic i18n gap: severity, review style, gate
threshold, focus area, analysis mode, thinking effort, subscription plan, and
invoice status all rendered an English word this way.

Each of those now maps its code to a catalog key, and falls back to the raw
code when the backend sends a value the app does not know yet, the same way
packages/app-shared renders it for web.

Also localized, all reaching the user as English before:
- the four pull request retry toasts and the merge-result default
- the Code Reviewer needs-attention banner
- the Security Agent command failure toasts
- the Kilo Pass App Store errors
- the Added / Deleted / Context words a screen reader speaks per diff line
- a set of smaller toasts and fallback labels

82 new keys, translated into all 87 catalogs. packages/app-shared is
unchanged, so web keeps every English string it reads today.
A final sweep found six English strings hiding in shapes the lint rule cannot
see. All six reach a user.

- The pull request ledger re-wrapped its ambiguous and persistence markers for
  display. The marker is also a server contract the sheets classify against,
  so the kind now travels on the error object and the message is translated.
  Comparing the message alone would have broken pr-merge-sheet.tsx:220 and
  reply-input.tsx:184.
- A deleted GitHub account showed as the literal `deleted user`.
- A screen reader spoke `cost` before every session row's price.
- A screen reader spoke `line N` and `(empty)` on every pull request diff line.
- The force-update screen named `app store page` in its failure toast.
- A non-Error FORBIDDEN throw fell back to the word `Forbidden`.

10 new keys, translated into all 87 catalogs.
A chat 401 or 403 toasted the English words "Not allowed" in every language,
and the message-length and empty-message phrases read English too. A reply
preview to an attachment with no filename showed "Image" or "Attachment".

packages/kilo-chat is shared with the web app, which has no translations, so
its English is untouched: `formatKiloChatError` and `contentBlocksPreviewText`
return byte-for-byte what web reads today. Both now build that English from a
new exported classifier, and mobile maps the classifier's stable kind onto a
catalog key.

A server-phrased error still shows the server's own message rather than the
caller's generic fallback, so nothing is lost when the backend explains
what went wrong.

Also translate the pull request ledger markers in the inline error boxes.
The toast already read the translated message, but the composer, submit
sheet, and reply box each spelled the English constant.

Six new keys, translated into all 87 catalogs.
Six places passed a catalog key where the copy belonged, so the user read
`securityAgent.analysisMode.automatic` instead of `Automatic`. The Code
Reviewer option lists render `labels[option]` verbatim, and the Security Agent
badges and rows rendered the lookup result directly.

Fixed the analysis mode row, the gate and style option lists, the dismissal
reason, and both remediation status badges.

Reported by Kilo Code review on PR 5478.
@iscekic

iscekic commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Final i18n sweep verdict, with one finding rejected.

FixedInitializing snapshot… (compute-status.ts:25) reached the agent-chat working indicator and child-session cards in English. The literal stays pinned for matching the CLI's typography; the shown text is now a catalog key.

Fixed — the three pinned remote-session exit messages (exit-remote-session-with-feedback.ts:39-49) were toasted verbatim. They are a producer/consumer contract with the SDK, so they are still matched in English, and only the copy the user reads is translated.

Rejected — the StoreKit refund toasts in dev-storekit-refund.ts:48-49. The refund button is gated behind __DEV__ at kilo-pass-subscription-card.tsx:38, so no production user can reach them. Translating them into 87 catalogs adds 174 strings that ship in every build and no reader ever sees. Consistent with the other dev-only exclusions in this branch.

The agent-chat working indicator and the child-session cards showed
"Initializing snapshot…" in English while a CLI snapshot started. The literal
stays pinned so it still matches the CLI's own typography; only the text the
user reads comes from the catalog now.

The three remote-session exit errors were toasted verbatim. They are a pinned
producer/consumer contract with the SDK, so they are still matched in English
and only the shown copy is translated.

The dev-only StoreKit refund toasts stay English on purpose: the button is
gated behind __DEV__, so no production reader can reach them.

Four new keys, translated into all 87 catalogs.
@iscekic
iscekic enabled auto-merge (squash) August 25, 2026 19:39
@iscekic
iscekic merged commit 437992c into main Aug 25, 2026
71 checks passed
@iscekic
iscekic deleted the fix/mobile-undefined-constructor branch August 25, 2026 19:49
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.

2 participants