Skip to content

fix: emit ConversationsLoaded on initial fetch failure to unblock loading UI#10993

Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
fix/ambient-agents-loading-stuck-on-failure
Draft

fix: emit ConversationsLoaded on initial fetch failure to unblock loading UI#10993
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
fix/ambient-agents-loading-stuck-on-failure

Conversation

@warp-dev-github-integration
Copy link
Copy Markdown

Description

Fix the agent management view getting stuck on "Loading agents..." when the initial fetch of ambient agent tasks fails.

In AgentConversationsModel::fetch_ambient_agent_tasks_and_cloud_convo_metadata, the RequestFailed callback sets has_finished_initial_load = true but does not emit a ConversationsLoaded event. The AgentManagementView (and ConversationListViewModel) subscribe to this event to call get_tasks_from_model() / refresh_cached_items() and trigger ctx.notify(). Without the event, the view never re-renders and remains stuck showing "Loading agents..." until the user interacts with the window (click, hover, etc.), which incidentally causes a layout pass.

The fix adds ctx.emit(AgentConversationsModelEvent::ConversationsLoaded) on the failure path, matching the success path behavior.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

The change is a one-line event emission on an existing error path. The success path already emits this event and is well-tested. The failure path now matches.

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/12886a29-2f4c-4f43-96fb-f2d4d7a65c3a
Run: https://oz.staging.warp.dev/runs/019e2aa4-0d8c-7c7e-a252-d53adfd36a24
This PR was generated with Oz.

…ding UI

When fetch_ambient_agent_tasks_and_cloud_convo_metadata fails after all
retries, has_finished_initial_load is set to true but no event is emitted.
The AgentManagementView (and ConversationListViewModel) never re-renders,
leaving the UI stuck on 'Loading agents...' until the user interacts with
the window.

Add ctx.emit(ConversationsLoaded) on the RequestFailed path so subscribers
transition out of the loading state even when the server request fails.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 15, 2026
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