Repository navigation
fix(mobile): show localized error details on session start and comment edit - #8090
Conversation
…failures A failed session create printed the server's raw English detail under the localized heading, and the comment-edit sheet showed the raw provider text for a retryable failure. Known failure classes now map to localized, actionable copy and everything else shows the localized generic line; the raw text no longer reaches the UI.
|
bot: Verified on the Android emulator against the local backend. Reproduced the create failure by pressing Start while the fake account had no German: "Die Sitzung konnte nicht erstellt werden." / "Prüfe deinen Zugriff Japanese: 「セッションを作成できませんでした。」 / 「この組織へのアクセス権を確認して、もう一度お試しください。」 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commit resolves both prior findings: Files Reviewed (3 files)
Previous Review Summaries (4 snapshots, latest commit bb2609b)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit bb2609b)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe incremental commit correctly localizes typed Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (89 files)
Fix these issues in Kilo Cloud Previous review (commit 3873c11)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe incremental Maltese copy fix is correct; one prior low-priority finding remains on the comment-edit fall-through, where a typed Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (91 files)
Fix these issues in Kilo Cloud Previous review (commit c6afebb)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe incremental mapping fixes land correctly, but the new Maltese rate-limit copy says "questions" instead of "requests", and a typed Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (91 files)
Fix these issues in Kilo Cloud Previous review (commit 20f8a1b)Status: 6 Issues Found | Recommendation: Address before merge Executive SummaryThe localized error-copy change works mechanically, but the new code mappings now misdiagnose several actionable failures (expired trial, model-catalog denial, GitHub rate limits), and two catalog translations say the wrong thing. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (96 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 38K · Output: 2.1K · Cached: 223K Review guidance: REVIEW.md from base branch |
…-limit copy The organization-access copy keyed on UNAUTHORIZED/FORBIDDEN alone, but those codes also carry trial expiry, model-catalog denials and re-authentication failures; it now keys on the precise denial message, and the unavailable-model rejection maps to the model picker copy. The review retryable fall-through gains a localized rate-limit line so the server's English-only wait window text never reaches the inline box, and three catalogs use their established access terminology for the new key.
…nflict A typed CONFLICT classified as retryable fell through to the connection copy, which misdiagnosed a concurrent update as a transport problem. It now shows localized conflict copy naming the reload-and-retry recovery.
… too The rate-limit and conflict branches sat after the submit return, so a stale review submit still showed connection copy. Both moved ahead of it, and the Oromo conflict line drops a stray letter.
|
bot: Re-verified end to end on the emulator after the message-qualified mapper change. Same local backend, same fake account, same seeded repository snapshot; the create was rejected with the organization-access denial and the inline block shows the localized heading and detail with no raw server text. The later rate-limit and conflict commits (bb2609b, ca0d5dd, 25daed7) do not touch the organization-access path this capture exercises. German: "Die Sitzung konnte nicht erstellt werden." / "Prüfe deinen Zugriff auf diese Organisation und versuche es erneut." Japanese: 「セッションを作成できませんでした。」 / 「この組織へのアクセス権を確認して、もう一度お試しください。」 |




bot: fix(mobile): show localized error details on session start and comment edit
Change
A failed cloud session create printed the server's raw English detail (for
example a credential-proxy or organization-access string) under the localized
failure heading, and the PR comment-edit sheet showed raw provider text for
retryable failures. Both surfaces now select localized, actionable copy and
the raw text never reaches the UI:
cloudPrepareFailureMessage(
apps/mobile/src/components/agents/cloud-prepare-error-display.ts), followingthe mapping pattern of
apps/mobile/src/lib/pr-review/mutation-error-display.ts.It keys on the server's message, not the tRPC code: only the exact
organization-access denial maps to the new "check your access" copy (the same
codes also carry trial expiry, model-catalog denials and re-authentication
failures); the unavailable-model rejection maps to the existing
agentChat.session.modelUnavailablecopy; payment-required maps to theexisting credits copy; every other rejection — including unclassified raw
server details — maps to the existing generic service line. Retry semantics
stay with
isCloudPrepareRetryableError; the operation-key behavior isunchanged.
prepare-agent-session.tsreturns the mapped message instead of the rawerror.message; the new-session inline block renders it.terminal toast instead of the raw message.
mutation-error-display.tsno longer passesrawError.messagethrough:a typed
TOO_MANY_REQUESTSmaps to the new localizedprReview.mutationError.rateLimitedcopy and a typedCONFLICTto the newlocalized
prReview.mutationError.conflictcopy, on all three surfaces(composer, submit, edit-comment — both branches run before the submit
return). Every other retryable failure (codeless transport drop, gateway)
shows the surface's localized line. The designed verbatim paths (ambiguous
and persistence markers, server-sanitized forbidden copy, reconnect notice)
are unchanged.
en.json(agentChat.newSession.checkOrganizationAccess,prReview.mutationError.rateLimited,prReview.mutationError.conflict) plustranslations in the other 86 catalogs (no English duplicated into other
locales). The session-detail surfaces keep their existing error-copy controls,
which are unchanged by this pull request.
Verification
cloud-prepare-error-display.test.ts(message-keyed copyclasses, shaped and direct tRPC error forms, code-alone cases that must NOT
map, generic fallback for unknown and non-error values).
cloud-create-error, mutation-error-display (rate limit and conflict now
expected on all three surfaces), use-new-session-creator, pr-comment-edit-sheet.
Full mobile pure suite passed after the mapper change; the targeted suites
re-ran green after each review fix.
pnpm typecheck,pnpm lint,oxfmt,check:i18n(87 catalogs match),check:pluralsall pass at the final head.End-to-end proof (Android emulator, local backend)
Reproduced on a local stack with a fake account and a seeded repository
snapshot: pressing Start without organization membership makes the backend
reject the create with the organization-access denial. The inline block under
the Start control shows the localized heading and the localized detail in both
languages, with no raw server text (screenshots in the first and latest
comments; captured after the message-qualified mapper change, which is the
commit the organization-access path last changed in):
"Prüfe deinen Zugriff auf diese Organisation und versuche es erneut."
「この組織へのアクセス権を確認して、もう一度お試しください。」
Limitation: the edit-sheet BAD_GATEWAY provider string could not be reproduced
against the local backend (it needs a GitHub credential-service hiccup); its
mapper behavior is covered by the updated unit tests.
Proxy answers
Answer: Class-based actionable copy (organization-access → new "check
your access" key, payment-required → existing credits key, everything else →
existing generic service key).
Answer: Yes, the same mapper now covers the clone path on that screen.
Answer: Localized retryable copy (composer "could not post" key,
edit-comment "couldn't save" key); no raw provider text.
Answer: Full emulator run against the local backend in de and ja, with
screenshots.