Skip to content

fix(flows): stay on the flows list after starting a run - #502

Closed
albertoperdomo2 wants to merge 1 commit into
mainfrom
fix/flows-stay-on-list-after-run
Closed

albertoperdomo2 wants to merge 1 commit into
mainfrom
fix/flows-stay-on-list-after-run

Conversation

@albertoperdomo2

Copy link
Copy Markdown
Contributor

Summary

Clicking Run on a flow card in the workspace Flows section redirected to the run history view. That navigation was deliberate (navigateToHistoryOnRun passed by WorkspaceFlowsView), but it yanks context away from the list the user is working in — and the web list at /u/{slug}/flows already had the better behavior: refresh in place and stay.

Changes

  • Drop the navigateToHistoryOnRun prop and the router.push branch in FlowsPage.runFlow; both surfaces now stay on the list and refresh it after a run starts.
  • Add a silent 5s re-fetch while any visible flow has an active run (running or waiting_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 — unaffected
  • eslint clean on changed files
  • CI green

Notes

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>
@albertoperdomo2
albertoperdomo2 deleted the fix/flows-stay-on-list-after-run branch September 2, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant