Skip to content

🤖 fix: keep workflow progress visible#3584

Merged
ThomasK33 merged 7 commits into
mainfrom
workflow-actions-stck
Jun 17, 2026
Merged

🤖 fix: keep workflow progress visible#3584
ThomasK33 merged 7 commits into
mainfrom
workflow-actions-stck

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Fix workflow run cards that could show only invocation arguments instead of the live workflow action/task list. The card now preserves the preferred Arguments / Definition source ordering while stream attachment persistence hydrates the durable workflow run as soon as the backend creates or replays it.

Background

Foreground workflow tools can create a durable workflow run before the streamed dynamic tool part is stored. When that attachment races ahead of the tool part, the renderer can miss the exact runId hint and render an arguments-only card instead of the useful list of workflow actions/tasks.

Implementation

  • Buffer pending workflow-run attachments in StreamManager when the attachment event races ahead of the tool part, then apply the exact run attachment when the matching tool part is persisted or completed.
  • Re-emit queued workflow attachments after the tool part is persisted/completed and forward workflow-run-attached through AIService, so reconnect/full-replay renderers rebuild exact workflow hints.
  • Keep Arguments and Definition source before Workflow events, with large payloads still collapsed for scanability.
  • Add regressions for UI section ordering, attachment-before-tool-part persistence/re-emission, and AIService forwarding.
  • Ran the simplify workflow and applied its cleanup commit to dedupe workflow attachment lookup in completeToolCall.

Validation

  • bun test src/browser/features/Tools/WorkflowRunToolCall.test.tsx
  • bun test src/node/services/streamManager.test.ts -t "workflow run attachments"
  • bun test src/node/services/aiService.test.ts -t "forwards workflow-run-attached events"
  • make static-check
  • Dogfooded Storybook App/Chat/Tools/WorkflowRun/RunningBackgroundWithRun at a 375×667 viewport with agent-browser; verified Arguments and Definition source render above Workflow events and captured screenshot/video evidence locally.
  • workflow_run simplify --base origin/main --head HEAD --fix

Risks

Medium risk: this touches streaming partial persistence/forwarding and workflow card rendering. The stream-manager change is scoped to workflow-run attachment metadata, and the UI change preserves existing section content while restoring the preferred details-before-events order.


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

Deduplicate the pending workflow run attachment lookup in StreamManager completeToolCall while preserving existing and fallback attachment behavior.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

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

Copy link
Copy Markdown

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: 033adfb2ab

ℹ️ 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/node/services/streamManager.ts Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

Addressed Codex finding PRRT_kwDOPxxmWM6KP2j3: queued workflow-run attachments are now re-emitted when the matching tool part is persisted/completed, so reconnecting renderers that missed the initial queued attachment receive workflow-run-attached after tool-call-start. Added regression coverage in StreamManager - workflow run attachments and reran targeted tests plus make typecheck and make static-check locally.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review
Please take another look.

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

Copy link
Copy Markdown

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: d1973a4788

ℹ️ 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/node/services/streamManager.ts
@ThomasK33

Copy link
Copy Markdown
Member Author

Addressed Codex finding PRRT_kwDOPxxmWM6KQEOI: workflow-run-attached is now forwarded from StreamManager through AIService, so the queued attachment re-emission reaches AgentSession/the renderer during reconnect/full-replay. Added AIService.setupStreamEventForwarding regression coverage and reran targeted tests plus make typecheck and make static-check locally.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review
Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: e78b633205

ℹ️ 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

Pushed a CI unit-test fix after reproducing the failing StreamManager - model-only tool notifications subset locally. pendingWorkflowRunAttachments is now lazily initialized for older/partial stream-info fixtures as well as normal stream startup.

Validation rerun locally:

  • bun test src/node/services/streamManager.test.ts -t "workflow run attachments"
  • bun test src/node/services/streamManager.test.ts -t "model-only tool notifications"
  • bun test src/node/services/aiService.test.ts -t "forwards workflow-run-attached events"
  • make typecheck
  • MUX_ESLINT_CONCURRENCY=1 make static-check

@codex review
Please take another look at the latest head.

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

Copy link
Copy Markdown

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: 82eb3926a1

ℹ️ 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/node/services/streamManager.ts
@ThomasK33

Copy link
Copy Markdown
Member Author

Addressed Codex finding PRRT_kwDOPxxmWM6KQjZU: the existing-part attachment path now tolerates stream infos without pendingWorkflowRunAttachments, and the existing-part attachment test covers that legacy/partial stream-info shape. Local validation passed for the workflow attachment tests, model-only notification tests, make typecheck, and make static-check.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review
Please take another look.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: fb8385819f

ℹ️ 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

@codex review

Updated the card layout per feedback so Arguments and Definition source render before Workflow events again, while keeping the durable workflow attachment race fix intact.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 3de382f641

ℹ️ 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 17, 2026
Merged via the queue into main with commit 34c5c5f Jun 17, 2026
39 of 42 checks passed
@ThomasK33 ThomasK33 deleted the workflow-actions-stck branch June 17, 2026 17:40
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