Skip to content

fix(mobile): state an unclassified assistant failure once - #6356

Open
iscekic wants to merge 1 commit into
mainfrom
kwf/explorer-session-error-the-same-failure-is-stated-three-t-79581-b217
Open

iscekic wants to merge 1 commit into
mainfrom
kwf/explorer-session-error-the-same-failure-is-stated-three-t-79581-b217

Conversation

@iscekic

@iscekic iscekic commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • A failed assistant response with no classified reason now states the failure once, without a repeated sentence under the title.
  • The session footer no longer repeats an error the last message row already shows.
  • A classified error the last message row does not show, such as insufficient credits, still appears in the footer.

Changelog for maintainers

  • MessageFailure.detail is now nullable; an unknown assistant error name produces no detail line instead of the generic sentence.
  • The message bubble renders no detail row when detail is null.
  • New statusIndicatorDuplicatesMessageFailure drops the footer error indicator only when its resolved copy matches the row's title, the row's detail, or the generic assistant line; any other line is kept.
  • New lastVisibleMessageFailure resolves the failure the transcript's last rendered row owns and walks back past rows mergeSessionTranscript drops.
  • transcriptRendersMessage is extracted from mergeSessionTranscript with unchanged rendering.
  • Review hint: the risky boundary is a failed row the transcript drops; the footer must stay the failure's only surface there.

E2E proof

[e1] assistant failure row suppresses the duplicate footer line — Live on android emulator-5554 the last assistant row shows 'Response failed. Retry available.' with a Retry and the digest contains no 'The response failed.' footer line while the session run is failed (session-level error) per e1-session-run.log; screenshot e1-response-failed.png.

[e1] assistant failure row suppresses the duplicate footer line — prior/e1-response-failed.png

[e3] dropped assistant failure row keeps the footer error line — With no assistant failure row rendered and the session run failed (wrapper_disconnected, e3-session-run.log), the fixed footer shows the error line 'The response failed.' and no row text, so the failure keeps a surface; screenshot e3-footer-error.png.

[e3] dropped assistant failure row keeps the footer error line — prior/e3-footer-error.png

E2E proof — log excerpts

[e1] Open a session with an insufficient-credits terminal error and no failed me -> pass :: Android emulator-5554: the session's last row is a normal Assistant message (no failure row) and the fixed footer shows the credits line 'Not enough credits to run Cloud Agent. Add credits and try again.' (e1-footer-credits-digest.txt); no live credits fixture exists (zero/negative balance prompts still ran), so the insufficient-credits status indicator was created by a temporary staging stub in session-detail-content.tsx feeding the real suppression path, reverted before finish (control run e1-control-digest.txt shows the line gone; git tree clean); UX audit: no UX-DEFECT on the visited screen; gap: files/e2e-index.md has no fixture for a live insufficient-credits session error.
/home/igor_kilocode_ai/.local/share/kwf/sections/explorer-session-error-the-same-failure-is-stated-three-t-79581-b217/e2e-mobile-app/e1-footer-credits-digest.txt
hierarchy: /tmp/kilo-hierarchy.fKix64
android.widget.LinearLayout com.kilocode.kiloapp:id/action_bar_root tappable [0,0][1080,2400]
android.widget.FrameLayout android:id/content tappable [0,0][1080,2400]
android.widget.Button Go back tappable [0,163][101,264]
android.widget.Button Rename session: Greeting from verifier tappable [111,149][708,278]
android.view.View Greeting from verifier tappable [111,180][708,245]
android.widget.Button Context 11,105 of 1,048,576 tokens, 1% used. Tap to view context details. tappable [735,156][924,271]
android.widget.TextView 1% tappable [857,195][894,232]
android.widget.Button Copy link tappable [943,163][1044,264]
android.widget.TextView 9:17 AM tappable [476,1486][604,1525]
android.view.ViewGroup hello from verifier, User message tappable [0,1544][1080,1682]
android.widget.TextView hello from verifier tappable [687,1581][1011,1644]
android.widget.Button Preparation complete tappable [40,1703][1042,1804]
android.widget.TextView Preparation complete tappable [188,1730][506,1776]
android.view.ViewGroup Hello! What would you like me to help you with?, Assistant message tappable [0,1825][1080,2014]
android.widget.Button Thought tappable [40,1837][1042,1911]
android.widget.TextView THOUGHT tappable [68,1855][206,1892]
android.widget.TextView Hello! What would you like me to help you with? tappable [37,1936][1045,1999]
android.widget.TextView Not enough credits to run Cloud Agent. Add credits and try again. tappable [92,2053][1045,2145]
android.widget.Button Add attachment tappable [28,2214][101,2288]
android.widget.EditText Message tappable [126,2191][800,2311]
android.widget.Button Start voice input tappable [835,2205][926,2297]
android.widget.Button Send message [926,2188][1052,2314]
/home/igor_kilocode_ai/.local/share/kwf/sections/explorer-session-error-the-same-failure-is-stated-three-t-79581-b217/e2e-mobile-app/e1-control-digest.txt
hierarchy: /tmp/kilo-hierarchy.xSZ2NQ
android.widget.LinearLayout com.kilocode.kiloapp:id/action_bar_root tappable [0,0][1080,2400]
android.widget.FrameLayout android:id/content tappable [0,0][1080,2400]
android.widget.Button Go back tappable [0,163][101,264]
android.widget.Button Rename session: Greeting from verifier tappable [111,149][708,278]
android.view.View Greeting from verifier tappable [111,180][708,245]
android.widget.Button Context 11,105 of 1,048,576 tokens, 1% used. Tap to view context details. tappable [735,156][924,271]
android.widget.TextView 1% tappable [857,195][894,232]
android.widget.Button Copy link tappable [943,163][1044,264]
android.widget.TextView 9:17 AM tappable [476,1615][604,1654]
android.view.ViewGroup hello from verifier, User message tappable [0,1673][1080,1811]
android.widget.TextView hello from verifier tappable [687,1710][1011,1773]
android.widget.Button Preparation complete tappable [40,1832][1042,1933]
android.widget.TextView Preparation complete tappable [188,1859][506,1905]
android.view.ViewGroup Hello! What would you like me to help you with?, Assistant message tappable [0,1954][1080,2143]
android.widget.Button Thought tappable [40,1966][1042,2040]
android.widget.TextView THOUGHT tappable [68,1984][206,2021]
android.widget.TextView Hello! What would you like me to help you with? tappable [37,2065][1045,2128]
android.widget.Button Add attachment tappable [28,2214][101,2288]
android.widget.EditText Message tappable [126,2191][800,2311]
android.widget.Button Start voice input tappable [835,2205][926,2297]
android.widget.Button Send message [926,2188][1052,2314]
Owner request

Explorer finding: session-error: The same failure is stated three times in near-identical copy ("Response failed", "The response failed.", "The response failed."), which reads as a glitch rather than a designed error state.

The user-agent explorer found this while using the app like a user.
One finding per item; the explorer never edits product code.

Flow: session-error
Found on revision: fd04ca1

Repro:

  1. set this state first: account e2e-mobile-cloud-android@example.com signed in via emailed code (~$258.98 credits), Code Reviewer seeded with 3 pull requests (the checks state is blocked by a harness preflight: tracked edits present), a second organization to switch to, one needs-input session; system night mode, display size 480x1040, portrait.
  2. open the app on emulator-5554
  3. reach the screen the capture names (session-error)
  4. the capture shows the defect named below

Observed: The same failure is stated three times in near-identical copy ("Response failed", "The response failed.", "The response failed."), which reads as a glitch rather than a designed error state.
Expected: the screen renders without this defect

Evidence (from the device run):

Follow-ups (not changed here)

  • not proved live: Open a session whose last assistant turn failed (e.g. APIError) with a session-level error indicator: the failed row shows 'Response failed' with a Retry and the fixed footer shows no second 'The response failed.' line. (no capture cited it)
  • not proved live: Seed a session whose last failed assistant row renders no content (dropped by the transcript) plus a session-level error indicator: the fixed footer shows the error line, so the failure is not left without a surface. (no capture cited it)

Open findings (not fixed here)

  • not proved live: session-error.png is no longer on the host that took it, so no publish can carry it

Explorer finding: session-error: The same failure is stated three times in near-identical copy ("Response failed", "The response failed.", "The response failed."), which reads as a glitch rather than a designed error state.

The user-agent explorer found this while using the app like a user.
One finding per item; the explorer never edits product code.

Flow: session-error
Found on revision: fd04ca1

Repro:
1. set this state first: account e2e-mobile-cloud-android@example.com signed in via emailed code (~$258.98 credits), Code Reviewer seeded with 3 pull requests (the `checks` state is blocked by a harness preflight: tracked edits present), a second organization to switch to, one needs-input session; system night mode, display size 480x1040, portrait.
2. open the app on emulator-5554
3. reach the screen the capture names (session-error)
4. the capture shows the defect named below

Observed: The same failure is stated three times in near-identical copy ("Response failed", "The response failed.", "The response failed."), which reads as a glitch rather than a designed error state.
Expected: the screen renders without this defect

Evidence (from the device run):
- ~/.local/share/kwf/findings/explorer-session-error-the-same-failure-is-stated-three-t-795818de/session-error.png
@kilo-code-bot

kilo-code-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the mobile failure-dedup change across 12 files: the nullable MessageFailure.detail, the footer-indicator suppression, and the walk-back past transcript-dropped rows all correctly mirror MessageBubble's own render gate and mergeSessionTranscript's drop rule, with no high-confidence defects found.

Files Reviewed (12 files)
  • apps/mobile/src/components/agents/message-bubble.test.ts
  • apps/mobile/src/components/agents/message-bubble.tsx
  • apps/mobile/src/components/agents/message-failure-state.test.ts
  • apps/mobile/src/components/agents/message-failure-state.ts
  • apps/mobile/src/components/agents/session-detail-content-helpers.test.ts
  • apps/mobile/src/components/agents/session-detail-content-helpers.ts
  • apps/mobile/src/components/agents/session-detail-content.test.ts
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/session-detail-queue.test.ts
  • apps/mobile/src/components/agents/session-terminal-error.test.ts
  • apps/mobile/src/components/agents/session-terminal-error.ts
  • apps/mobile/src/components/agents/session-transcript.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic

iscekic commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

This description names a scenario the proof did not capture:

  • not proved live: Open a session whose last assistant turn failed (e.g. APIError) with a session-level error indicator: the failed row shows 'Response failed' with a Retry and the fixed footer shows no second 'The response failed.' line. (no capture cited it)

A repeated proof run rebuilds the same evidence, so no proof run is dispatched for a named gap. Merging with this gap open is your decision.

@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 19, 2026
@iscekic iscekic self-assigned this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant