Skip to content

Schedules redesign 4/5: form and stores rewrite#3551

Open
tegan-temporal wants to merge 9 commits into
feature/schedulesfrom
tegan/schedules-pr4-form
Open

Schedules redesign 4/5: form and stores rewrite#3551
tegan-temporal wants to merge 9 commits into
feature/schedulesfrom
tegan/schedules-pr4-form

Conversation

@tegan-temporal

Copy link
Copy Markdown
Contributor

Description & motivation 💭

Fourth of five PRs splitting the schedules redesign, stacked on #3550 (and includes #3548's holocene commits, which drop out of the diff once that merges; base auto-retargets as the stack lands).

The create/edit experience:

  • New schedule-form/ built on superforms + the PR 3 schema: spec cards supporting cron / days-of-week / days-of-month / interval kinds, a policies drawer (overlap, catchup with snap-back-to-default, timeouts), and a live summary sidebar
  • stores/schedules.ts rewritten: confirmationModal state machine, per-action submit functions, serverError/actionPending; schedule-service create/edit take the typed ScheduleRequestBody
  • pages/schedules-create.svelte / schedule-edit.svelte adopt the new form; the delete modal moves to schedule-action-modals/ (the rest of the action modals land in PR 5)
  • Deletes the superseded form components (calendar/interval/time views, day pickers' consumers), the holocene day-of-week/day-of-month/month pickers, and schedule-data-formatting

The view page is intentionally untouched — it keeps working against the rewritten store (it only consumes loading, schedulesCount, schedulesRefresh, which survive). PR 5 replaces it.

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

pnpm check 0 errors, pnpm lint 0 errors, 2,133 unit tests passing, full integration suite 221 passed / 0 failed. The create/edit integration specs now assert the actual request bodies (e.g. a weekly spec submits month: [{start: 1, end: 12}], cron strings submit verbatim without comment suffixes) and round-trip preservation of fields the form doesn't model (excludeStructuredCalendar, exact startTime, string-encoded int64 remainingActions).

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

Create and edit schedules end-to-end: each spec kind, the policies drawer (empty a duration field and blur — it snaps back to its default), and editing an existing schedule with fields the form doesn't expose.

Checklists

Merge Checklist

🤖 Generated with Claude Code

tegan-temporal and others added 5 commits June 11, 2026 10:54
Additive component changes split out of the schedules feature work:
new ButtonRadioGroup, new code icon, optional props across inputs and
pickers (DatePicker id/clearable, TimePicker idPrefix/error, Checkbox
description, NumberInput error, Panel as, PayloadInput placeholder/
copyable), Svelte 5 conversion of RadioGroup, DurationInput rework,
and styling refinements. No deletions and no behavior changes for
existing consumers.

Co-Authored-By: Claude Fable 5 <[email protected]>
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]>
Replaces the schedule create/edit form with the redesigned superforms-
based implementation (spec cards with cron/week/month/interval kinds,
policies drawer, live summary sidebar) and rewrites the schedules store
around a confirmation-modal state machine with per-action submit
functions. Deletes the superseded form components, the holocene
day/week/month pickers they used, and schedule-data-formatting.
Integration tests now assert request bodies on create and round-trip
preservation on edit.

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:07
@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 15, 2026 9:18pm

Request Review

Removing the only spec resets the list to a fresh expanded cron spec,
and collapsed specs are always removable.

Co-Authored-By: Claude Fable 5 <[email protected]>
The summary sidebar now shows the same end-of-day instant the submit
produces instead of midnight UTC of the bare date string, and a test
asserts the submitted end time re-anchors when the timezone changes.

Co-Authored-By: Claude Fable 5 <[email protected]>
Base automatically changed from tegan/schedules-pr3-domain to feature/schedules 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