fix(mobile): render typed failure copy and one row per submission - #6209
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe follow-up commit resolves all four prior findings: it restores the Durable Object's Files Reviewed (8 files)
Previous Review Summary (commit 4be8859)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4be8859)Status: 4 Issues Found | Recommendation: Address before merge Executive SummaryThe shared SDK now collapses every failed delivery to one fixed status string, which silently degrades the web and browser-extension status surfaces (including the extension's credits affordance), while the mobile status slot re-maps the SDK's own accurate status copy to a generic failure line. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (25 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
9c1ef64 to
f01f12b
Compare
Changelog for users
Changelog for maintainers
apps/mobile/src/components/agents/session-status-indicator.tsx:37— accepted. The error branch maps its message throughsessionStatusErrorMessage, and the SDK's own fixed lines (Agent connection lost,Session terminated,Failed to stop execution) matched no classifier rule, so each rendered the generic assistant-failure line. Added anSDK_FIXED_ERROR_MESSAGESallowlist insession-terminal-error.tsthat returns those three unchanged; the warning indicator still renders the fixed retrying copy.packages/cloud-agent-sdk/src/service-state.ts:675— accepted, also line 688. Restoredevent.error, the Durable Object's safe projection, for both the stale-preparing status and the terminal settlement status, so web and the extension keep the specific reason and the extension's credits detection matches again. Removed the fixed delivery-status constant.apps/mobile/src/components/agents/session-terminal-error.ts:129— accepted. The delivery special case matched onlyMessage failed to deliver; the status stringMessage delivery failedfell through to the generic line. It now matches both strings and returns the delivery copy.apps/mobile/src/components/agents/session-transcript.ts:109— accepted.!message.parts.some(partRendersContent)is redundant with the outermessageRendersContentgate: a synthetic row whose parts render nothing is dropped there anyway. Replaced it withmessage.parts.length === 0and corrected the comment; the rendered rows are unchanged.synthetic: true; the ingest contract declares the optional flag so a round-trip preserves it.retryMessageAndClearis replaced byretryFailedMessage; a re-send no longer clears the failed row, which keeps its delivery state and footer.selectMessageFailuregains acopyDetail(empty for assistant failures); the failure footer still renders typed copy only, and the select-text view still shows the prompt alone.syntheticlifetime; the assistant treatment needed no production change, and tests now pin its streaming, empty and undefined-role cases.event.erroras the status message, and the mobile suites pin the three fixed SDK lines and both delivery strings.Reviewer facts (production record)
cli_sessions_v2withstatusidle; report 2 was created 22:15:47.336Z and last updated 22:26:17.129Z, sandboxses-5092b0e42508979ef156795ae2fc3f4b20a293097cd9dc9a.cloud_agent_session_runsshows four completed runs then three FAILED runs for report 2; each carriesfailure_codeunclassifiedand "Run failed without a classified cause".cloudflare-logpushshowsPOST /trpc/sendMessageV2at 22:25:21.412Z, 22:25:57.431Z and 22:25:59.068Z, each followed by "Sending V2 message to existing session"; the send path returned no 401.session.promptreceived andprompt_completedfor all three prompts, then "outcome":"rejected", "reason":"event_batch_rejected", "rejectedCount": 732 (report 1 reaches 18150).common.continuelabel and test fixtures contain it.E2E proof
p1-run2.mp4.trim.mp4
e3-dark.mp4.trim.mp4
e3-stream.mp4.trim.mp4
https://github.com/user-attachments/assets/fc221fc7-2a3e-42c4-ad0a-ae556a2997ad
Owner request
E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/e3-extension-e2e.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/e3-extension-credits-packed.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/e3-sdk-packed.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/e3-sdk-prefix-differential.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/e3-credits-reachability.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/e3-extension-credits-prefix.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-cli/runbook-probe.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-51eb/e2e-mobile-app/e1-scene8.log