Skip to content

Show error state in conversation details panel when run API fetch fails#10765

Draft
bnavetta wants to merge 2 commits into
masterfrom
oz-agent/conversation-detail-panel-fetch-error
Draft

Show error state in conversation details panel when run API fetch fails#10765
bnavetta wants to merge 2 commits into
masterfrom
oz-agent/conversation-detail-panel-fetch-error

Conversation

@bnavetta
Copy link
Copy Markdown
Contributor

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 RunDetailPane for similar failures.

Changes

  • agent_conversations_model.rs: Added is_task_fetch_failed() public method that checks task_fetch_state to determine if the most recent fetch ended in a permanent or transient failure
  • conversation_details_panel.rs: Added fetch_error field to ConversationDetailsData; from_task_id now accepts a fetch_failed bool to populate it. The render method shows an error banner when fetch_error is Some
  • view_impl.rs: When get_or_async_fetch_task_data returns None, checks is_task_fetch_failed and passes the result to from_task_id
  • wasm_view.rs: Same error propagation for the WASM transcript details panel path

Linked Issue

  • n/a (Slack request from fa-platform)

Testing

  • Verified compilation with cargo check --package warp
  • Verified formatting with cargo fmt

Screenshots / Videos

n/a - error state cannot easily be triggered locally without a server-side failure

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI 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.

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>
@cla-bot cla-bot Bot added the cla-signed label May 12, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant