fix(flows): stay on the flows list after starting a run - #502
Closed
albertoperdomo2 wants to merge 1 commit into
Closed
albertoperdomo2 wants to merge 1 commit into
albertoperdomo2 wants to merge 1 commit into
Conversation
The workspace Flows section passed `navigateToHistoryOnRun`, so clicking Run on a flow card yanked the user to the run history view. The web list already refreshed in place; the workspace now behaves the same. To make staying informative, the list silently re-fetches every 5s while any visible flow has an active run (`running`/`waiting_for_human`), so badges and run states track progress without navigating away or flashing the loader. Polling tears itself down once no run is active. Co-Authored-By: Claude Code <noreply@anthropic.com>
6 tasks
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
Clicking Run on a flow card in the workspace Flows section redirected to the run history view. That navigation was deliberate (
navigateToHistoryOnRunpassed byWorkspaceFlowsView), but it yanks context away from the list the user is working in — and the web list at/u/{slug}/flowsalready had the better behavior: refresh in place and stay.Changes
navigateToHistoryOnRunprop and therouter.pushbranch inFlowsPage.runFlow; both surfaces now stay on the list and refresh it after a run starts.runningorwaiting_for_human), so badges and run states track the run without leaving the page. The silent refresh skips the loading toggle — the grid stays mounted instead of flashing "Loading flows...". Polling stops automatically once no run is active.Test plan
flows-page.test.tsx— running from the list keeps you in place, registers a silent poll, refreshing does not flash the loader, and the poll tears down when no run is active (the old "desktop list navigates to history" case is replaced)workspace-flows-view.test.tsx— unaffectedNotes
flows-page.tsx(Run/Stop button block); the regions are distinct, so any rebase conflict should be trivial.