🤖 feat: centralize workflow automations#3560
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f7019ae60
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f7019ae60
ℹ️ 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".
0f7019a to
12c884b
Compare
|
Addressed the current Codex findings:
Also fixed CI-local repro failures by only expecting the automation modal test double when it is mounted, and wrapping AgentListItem stories in ProjectProvider. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12c884b9b3
ℹ️ 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".
12c884b to
c1157ac
Compare
|
Addressed the latest Codex findings:
Also changed @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1157ac7f8
ℹ️ 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".
c1157ac to
fef4720
Compare
|
Addressed the latest Codex finding:
Validation for this round:
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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". |
fef4720 to
b625368
Compare
|
Pushed a unit-test isolation fix after the latest CI failure: Validation:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b62536819c
ℹ️ 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".
b625368 to
46fb7f6
Compare
|
@codex review Please take another look. Addressed the missing/deleted project target stamping case and added a project automation keyboard shortcut path. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46fb7f6145
ℹ️ 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".
46fb7f6 to
b06d98a
Compare
|
@codex review Please re-check after the Storybook play-test selector fix. |
b06d98a to
ae6ec2b
Compare
|
@codex review Please take another look. Preserved existing project automation titles when saving from the workspace automation modal and covered it in the modal test. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae6ec2b015
ℹ️ 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".
ae6ec2b to
4d8b0a0
Compare
|
@codex review Please take another look. Project automation fresh workspaces now use template workspaces only for runtime settings and do not inherit a template sub-project scope; added serviceContainer coverage for that case. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d8b0a089c
ℹ️ 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".
4d8b0a0 to
d0b1d03
Compare
|
@codex review Please take another look. The project automation shortcut now resolves the selected workspace's effective sub-project scope, matching the new-workspace shortcut behavior, with ProjectSidebar coverage. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0b1d036d4
ℹ️ 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".
d0b1d03 to
365f1a9
Compare
|
@codex review Please take another look. Sub-project project automations now resolve parent workspace templates for runtime compatibility and pass the source project scope through workflow resolution so scheduled runs load workflows from the intended sub-project checkout path. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 365f1a9715
ℹ️ 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".
365f1a9 to
dd5652d
Compare
|
@codex review Please take another look. Saving new-workspace schedules for sub-projects now validates against the owner project's workspace templates, and project trust now resolves through the registered parent project so sub-project workflow runs can load project-local definitions under a trusted parent. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd5652debe
ℹ️ 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".
dd5652d to
2324f84
Compare
|
@codex review Please take another look. WorkspaceMenuBar now opens/saves workspace automation schedules under the effective sub-project path, and project schedule dispatch resolves existing-workspace targets through the owner project so sub-project-owned schedules can run against parent-owned workspaces. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2324f84749
ℹ️ 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".
Promote scheduled workflow automations from workspace-local state into project-level schedules that survive workspace archival and deletion. - add project workflow schedule schemas, oRPC endpoints, and scheduler dispatch support - support existing-workspace and new-workspace automation targets with conflict validation - add modal UI, menu entries, stories, and tests for configuring and running automations - harden workflow scheduling around terminal status, stale config stamps, and unsupported targets - remove unshipped legacy workspace automation migration plumbing --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$632.46`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=632.46 -->
2324f84 to
8733cb3
Compare
|
@codex review Please take another look. AutomationModal now loads workflow definitions from the effective sub-project path, ProjectAutomationsModal uses owner-project workspaces for sub-project target options, and existing-workspace conflicts are checked across the owner project plus registered sub-project schedules. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8733cb3f7c
ℹ️ 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".
| if (candidateOwnerPath !== ownerProjectPath) { | ||
| return []; | ||
| } | ||
| return (candidateProject.workflowSchedules ?? []).map((schedule) => ({ |
There was a problem hiding this comment.
Include workspace schedules in target conflict checks
When saving an existing-workspace project automation, this scan only considers candidateProject.workflowSchedules; existing per-workspace workspace.workflowSchedule entries are still loaded and dispatched by WorkflowSchedulerService.tick(). After upgrading a config that already has a workspace schedule, creating a project automation for the same workspace succeeds here and both schedules can run against the same target, causing duplicate automated workflow runs instead of enforcing the “one automation per workspace” rule.
Useful? React with 👍 / 👎.
| </Popover> | ||
| {dynamicWorkflowsEnabled && automationModalOpen && ( | ||
| <AutomationModal | ||
| projectPath={projectPath} |
There was a problem hiding this comment.
Use the row's sub-project when opening automation settings
For workspaces rendered inside a sub-project section, ProjectSidebar still passes the owner projectPath into AgentListItem while the sub-project is only available as sectionId. Opening automation settings from that row therefore reads/saves the owner project's schedules here, unlike WorkspaceMenuBar which switches to the workspace subProjectPath; a user configuring a sub-project workspace from the sidebar will edit or create the wrong project automation.
Useful? React with 👍 / 👎.
| getExistingWorkspaceAutomationConflict({ | ||
| projectConfig: props.projectConfig, | ||
| workspaceId: workspace.id, | ||
| editingScheduleId, | ||
| }) == null |
There was a problem hiding this comment.
Check sibling schedules before offering targets
activeWorkspaces now comes from the owner project, but the conflict test still receives only props.projectConfig, so a sub-project modal only filters schedules stored on that sub-project. If the owner project or a sibling sub-project already targets workspace.id, this option remains selectable and the form appears valid until the backend rejects the save; the picker should use the same owner-wide schedule set as the API conflict check.
Useful? React with 👍 / 👎.
Summary
Centralizes scheduled workflow automations at the project level so automations survive workspace archive/delete lifecycles, while still supporting existing-workspace targets and fresh-workspace-per-run targets.
Background
Workspace-local scheduled workflows were tied to a specific workspace record. This made recurring automations fragile: removing the workspace could remove the automation too. Project-level schedules make recurring workflows a first-class project setting.
Implementation
lastRunStartedAt, so unarchiving keeps overdue automations due immediately.Validation
make typecheckbun test src/browser/components/AutomationModal/AutomationModal.test.tsx src/browser/components/ProjectAutomationsModal/ProjectAutomationsModal.test.tsx src/common/utils/workflowScheduleTarget.test.tsbun test src/node/services/workflows/WorkflowSchedulerService.test.ts src/node/orpc/router.test.ts src/node/services/serviceContainer.test.tsbun test src/browser/components/WorkspaceMenuBar/WorkspaceMenuBar.test.tsx src/browser/components/AutomationModal/AutomationModal.test.tsx src/browser/components/ProjectAutomationsModal/ProjectAutomationsModal.test.tsxbun test src/node/orpc/router.test.ts src/node/services/workflows/WorkflowSchedulerService.test.tsbun test src/node/services/workflows/WorkflowSchedulerService.test.ts src/node/services/workflows/WorkflowService.test.tsbun test src/node/services/serviceContainer.test.tsmake storybook-run CMD="make test-storybook"make testmake static-checkMUX_ESLINT_CONCURRENCY=1 make static-checkRisks
Moderate regression risk in workflow scheduling and workspace creation paths. The change touches scheduler dispatch semantics, workflow run status propagation, and project config persistence. Risk is mitigated by targeted scheduler/router/service tests, full unit tests, Storybook interaction tests, and static checks.
Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$649.23