Skip to content

feat(scheduled-tasks): choose a monthly run date - #25479

Closed
rolaca11 wants to merge 2 commits into
pingdotgg:mainfrom
rolaca11:t3/scheduled-task-month-day
Closed

rolaca11 wants to merge 2 commits into
pingdotgg:mainfrom
rolaca11:t3/scheduled-task-month-day

Conversation

@rolaca11

@rolaca11 rolaca11 commented Oct 26, 2026 •

Copy link
Copy Markdown

Problem

A 30-day interval drifts across months. Scheduled tasks need a selectable calendar date.

Change

Add Monthly with a day from 1 to 31 and an environment-local time. Skip months without that date. Support web/desktop, mobile, and existing MCP tools; rename "At a time" to "Weekly".

Use the existing server capability system to block unsupported monthly saves while preserving drafts.

Scope and approval

Submitted under the focused configuration exception: this adds a recurrence choice within existing scheduled tasks, reusing their lifecycle and execution. Existing schedules and defaults stay unchanged. Maintainer approval is not claimed; eligibility remains their decision.

Verification

  • vp run check:changed passed: 68 tests, affected typechecks, lint, formatting, and Knip. Coverage includes calendar boundaries, persistence, and compatibility gates.
  • Saved a paused monthly task on day 31 in the isolated web client.
  • Native mobile, Electron, mixed-version connections, and remote/relay were not exercised.

Captures show the label rename; Monthly is present in both. Browser timeouts prevented a pre-feature baseline capture.

Before label rename After label rename
Before After

Saved monthly task on day 31

Implementation and independent review: GPT-6.1 Sol through the Codex harness in T3 Code.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T09:28:22.491504Z
We couldn’t complete this review. Comment @codex review to try again.
e3fcc19 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 26, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This is a cross-cutting, user-facing monthly scheduling capability that extends shared contracts and MCP input, changes server execution and rescheduling, and adds web and mobile editors. Existing paths appear preserved and tests are included, but the production scope and new product behavior warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 296249e and e3fcc19.

Files selected for processing: 11
  • apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx
  • apps/mobile/src/features/settings/scheduledTaskDraft.test.ts
  • apps/mobile/src/features/settings/scheduledTaskDraft.ts
  • apps/server/src/environment/ServerEnvironment.test.ts
  • apps/server/src/environment/ServerEnvironment.ts
  • apps/web/src/components/settings/ScheduledTasksSettings.browser.test.tsx
  • apps/web/src/components/settings/ScheduledTasksSettings.tsx
  • apps/web/src/components/settings/scheduledTasksSettings.logic.test.ts
  • apps/web/src/components/settings/scheduledTasksSettings.logic.ts
  • packages/contracts/src/environment.test.ts
  • packages/contracts/src/environment.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Monthly schedules are now represented in task contracts and handled by server run calculations. Web and mobile settings support monthly schedules when the environment advertises the capability. Schedules specify a time and a day from 1 to 31; months without that day are skipped.

Changes: Monthly Scheduled Tasks

Layer / File(s) Summary
Schedule contracts and capability
packages/contracts/src/scheduledTask.ts, packages/contracts/src/scheduledTask.test.ts, packages/contracts/src/orchestratorMcp.ts, packages/contracts/src/environment.ts, packages/contracts/src/environment.test.ts, apps/server/src/environment/ServerEnvironment.ts, apps/server/src/environment/ServerEnvironment.test.ts
The contracts accept monthly schedules with a day from 1 to 31. The environment capability schema adds optional monthlyScheduledTasks, and the server descriptor advertises it as supported.
Web and mobile draft conversion
apps/web/src/components/settings/scheduledTasksSettings.logic.ts, apps/web/src/components/settings/scheduledTasksSettings.logic.test.ts, apps/mobile/src/features/settings/scheduledTaskDraft.ts, apps/mobile/src/features/settings/scheduledTaskDraft.test.ts
Draft logic converts monthly schedules, validates the day and time against the capability, and detects changes to the selected day.
Monthly run calculation and persistence
apps/server/src/scheduledTasks/Schedule.ts, apps/server/src/scheduledTasks/Schedule.test.ts, apps/server/src/scheduledTasks/ScheduledTaskService.schedule.test.ts
The server calculates monthly run dates, skips months without the selected day, compares monthly schedules, and applies the missed-run grace period. Tests cover date boundaries and schedule persistence.
Web and mobile schedule controls
apps/web/src/components/settings/ScheduledTasksSettings.tsx, apps/web/src/components/settings/ScheduledTasksSettings.browser.test.tsx, apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx, docs/user/project-settings.md
The settings editors add a Monthly option and a day selector while retaining weekly controls. Unsupported monthly drafts remain visible but cannot be saved. Monthly summaries show the selected day and time, and the interface and documentation state that months without the selected day are skipped.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Suggested reviewers: macroscopeapp, juliusmarminge, t3dotgg

Merge Risk: Minimal · up to e3fcc

No actionable issue is established for this change; it is mergeable after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description includes all required sections and provides clear problem, implementation, verification results, UI evidence, and untested scenarios. However, the change adds a new scheduling workflow… Obtain and link explicit maintainer approval for the change’s direction and scope, including the approval comment. Alternatively, provide a specific justification that this broader scheduling behavior qualifies for the focused configuration…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding a selectable monthly run date for scheduled tasks.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes all required sections and provides clear problem, implementation, verification results, UI evidence, and untested scenarios. However, the change adds a new scheduling workflow and explicitly states that no maintainer approval was obtained, while the template requires explicit approval unless the focused configuration exception clearly applies.

Resolution

Obtain and link explicit maintainer approval for the change’s direction and scope, including the approval comment. Alternatively, provide a specific justification that this broader scheduling behavior qualifies for the focused configuration exception, consistent with CONTRIBUTING.md.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@rolaca11
rolaca11 force-pushed the t3/scheduled-task-month-day branch from b4bfe5c to 296249e Compare October 26, 2026 12:53

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

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

@nacholibre

Copy link
Copy Markdown

Heads-up for whoever reviews this: #26001 solves the same problem with a different design, so you can compare the two.

  • It was proposed with an implementation in Monthly option for fixed-time scheduled tasks #19009 on Oct 20.
  • It takes several days of the month plus an optional set of months, such as the 5th of January, April, July and October.
  • A day a month doesn't have runs on that month's last day instead of being skipped.
  • It keeps the At a time label.
  • It also gates the new fields on a server capability.

I'm happy to go with whichever direction maintainers prefer.

Written with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code.

@rolaca11

Copy link
Copy Markdown
Author

@nacholibre I like your design, too. I think what I prefer from my approach is the separation to Weekly/Monthly tab, while your date picker is probably better than mine. Maybe a mix of the 2 PRs could yield the best result

@t3-code-bot

t3-code-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

closing at @StiensWout's request under Provide evidence for the changed behavior.

Adds a Monthly schedule tab, day-of-month controls and associated mobile/web editor states, but does not supply a pre-feature before screenshot. Both supplied comparison images already show Monthly selected and the day selector; they compare At a time versus Weekly wording and different draft values. The author expressly admits the missing baseline. This is an inadequate comparison for the actual UI feature, not an inaccessible artifact.

submission evidence: "Captures show the label rename; Monthly is present in both. Browser timeouts prevented a pre-feature baseline capture."

Attach a clear pre-feature task-editor baseline and matching after screenshots demonstrating the new Monthly controls; retain the existing screenshots as supplementary evidence.

thanks for trying to help improve t3 code. if you think this closure was a mistake, please open a fresh pr addressing the requirement above, and link back to this one.

@t3-code-bot t3-code-bot Bot closed this Oct 30, 2026
@nacholibre

Copy link
Copy Markdown

@rolaca11 thanks for the kind words, and sorry this one was closed. Your split into Weekly and Monthly tabs is a fair idea. If maintainers prefer that layout for #26001, I'm happy to bring it in there.

Written with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants