Skip to content

🤖 fix: render foreground workflows like backgrounded runs#3457

Merged
ThomasK33 merged 1 commit into
mainfrom
workflow-ui-mbx0
Jun 4, 2026
Merged

🤖 fix: render foreground workflows like backgrounded runs#3457
ThomasK33 merged 1 commit into
mainfrom
workflow-ui-mbx0

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

Summary

Render foreground workflow runs with the same live workflow details as backgrounded runs while they are still executing.

Background

Foreground workflow tool calls block until completion, so the initial tool message does not include a durable runId. That left the UI showing only the raw arguments panel during execution. This change lets the card safely discover the matching active workflow run and render definition/details/events while the foreground tool is still running.

Implementation

  • Discover executing foreground workflow runs by matching workspace, workflow name, arguments, active status, and a freshness window.
  • Refuse ambiguous same-name/same-args matches so mutating actions do not bind to the wrong run.
  • Merge refreshed workflow snapshots monotonically by updatedAt, with event sequence as the same-millisecond tie-breaker.
  • Gate mutating actions until run identity is confirmed, and keep resume state aligned with the displayed run status.
  • Make the Storybook workflow API mock stateful so interrupt/resume can be dogfooded locally.

Validation

  • make static-check
  • bun test src/browser/features/Tools/WorkflowRunToolCall.test.tsx
  • bun run prettier --check src/browser/features/Tools/WorkflowRunToolCall.tsx src/browser/features/Tools/WorkflowRunToolCall.test.tsx src/browser/features/Tools/WorkflowRunToolCall.stories.tsx
  • bun x eslint src/browser/features/Tools/WorkflowRunToolCall.tsx src/browser/features/Tools/WorkflowRunToolCall.test.tsx src/browser/features/Tools/WorkflowRunToolCall.stories.tsx
  • make typecheck
  • Dogfooded in Storybook with agent-browser: discovered foreground run rendering, interrupt transition, and resume transition. Screenshots/video were captured locally for review evidence.

Risks

Moderate UI-state risk around workflow cards only. The discovery path is intentionally conservative: it declines ambiguous matches, filters stale runs, and only enables mutations for confirmed run IDs.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $109.15

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78190c6323

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/WorkflowRunToolCall.tsx Outdated
@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

Addressed Codex P2: uniquely discovered foreground runs are now treated as confirmed identities for actions while the foreground tool call is still executing. Ambiguous matches continue to hide actions. Added regression coverage for discovered foreground interrupt and ambiguous-match action hiding.

Validation after the fix:

  • bun test src/browser/features/Tools/WorkflowRunToolCall.test.tsx
  • make static-check
  • Storybook dogfood of foreground-discovered interrupt/resume flow with screenshots/video captured locally.

@codex review

Discover the durable foreground workflow run while the tool is still executing, then render and refresh the same live run details used by backgrounded workflow runs.

Add Storybook comparison stories and regression coverage for the executing status and live foreground run discovery.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `5.99`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=15.99 -->
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 4, 2026
@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 0826d22 Jun 4, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the workflow-ui-mbx0 branch June 4, 2026 21:43
@mux-bot mux-bot Bot mentioned this pull request Jun 5, 2026
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