🤖 feat: add workflow visibility surfaces#3495
Conversation
Implement shared workflow visibility state, Workflows sidebar, topbar indicator, chat-card integration, workflow definition precedence, and tests.\n\n---\n\n_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `07.49`_\n\n<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=207.49 -->
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8400b636ad
ℹ️ 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 Please take another look. I preserved all enabled right-sidebar feature flags for command palette tab visibility, including Browser and Desktop. |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ 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". |
Summary
Adds workflow visibility surfaces for Dynamic Workflows: a shared browser workflow store, a right-sidebar Workflows tab, top-bar workflow indicator, and chat-card store integration. Also hardens the implementation against the deep-review findings by gating the UI behind the Dynamic Workflows experiment, preserving state on transient API failures, restarting polling after resubscribe, discovering externally-created runs, and limiting retry/run actions to supported flows.
Implementation
Validation
bun test src/browser/utils/commands/sources.test.ts src/browser/features/Workflows/WorkflowStore.test.ts src/browser/features/Workflows/WorkflowsTab.test.tsx src/browser/features/Workflows/workflowStatusPresentation.test.ts src/browser/components/WorkflowIndicator/WorkflowIndicator.test.tsxmake typecheckmake static-checkdogfood-output/workflows-ui/with screenshots/videos for empty state, definition discovery, live foreground/background runs, failure surfacing, scratch promotion, and narrow layout checks.Risks
Workflow visibility is experiment-gated and uses polling rather than a backend subscription. The main regression risk is extra local API traffic while the Workflows tab/indicator/card is mounted; the shared store deduplicates run polling and tears down timers when subscribers leave.
📋 Implementation Plan
Workflow Visibility UX Plan
Goal
Improve workflow visibility in Mux so users can discover available workflows, understand where they come from, and monitor live workflow execution outside the chat transcript. The design should preserve chat as the canonical chronological record while adding a dashboard-style right-sidebar tab and a glanceable top-bar indicator.
Evidence and constraints
src/browser/features/RightSidebar/Tabs/tabConfig.ts, React labels/panels insrc/browser/features/RightSidebar/Tabs/tabRegistry.tsx. Keep React imports out oftabConfig.ts.project,global,built-in, andscratch.pending,running,backgrounded,interrupted,completed, andfailed.WorkflowRunToolCall.tsx; there is no verified workflow-specific browser store or oRPC subscription today.featureFlagandkeepAlivein tab config are metadata only for this task unless explicit runtime behavior is added and verified.promoteScratch,promoteScratchDefinition); do not imply broader definition management like rename/delete/edit unless separately verified.Recommendation
Build the feature as a three-surface system:
Recommended implementation approach: Full phased system with shared store, sidebar tab, then top-bar indicator.
Alternative implementation approaches:
Information architecture
Workflows sidebar tab
Sidebar cards should show name, scope/source, status, elapsed time, latest meaningful event/phase, and the next supported action. Keep detailed logs behind an explicit disclosure, dialog, or “View in chat” jump.
Top-bar Workflows indicator
Add a sibling indicator near
SkillIndicator, not inside it. Skills are capabilities; workflows are capabilities plus live processes, so urgent workflow state should not be hidden in the skills popover.Indicator behavior:
Shared status severity
failedinterruptedrunningbackgroundedpendingcompletedUse a shared workflow-specific helper rather than exporting
WorkflowRunToolCall.tsx’s localtoToolStatus()directly.Phased implementation plan
Phase 0 — Verify event shape and define shared presentation
Files/subsystems to inspect or update:
src/common/orpc/schemas/workflow.tssrc/browser/features/Tools/WorkflowRunToolCall.tsxsrc/browser/features/Workflows/workflowStatusPresentation.tsTasks:
Acceptance criteria:
Quality gate:
make typecheckor a narrower typecheck target if available.Phase 1 — Add a shared browser workflow store
Likely files/subsystems:
src/browser/stores/WorkflowStore.tsor equivalent colocated workflow storeuseWorkflowSummary(workspaceId),useWorkflowRuns(workspaceId),useWorkflowRun(workspaceId, runId)workflows.listRuns,workflows.getRun,workflows.listDefinitionsTasks:
workspaceIdandrunId.Acceptance criteria:
Quality gate:
getRunpolling.Phase 2 — Build Workflows sidebar tab MVP
Likely files/subsystems:
src/browser/features/RightSidebar/Tabs/tabConfig.tssrc/browser/features/RightSidebar/Tabs/tabRegistry.tsxsrc/browser/features/RightSidebar/WorkflowsTab.tsxorsrc/browser/features/Workflows/WorkflowsTab.tsxWorkflowsTabLabelinTabLabels.tsxor a colocated label imported by the registryTasks:
workflowsstatic tab metadata entry without React imports intabConfig.ts.tabRegistry.tsx.Acceptance criteria:
Quality gate:
Phase 3 — Add top-bar Workflows indicator
Likely files/subsystems:
src/browser/components/WorkspaceMenuBar/WorkspaceMenuBar.tsxsrc/browser/components/WorkflowIndicator/WorkflowIndicator.tsxor colocated componentTasks:
SkillIndicator, respecting menu-bar density and platform window-control spacing.WorkspaceMenuBar.Acceptance criteria:
Quality gate:
Phase 4 — Integrate chat cards with the shared store where safe
Likely files/subsystems:
src/browser/features/Tools/WorkflowRunToolCall.tsxTasks:
Acceptance criteria:
Quality gate:
WorkflowRunToolCalltests pass.Dogfooding and self-verification plan
Use the project
dev-server-sandboxflow so dogfooding does not interfere with the user’s normal Mux data.Setup:
make dev-server-sandbox DEV_SERVER_SANDBOX_ARGS="--clean-projects"Then use the assigned Vite URL from the sandbox output, normally
http://localhost:<VITE_PORT>, and drive the UI with the directagent-browserbinary, notnpx.Before running browser automation, load the installed
agent-browsercommand guidance and the dogfood workflow guidance so commands match the local version:Prepare a dogfood report from the dogfood template and read the issue taxonomy/checklist before exploring. If using the Mux skill files, copy
templates/dogfood-report-template.mdinto the output directory and readreferences/issue-taxonomy.md.Dogfood artifacts directory:
Required dogfood scenarios:
For interactive issues discovered during dogfooding, follow the dogfood skill evidence standard: reproduce once, then record a watchable repro video with step-by-step screenshots before filing the issue. Static visual issues need at least one annotated screenshot. Final implementation handoff should attach the screenshots and videos so reviewers can validate the claims.
Validation plan
Run validation in this order while implementing:
listRuns/getRunpolling for the same key.make typecheck.make lintormake static-checkif the touched area warrants full validation.Risks and mitigations
keepAlive/featureFlagbehavior.Advisor review status
Advisor review fully approved the final plan. Required clarifications from the first review were applied and re-reviewed: Phase 1/Phase 4 dedupe scope, dogfood setup, black-box dogfood separation from implementation validation, and approval status. The second advisor review reported no remaining blockers or required changes.
Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:1223199{MUX_COSTS_USD:-0}