🤖 feat: add scheduled prompt queue#3422
Conversation
|
@codex review Please review the scheduled prompt queue implementation. In particular, please look at the active-workspace dispatcher behavior, localStorage lifecycle handling, and the choice not to copy scheduled sends on workspace fork. |
|
To use Codex here, create a Codex account and connect to github. |
8302189 to
5dd4327
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5dd4327309
ℹ️ 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".
5dd4327 to
4e54e11
Compare
|
@codex review Addressed your dispatcher lifetime feedback by moving the active-workspace scheduled prompt dispatcher out of ChatPane and into an App-level active workspace host, while disabling it for transcript-only, incompatible, and queued agent-task workspaces. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e54e1183b
ℹ️ 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".
c6fa89e to
eab35fb
Compare
|
@codex review Addressed the provider side-effect feedback by letting the App-level scheduled prompt dispatcher mount AgentProvider/ThinkingProvider with global listeners disabled. This preserves the shared send-option path while preventing duplicate agent/thinking shortcut handling; added tests for disabled agent/thinking keybind listeners. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eab35fbeb2
ℹ️ 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".
eab35fb to
f6de8f7
Compare
|
@codex review Rebased this PR onto latest |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ 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". |
f6de8f7 to
30d7932
Compare
|
@codex review Addressed the scheduled dispatcher feedback: due scheduled prompts are now dispatched sequentially, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30d7932cb2
ℹ️ 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".
30d7932 to
686dc26
Compare
|
@codex review Addressed the live Chat Instructions feedback: the App-level scheduled prompt dispatcher now reads the hydrated additional-system-context snapshot for the active workspace and includes it in scheduled send options, matching the normal ChatInput send path. Re-ran focused tests and |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 686dc2681d
ℹ️ 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".
686dc26 to
29a3388
Compare
|
@codex review Addressed the latest scheduler edge cases: clamped long-delay timers now reschedule after the clamp expires, and |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29a3388193
ℹ️ 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".
29a3388 to
7a1bb83
Compare
|
@codex review Addressed the queued prompt snapshot feedback: before dispatching each prompt from a due batch, the dispatcher now re-reads the current scheduled prompt state and only sends entries that still exist and are still due/scheduled. Added a dispatcher test for removing a queued due prompt while an earlier prompt is still sending, and re-ran focused tests plus |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a1bb83ccc
ℹ️ 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".
ce64b11 to
c3458c7
Compare
|
@codex review Rebased onto latest Validation:
|
c3458c7 to
d1b29bb
Compare
|
@codex review Addressed the manual Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1b29bb935
ℹ️ 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".
d1b29bb to
b10ebbe
Compare
|
@codex review Addressed the normalized-prompts memoization feedback. Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b10ebbefe2
ℹ️ 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".
b10ebbe to
7f6b1d8
Compare
|
@codex review Addressed the remaining Schedule tab memoization feedback. Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f6b1d8eb3
ℹ️ 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".
|
Thanks, I pushed a follow-up commit addressing both review points:
Local verification: |
|
Follow-up validation update: I installed the project dependencies in the temporary checkout with Validation now passing locally:
The latest commit only adjusts the test to let the mocked scheduled send settle before cleanup. |
Adds a right sidebar Schedule tab for workspace-scoped scheduled prompts, including local lifecycle state, run-now/delete controls, and an active-workspace dispatcher that submits due prompts with the current send options.\n\nLinks coder#3417.\n\n---\n\n_Generated with `mux` • Model: `GPT-5` • Thinking: `unknown` • Cost: ``_\n\n<!-- mux-attribution: model=GPT-5 thinking=unknown costs=unknown -->
8d008ba to
8af60e1
Compare
|
Rebased this PR onto the latest Validation rerun locally:
|
|
@codex review Rebased this PR onto the latest Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8af60e1d7d
ℹ️ 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 child-task starting-state feedback: scheduled prompts are now unavailable for delegated task workspaces while Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54fbc03782
ℹ️ 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 background-workspace scheduled-dispatch feedback: the app now mounts scheduled prompt dispatchers for every runnable workspace that has scheduled prompts, and refreshes that target list when scheduled prompt storage changes. This lets prompts fire after the user switches to another workspace. Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 888c540fb0
ℹ️ 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 latest scheduled-dispatch feedback:
Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 379bd3fe8f
ℹ️ 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 cross-renderer scheduled prompt storage feedback: the App-level dispatcher target list now listens to native Validation:
|
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
Summary
Adds a workspace-scoped scheduled prompt queue in the right sidebar. Users can schedule a text prompt for a future local time, choose whether it should dispatch after the current step or after the current turn, run it immediately, delete it, and see sent, failed, sending, or blocked state directly in the Schedule tab.
Background
Part of #3417. This PR implements the conservative manual scheduling MVP for quota-reset or overnight continuation workflows. Automatic rate-limit reset detection remains out of scope because it likely needs backend/provider-specific signal plumbing rather than a purely local UI queue.
Implementation
Scheduleright-sidebar tab with prompt text,datetime-localscheduling, dispatch-mode selection, run-now/delete controls, and lifecycle badges.workspace.sendMessageAPI using the current send options, without mutating the visible composer draft.SendMessageErrorformatter.Validation
bun test --timeout=10000 ./src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx ./src/browser/features/ScheduledPrompts/scheduledPrompts.test.ts ./src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts- 12 tests passed./node_modules/.bin/eslint src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx src/browser/features/RightSidebar/Tabs/TabLabels.tsx src/browser/features/RightSidebar/Tabs/tabConfig.ts src/browser/features/RightSidebar/Tabs/tabRegistry.tsx./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.jsongit diff --checkmake static-checkRisks
The dispatcher is renderer-local and runs while the workspace UI is mounted; it is not a background daemon that can wake a closed app. Scheduled prompts are text-only in this first pass, so attachment scheduling and command parsing can be layered on later if maintainers want them. Automatic rate-limit reset detection, provider availability checks, allowed run windows, and retry policies are intentionally left for follow-up work.
Generated with
mux• Model:GPT-5• Thinking:unknown• Cost:$unknown