Show error state in conversation details panel when run API fetch fails#10765
Draft
bnavetta wants to merge 2 commits into
Draft
Show error state in conversation details panel when run API fetch fails#10765bnavetta wants to merge 2 commits into
bnavetta wants to merge 2 commits into
Conversation
When the /api/v1/agent/runs/ API call fails to load run data, the conversation details panel now displays an error banner with a warning icon and "Failed to load run details" message instead of silently showing an empty panel. Changes: - Added is_task_fetch_failed() to AgentConversationsModel to expose whether a task fetch has failed (permanently or transiently) - Added fetch_error field to ConversationDetailsData, populated when from_task_id is called with a failed fetch state - Renders a red error banner in the panel when fetch_error is set - Updated both native (view_impl.rs) and WASM (wasm_view.rs) callers to check for fetch failure and propagate it to the details panel Co-Authored-By: Oz <oz-agent@warp.dev>
Instead of a generic 'Failed to load run details' message, the error banner now shows the actual error description from the server (e.g. '403 Forbidden', '500 Internal Server Error'). This is done by storing the error message string alongside the timestamp in TaskFetchState and threading it through task_fetch_error() -> from_task_id() -> the UI. Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Description
When the
/api/v1/agent/runs/API call fails while fetching run info for the conversation details panel, the panel now shows an error state instead of silently displaying a bare "Cloud agent run" title with no details.The error is rendered as a red banner with a warning icon and "Failed to load run details" message, placed prominently below the divider. This matches the error pattern already used in the Oz web app's
RunDetailPanefor similar failures.Changes
agent_conversations_model.rs: Addedis_task_fetch_failed()public method that checkstask_fetch_stateto determine if the most recent fetch ended in a permanent or transient failureconversation_details_panel.rs: Addedfetch_errorfield toConversationDetailsData;from_task_idnow accepts afetch_failedbool to populate it. Therendermethod shows an error banner whenfetch_errorisSomeview_impl.rs: Whenget_or_async_fetch_task_datareturnsNone, checksis_task_fetch_failedand passes the result tofrom_task_idwasm_view.rs: Same error propagation for the WASM transcript details panel pathLinked Issue
Testing
cargo check --package warpcargo fmtScreenshots / Videos
n/a - error state cannot easily be triggered locally without a server-side failure
Agent Mode
Conversation: https://staging.warp.dev/conversation/b6e0e0e7-f9c7-45de-b750-20cdc029ad8e
Run: https://oz.staging.warp.dev/runs/019e1dc6-cd84-74b9-a544-8e704c214bd9
This PR was generated with Oz.