Skip to content

Schedules redesign 3/5: domain schema, types, and utilities#3550

Merged
tegan-temporal merged 3 commits into
feature/schedulesfrom
tegan/schedules-pr3-domain
Jun 15, 2026
Merged

Schedules redesign 3/5: domain schema, types, and utilities#3550
tegan-temporal merged 3 commits into
feature/schedulesfrom
tegan/schedules-pr3-domain

Conversation

@tegan-temporal

Copy link
Copy Markdown
Contributor

Description & motivation 💭

Third of five PRs splitting the schedules redesign, stacked on #3549 (the base will retarget to feature/schedules automatically when #3549 merges).

The pure logic layer — no UI changes:

  • schedule/schema/: zod form schemas (flat spec schema with a kind discriminator field, duration-with-default preprocessing)
  • schedule/utilities/: spec summarization engine (fragment-based, bounded-window phrasing like "Every 15 minutes 09:00-17:00 on weekdays"), request-body builder with round-trip preservation of fields the form doesn't model, cron validation (rejects #), schedule→form mapping, range/duration/date helpers — all with unit tests
  • types/schedule.ts: new HTTP request/response types (ScheduleRequestBody family, DurationString)
  • en/schedules.ts: new keys for the redesigned UI
  • Adds cronstrue

Split-specific notes for reviewers:

  • Legacy types (ScheduleParameters family, Unspecified overlap, etc.) and legacy i18n keys are retained because the existing pages still consume them — PR 5 deletes them.
  • DescribeFullSchedule.schedule stays the wide Schedule type for now (the narrowed ScheduleResponse is exported but unwired) so the existing stores keep compiling; PR 4 adopts it with the stores rewrite.

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

pnpm check 0 errors, pnpm lint 0 errors, 2,155 unit tests passing (existing suite + ~120 new tests for the utilities/schema layer).

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

pnpm test -- --run src/lib/components/schedule exercises the new layer; nothing user-visible changes until PR 4.

Checklists

Merge Checklist

🤖 Generated with Claude Code

tegan-temporal and others added 2 commits June 11, 2026 10:57
Adds date-name and list Intl formatters, ordinal plural support in the
i18n replace types, new common locale strings, and a sortNumbers array
utility. Removes the unused common.timezone key.

Co-Authored-By: Claude Fable 5 <[email protected]>
Pure logic layer for the schedules redesign: zod form schemas, request/
response types, and utilities for summarizing specs, building request
bodies, parsing cron strings, and mapping schedules into form state,
with unit tests. Adds cronstrue. Legacy types and i18n keys consumed by
the existing pages are retained; they are removed in the final PR of
the stack.

Co-Authored-By: Claude Fable 5 <[email protected]>
@tegan-temporal
tegan-temporal requested a review from a team as a code owner June 11, 2026 18:02
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jun 11, 2026 6:48pm

Request Review

Comment thread pnpm-lock.yaml Outdated
@@ -7425,16 +7414,16 @@ packages:
peerDependencies:
vitest: '*'

[email protected]:
resolution: {integrity: sha512-xejya+bT/j/+R/AGa1XOfRxLmNUlLtlwjRsFUILF+xHfzElmGcmFydy2gqqIrd62ptIEfwVMofd19uNWD9L7Nw==}
[email protected]:

@semgrep-managed-scans semgrep-managed-scans Bot Jun 11, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: Affected versions of vitest are vulnerable to Missing Authorization. When the Vitest UI server is listening, the deprecated isFileServingAllowed check is applied without normalizing the URL before filesystem operations, allowing path traversal that lets an attacker read, write, and execute arbitrary files outside the project directory.

Manual Review Advice: A vulnerability from this advisory is reachable if you run the Vitest UI on Windows, or you expose the Vitest UI server to the network with the --api.host flag or api.host config option

Fix: Upgrade this library to at least version 3.2.6 at ui/pnpm-lock.yaml:7417.

Reference(s): GHSA-5xrq-8626-4rwp

🚀 Fixed in commit d5b610f 🚀

Base automatically changed from tegan/schedules-pr2-i18n-utils to feature/schedules June 15, 2026 20:43
@tegan-temporal
tegan-temporal merged commit 0c1b84e into feature/schedules Jun 15, 2026
7 checks passed
@tegan-temporal
tegan-temporal deleted the tegan/schedules-pr3-domain branch June 15, 2026 20:43
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.

2 participants