🤖 fix: show workflow-only sidebar activity#3587
Conversation
Cache top-level active workflow run IDs per workspace, use lightweight workflow run status snapshots for activity notifications, centralize workflow status classifiers, and deduplicate sidebar activity indicator markup.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8d53b4cda
ℹ️ 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".
|
@codex review Addressed the workflow activity preservation feedback by merging cached active workflow counts into subsequent workspace activity emissions and covering both metadata-update and direct emit paths with a targeted test. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78bbcc2c16
ℹ️ 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".
|
@codex review Addressed the tool-started workflow feedback by wiring AIService's workflow_run WorkflowService through the same workspace activity status handler as ORPC-started workflows. Also routed goal activity through emitWorkspaceActivity so cached workflow counts are preserved on that emission path too. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20829916c4
ℹ️ 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".
|
@codex review Addressed the initial cache bootstrap race by installing a shared per-workspace Set before awaiting the lightweight disk scan, making concurrent status events await the same bootstrap and mutate the same cache. Added a targeted parallel status-event regression test. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8386b413a6
ℹ️ 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".
|
@codex review Addressed the overlapping metadata read race by updating the workflow cache first and deriving the activity count at emission time from the shared cache after the async snapshot read. Added a regression test where overlapping terminal events complete out of order. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65bb30d8bb
ℹ️ 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".
|
@codex review Addressed stale active run-file snapshots by reconciling active-looking lightweight status snapshots against the workflow event journal when no mutation lock is active. Added a regression test where run.json is stale active but events.jsonl contains the terminal status. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 501526ffa9
ℹ️ 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".
|
@codex review Addressed stale inactive run-file snapshots by reconciling all unlocked lightweight status snapshots against the workflow event journal. Added a regression test where run.json remains interrupted while events.jsonl has a resumed running status. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 669b56c3dc
ℹ️ 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".
|
@codex review Addressed the disconnected-subscription clearing case by returning a zero-count activity tombstone for workspaces that previously had workflow-only activity cached. Added a regression assertion that a cleared workflow-only workspace remains present in activity.list without activeWorkflowRunCount. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Replace the inline run.status === completed/failed/interrupted check in interruptRunOnAbort with the isTerminalWorkflowRunStatus helper introduced by #3587, which encodes the exact same terminal-status set. Behavior-preserving dedup; the helper is the canonical predicate for this check across taskService and task_await.
Summary
Show top-level workflow-only activity in the workspace sidebar so pending, running, or backgrounded workflow runs light up the active status dot even when no sub-agent workspace is active.
Background
Workspaces running a workflow without spawned sub-agents could look idle in the sidebar. This made long-running maintenance workflows hard to notice unless their workspace was currently selected.
Implementation
activeWorkflowRunCountto workspace activity snapshots and frontend workspace/sidebar state.workflow_runtool workflows intoWorkspaceService, filtering nested workflow runs so only top-level workspace workflows count.Workflow runningsidebar sublabel when workflow activity is the only live status, while preserving explicit agent/todo status text when present.Validation
bun test src/node/services/workflows/WorkflowRunStore.test.ts --test-name-pattern "status"bun test src/node/services/workflows/WorkflowService.test.ts --test-name-pattern "starts a named workflow|moves foreground workflow runs"bun test src/node/services/workspaceService.test.ts --test-name-pattern "workflow activity"bun test src/browser/components/AgentListItem/AgentListItem.test.tsxMUX_ESLINT_CONCURRENCY=1 make static-checksimplifyworkflow and applied its cleanup commit.AgentListItem/WorkflowOnlyActivityStorybook row and captured screenshot/video evidence in the agent session.Risks
Medium: the change touches workflow status propagation, workspace activity snapshots, crash-recovery status reads, and sidebar attention state. The active-run cache is event-driven and lazily bootstrapped; targeted tests cover cache reuse, parallel status events, overlapping metadata reads, journal/run-file status reconciliation, and cleared workflow-only tombstones.
Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$47.81