Skip to content

🤖 feat: add scheduled prompt queue#3422

Open
LeonidasZhak wants to merge 7 commits into
coder:mainfrom
LeonidasZhak:codex/scheduled-prompt-queue
Open

🤖 feat: add scheduled prompt queue#3422
LeonidasZhak wants to merge 7 commits into
coder:mainfrom
LeonidasZhak:codex/scheduled-prompt-queue

Conversation

@LeonidasZhak

@LeonidasZhak LeonidasZhak commented May 29, 2026

Copy link
Copy Markdown

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

  • Adds a Schedule right-sidebar tab with prompt text, datetime-local scheduling, dispatch-mode selection, run-now/delete controls, and lifecycle badges.
  • Stores scheduled prompts per workspace in localStorage and normalizes stale or malformed entries before rendering or dispatching.
  • Mounts an active-workspace dispatcher so due prompts are sent through the existing workspace.sendMessage API using the current send options, without mutating the visible composer draft.
  • Guards scheduling availability for transcript-only, incompatible-runtime, and delegated-task workspaces so the tab and command palette only expose scheduling where dispatch can run.
  • Uses a shared localStorage dispatch lock so multiple renderer windows do not concurrently send the same due prompt.
  • Preserves current chat-instruction context for scheduled sends and formats structured send failures through the existing SendMessageError formatter.
  • Cleans scheduled prompts when a workspace is deleted, but does not copy them when a workspace is forked to avoid duplicating future automated sends.

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.json
  • git diff --check
  • make static-check

Risks

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

@LeonidasZhak

Copy link
Copy Markdown
Author

@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.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from 8302189 to 5dd4327 Compare May 29, 2026 14:12
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Connector is now set up. Please review the scheduled prompt queue implementation for #3417, especially the active-workspace dispatcher behavior and scheduled-send storage lifecycle.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/components/ChatPane/ChatPane.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from 5dd4327 to 4e54e11 Compare May 30, 2026 02:27
@LeonidasZhak

Copy link
Copy Markdown
Author

@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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/App.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch 2 times, most recently from c6fa89e to eab35fb Compare May 30, 2026 02:38
@LeonidasZhak

Copy link
Copy Markdown
Author

@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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts Outdated
Comment thread src/browser/features/ScheduledPrompts/scheduledPrompts.ts Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from eab35fb to f6de8f7 Compare May 30, 2026 02:43
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Rebased this PR onto latest main and resolved the ThinkingContext conflict by preserving the new minimum-thinking-level policy together with the disabled-global-listeners dispatcher host fix. Re-ran the focused tests and tsgo --noEmit after the rebase.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from f6de8f7 to 30d7932 Compare May 30, 2026 02:48
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the scheduled dispatcher feedback: due scheduled prompts are now dispatched sequentially, sending prompts no longer auto-recover to scheduled on normalization, and a dispatcher test verifies multiple due prompts do not call sendMessage in parallel. Re-ran focused tests and tsgo --noEmit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from 30d7932 to 686dc26 Compare May 30, 2026 02:54
@LeonidasZhak

Copy link
Copy Markdown
Author

@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 tsgo --noEmit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/scheduledPrompts.ts
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from 686dc26 to 29a3388 Compare May 30, 2026 03:00
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the latest scheduler edge cases: clamped long-delay timers now reschedule after the clamp expires, and sending prompts remain protected from automatic duplicate sends while becoming manually recoverable via Run now after they have been stuck for a recovery window. Re-ran focused tests and tsgo --noEmit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from 29a3388 to 7a1bb83 Compare May 31, 2026 06:19
@LeonidasZhak

Copy link
Copy Markdown
Author

@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 tsgo --noEmit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/App.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch 2 times, most recently from ce64b11 to c3458c7 Compare June 5, 2026 09:24
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Rebased onto latest main and addressed the Schedule-tab availability feedback. The scheduled prompt dispatcher guard is now shared with the right sidebar and command palette: Schedule is removed/hidden for transcript-only, incompatible-runtime, and queued delegated-task workspaces, so users cannot create scheduled prompts in contexts where no dispatcher can run them.

Validation:

  • bun test src/browser/features/ScheduledPrompts/scheduledPrompts.test.ts src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts src/browser/utils/commands/sources.test.ts src/common/constants/storage.test.ts
  • node_modules/.bin/tsgo --noEmit
  • git diff --check
  • PATH="/tmp/mux-bun-tools/node_modules/.bin:$PATH" make static-check

@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from c3458c7 to d1b29bb Compare June 5, 2026 09:32
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the manual useMemo feedback. The App-level dispatcher now passes the hydrated additional-system-context value as a primitive to useScheduledPromptDispatcher, and the hook merges it into sendMessage options at the send site. I also added a dispatcher test that verifies scheduled sends still include additional system context.

Validation:

  • bun test src/browser/features/ScheduledPrompts/scheduledPrompts.test.ts src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts src/browser/utils/commands/sources.test.ts src/common/constants/storage.test.ts
  • node_modules/.bin/tsgo --noEmit
  • git diff --check
  • PATH="/tmp/mux-bun-tools/node_modules/.bin:$PATH" make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from d1b29bb to b10ebbe Compare June 5, 2026 09:39
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the normalized-prompts memoization feedback. useScheduledPromptDispatcher now computes normalized prompts inside the effect from storedPrompts, so the scheduled prompt path no longer introduces manual useMemo solely for object identity.

Validation:

  • bun test src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx src/browser/features/ScheduledPrompts/scheduledPrompts.test.ts src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts src/browser/utils/commands/sources.test.ts src/common/constants/storage.test.ts
  • node_modules/.bin/tsgo --noEmit
  • git diff --check
  • PATH="/tmp/mux-bun-tools/node_modules/.bin:$PATH" make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/ScheduledPromptsTab.tsx Outdated
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from b10ebbe to 7f6b1d8 Compare June 5, 2026 09:45
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the remaining Schedule tab memoization feedback. ScheduledPromptsTab now computes normalized prompts directly during render, and rg -n "useMemo" src/browser/features/ScheduledPrompts src/browser/App.tsx returns no matches.

Validation:

  • bun test src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx src/browser/features/ScheduledPrompts/scheduledPrompts.test.ts src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts src/browser/utils/commands/sources.test.ts src/common/constants/storage.test.ts
  • node_modules/.bin/tsgo --noEmit
  • git diff --check
  • PATH="/tmp/mux-bun-tools/node_modules/.bin:$PATH" make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts Outdated
Comment thread src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts Outdated
@LeonidasZhak

Copy link
Copy Markdown
Author

Thanks, I pushed a follow-up commit addressing both review points:

  • Added a shared localStorage dispatch lock so multiple renderer windows do not send the same due scheduled prompt concurrently.
  • Reused the existing SendMessageError formatter so structured send failures, such as missing provider API keys, are stored as actionable messages instead of generic object output.
  • Added focused coverage for both the shared-lock path and formatted structured send errors.

Local verification: git diff --check passes. I was not able to run the focused Bun test in this temporary checkout because this machine does not currently have a working Bun executable; the attempted JS tool runs also stalled during startup, so I left CI/reviewer verification as the remaining gate.

@LeonidasZhak

Copy link
Copy Markdown
Author

Follow-up validation update: I installed the project dependencies in the temporary checkout with bun install --frozen-lockfile, fixed the lock test so its mocked send resolves cleanly, and reran the checks successfully.

Validation now passing locally:

  • /Users/zhak/.npm/_npx/60c3515df86f25b1/node_modules/bun/bin/bun.exe 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
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check

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 -->
@LeonidasZhak LeonidasZhak force-pushed the codex/scheduled-prompt-queue branch from 8d008ba to 8af60e1 Compare June 20, 2026 01:19
@LeonidasZhak

Copy link
Copy Markdown
Author

Rebased this PR onto the latest main and resolved the sidebar tab conflicts by keeping both the upstream Memory tab and this PR's Schedule tab.

Validation rerun locally:

  • 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.json
  • git diff --check
  • make static-check

@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Rebased this PR onto the latest main, updated the PR body to reflect the current full diff, and reran local validation on the current head.

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
  • focused ESLint for the changed ScheduledPrompts and right-sidebar tab files
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check
  • make static-check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/scheduledPromptAvailability.ts Outdated
@LeonidasZhak

LeonidasZhak commented Jun 20, 2026

Copy link
Copy Markdown
Author

@codex review

Addressed the child-task starting-state feedback: scheduled prompts are now unavailable for delegated task workspaces while taskStatus is queued or starting, matching the send-message guard.

Validation:

  • bun test --timeout=10000 ./src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts - 2 tests passed
  • ./node_modules/.bin/eslint src/browser/features/ScheduledPrompts/scheduledPromptAvailability.ts src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/App.tsx Outdated
@LeonidasZhak

Copy link
Copy Markdown
Author

@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:

  • bun test --timeout=10000 ./src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts ./src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.test.ts - 4 tests passed
  • ./node_modules/.bin/eslint src/browser/App.tsx src/browser/features/ScheduledPrompts/scheduledPromptAvailability.ts src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.ts src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.test.ts
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/features/ScheduledPrompts/scheduledPromptAvailability.ts Outdated
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the latest scheduled-dispatch feedback:

  • initializing workspaces are now treated as unavailable for scheduled dispatch
  • scheduled dispatch now uses a browser Web Locks exclusive lock when available, with the existing localStorage lock as fallback
  • each prompt is also claimed by transitioning its persisted state to sending and reading that claim back before send

Validation:

  • bun test --timeout=10000 ./src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx ./src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts ./src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.test.ts - 9 tests passed
  • ./node_modules/.bin/eslint src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.ts src/browser/features/ScheduledPrompts/useScheduledPromptDispatcher.test.tsx src/browser/features/ScheduledPrompts/scheduledPromptAvailability.ts src/browser/features/ScheduledPrompts/scheduledPromptAvailability.test.ts src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.ts src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.test.ts
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/App.tsx Outdated
@LeonidasZhak

Copy link
Copy Markdown
Author

@codex review

Addressed the cross-renderer scheduled prompt storage feedback: the App-level dispatcher target list now listens to native storage events for scheduledPrompts:* keys in addition to same-renderer persisted-state writes, so another renderer creating the first scheduled prompt can wake this renderer's dispatcher target calculation.

Validation:

  • bun test --timeout=10000 ./src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.test.ts - 2 tests passed
  • ./node_modules/.bin/eslint src/browser/App.tsx src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.ts src/browser/features/ScheduledPrompts/scheduledPromptDispatcherTargets.test.ts
  • ./scripts/generate-version.sh && ./node_modules/.bin/tsgo --noEmit --project tsconfig.json
  • git diff --check

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 448c630d85

ℹ️ 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".

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