Skip to content

🤖 fix: prevent discarded workflow runs from reappearing#3449

Merged
ThomasK33 merged 2 commits into
mainfrom
workflow-runs-k3n3
Jun 4, 2026
Merged

🤖 fix: prevent discarded workflow runs from reappearing#3449
ThomasK33 merged 2 commits into
mainfrom
workflow-runs-k3n3

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

Summary

Fixes workflow run card projection so durable workflow records no longer reappear in chat after their transcript rows were intentionally discarded, while still allowing anchored workflow cards to refresh or repair.

Background

A slash-invoked workflow can outlive the chat rows that launched it. After an edit or compaction removes those display-only rows from the active transcript, listRuns() can still return the completed durable run. The UI previously projected that unanchored run back into chat, causing old completed workflows to appear at the bottom unexpectedly.

Implementation

  • Gate workflow run projection until the active transcript catch-up marker has hydrated history.
  • Treat current workflow card metadata as a repairable projection anchor.
  • Treat surviving workflow trigger rows as anchors for repairing missing cards.
  • Keep fully unanchored durable workflow runs suppressed.

Validation

  • bun test src/browser/utils/workflowRunMessages.test.ts
  • bun test src/browser/utils/workflowRunMessages.test.ts src/browser/components/PinnedTodoList/PinnedTodoList.test.tsx src/browser/features/RightSidebar/CodeReview/ImmersiveReviewAgentStatusBar.test.tsx src/browser/utils/commands/sources.test.ts
  • make typecheck
  • make lint
  • git diff --check
  • make static-check

Risks

Medium. The touched path is transcript projection/hydration for workflow cards. The change intentionally narrows unanchored projections, while preserving refresh for cards and triggers that are still present in the active transcript.


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

ThomasK33 added 2 commits June 4, 2026 13:56
Only refresh workflow run cards that are already anchored in the current transcript. Durable workflow run records can outlive the chat rows that launched them after message edits truncate history, so unanchored runs must not be projected back into the chat.

Validation:
- bun test src/browser/utils/workflowRunMessages.test.ts
- make typecheck
- make lint

---

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

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=8.21 -->
Address deep-review feedback on discarded slash workflow runs:
- delay workflow run projection until the transcript catch-up marker has hydrated current history
- treat durable workflow card metadata as a repairable card anchor
- treat surviving workflow trigger rows as anchors for repairing a missing card while still suppressing fully unanchored durable runs

Validation:
- bun test src/browser/utils/workflowRunMessages.test.ts
- bun test src/browser/utils/workflowRunMessages.test.ts src/browser/components/PinnedTodoList/PinnedTodoList.test.tsx src/browser/features/RightSidebar/CodeReview/ImmersiveReviewAgentStatusBar.test.tsx src/browser/utils/commands/sources.test.ts
- make typecheck
- make lint
- git diff --check

---

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

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=60.66 -->
@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ 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
Merged via the queue into main with commit 7521815 Jun 4, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the workflow-runs-k3n3 branch June 4, 2026 15:09
@mux-bot mux-bot Bot mentioned this pull request Jun 4, 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