fix: emit ConversationsLoaded on initial fetch failure to unblock loading UI#10993
Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
Draft
fix: emit ConversationsLoaded on initial fetch failure to unblock loading UI#10993warp-dev-github-integration[bot] wants to merge 1 commit into
warp-dev-github-integration[bot] wants to merge 1 commit into
Conversation
…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>
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
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, theRequestFailedcallback setshas_finished_initial_load = truebut does not emit aConversationsLoadedevent. TheAgentManagementView(andConversationListViewModel) subscribe to this event to callget_tasks_from_model()/refresh_cached_items()and triggerctx.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
ready-to-specorready-to-implement.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.
./script/runAgent 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.