Repository navigation
fix(room): report a failed run beside its reply with the run's own notice - #611
Merged
Merged
Conversation
…tice A run that failed after replying showed a red ErrorMessage row under the reply. The row knew only the error text, so it offered no way to view or add the run's note, and it looked like a fresh error on every reload. Layout now places the run's own NoResponseTile after the reply, marked besideReply on RenderedTile. That tile hosts no band (the reply keeps the run's work), and a band keyed by its id reads as unclaimed and goes to the run's last response. NoResponseTileWidget shows only the reason, "View or add a note", the time and a copy button for it, with no second "Assistant" label. With no error text it says "Run failed" rather than "Run failed without a response", which the reply above would contradict. Every failed notice with error text now has a copy button for that text. Error text that is only whitespace counts as none. ErrorMessage remains for the pre-run RUN_ERROR only; runErrorMessageId is removed from soliplex_client (and so from soliplex_agent, which re-exports it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 1 of #602 (thread replay parity): failure notice beside the reply.
A run that failed after replying used to show a red
ErrorMessagerow underthe reply. That row knew only the error text, so it offered no way to view or
add the run's note, and it read as a fresh error on every reload. Now the run
reports itself with its own outcome tile, the same muted notice every other
outcome uses:
Red stays where it means "this just happened": the live, dismissible banner
above the input, unchanged.
Changes
lay_out_timeline.dart:_guaranteeATilePerRunplaces the run'sNoResponseTileafter the reply instead of minting anErrorMessage, andreturns the ids it placed beside a reply.
RenderedTilegainsbesideReply._placeBandsuses onehostsBandrule, so a tile beside areply never hosts a band, and a band keyed by its id reads as unclaimed and
goes to the run's last response.
NoResponseTileWidget/MessageTile: takebesideReply(required, onecaller each). Beside a reply the tile shows only the reason, the note
button, the time and the copy button, with no second "Assistant" label.
With no error text it says "Run failed", because "Run failed without a
response" would contradict the reply above it. Whitespace-only text
counts as no text.
its run, has a copy button that copies the error text without the
"Run failed:" label.
runErrorMessageIdand the code that minted it are removed.ErrorMessageremains for the pre-runRUN_ERRORonly.(
run_ending.dart_park, theNoResponseTileclass doc, layout docs).Breaking / behaviour notes
runErrorMessageIdis no longer exported fromsoliplex_clientorsoliplex_agent(CHANGELOG).messages" divider once after updating: its saved position names
run-error-<run>, which no tile carries any more. New positions aresaved from the same layout the screen draws, so the divider works for
them (CHANGELOG).
Tests
mainfirst: the layout puts the notice after the reply, not anErrorMessage. The timeline renders the failure through the noticeunder a single author label.
that shape against the real producers: a whitespace response after a
tool result, then a failure.
stays off the beside path and keeps its band.
lay_out_timeline_test;derived_timeline_integration_test(both failure tests);live_reload_parity_test(record destructuring);message_tile_testandno_response_tile_widget_test(newparameter).
passed without the change. Each of the rules above was checked by
breaking it in production code; a test went red every time.
Test Plan
flutter analyze --fatal-infos: no issues--exclude-tags golden): 2961 passsoliplex_client1848 andsoliplex_agent574 pass(
--exclude-tags integration)CHANGELOG.mdswitching threads and back:
runerror: band on the reply, muted notice, note button, copy (copies"Injected failure"), red banner live.
cutoff: live, the partial reply plus the notice beside it. Reloadstill drops the partial reply (unchanged; PR 4 of Thread-history replay duplicates the live run path's citation and drop handling #602), so the
notice stands in with band, note and copy.
chatroom: reply, band and 2 sources identicallive and reopened.
Found while testing, not changed here
ag_ui's decoder rejects aRUN_ERRORwith an emptymessage(
requireNonEmpty), so such a run reads as cut off, not failed.RUN_ERRORnotice has no time live, and on reload is dated atrun start (before its reply). PRs 4–5 of Thread-history replay duplicates the live run path's citation and drop handling #602 fix this.
"Copy". This applies to replies and the pre-run row as well, so it is not
new here.
thread_view_state_test's "a send from a disposed view does not throw"still prints its known "read after disposed" warning.
Related Issues
Part of #602
🤖 Generated with Claude Code