feat(web): reschedule time, duration, or both #113

Merged
eleith merged 1 commits from feat/reschedule-duration into main 2026-11-02 00:14:59 +00:00

Summary

Closes #105.

  • Allow guests and admins to change the start time, duration, or both. Keep the existing guest choices plus the actual booked length, and the existing broader admin palette; no arbitrary minute entry.
  • Reject only an unchanged interval, comparing both endpoints as instants. Normalize equivalent timestamp spellings before availability checks, and repeat the no-op check against the fresh row inside the existing write transaction to handle concurrent duration edits without extra history, token changes or enqueueing.
  • Start rescheduling on calendar Step 1 with the original local day, start and duration selected. Keep normal Back/Continue/Confirm navigation available for unchanged or incomplete drafts; gate only final submission on a complete, offered, changed interval and valid form. Cover the visible CTA, native Enter submission and enhance cancellation.
  • Retain the selected start when a changed duration fits; otherwise clear it and explain outside the summary. Never inject an unavailable original interval into offered slots or silently select another time/day.
  • Apply incoming day/slot intent once the viewer timezone is known, support cookie-backed SSR, and avoid guessed initial times or replaying stale query intent after timezone edits.
  • Restore pending guests' saved location dropdown selection only when it exactly matches a configured public location choice. Keep the ordinary pending appointment projection and private host-entered details unchanged.

Reschedule summary

  • Three equal desktop columns: Back to appointment | Original | Proposed. Keep return navigation separate from plain appointment facts, with matching dividers.
  • On mobile, use a centered full-width return link above two side-by-side fact columns; remove side borders, rounded corners and bottom margin.
  • Show compact local dates and start–end time ranges instead of duration labels. End times stay time-only across midnight; incomplete facts remain factual placeholders.

Validation

  • Full web V8 coverage: 1,109 tests / 79 files passed, coverage thresholds unchanged.
  • Native Kit sync and svelte-check: 0 errors / 0 warnings. Full web Prettier/ESLint, changeset formatting and native production build passed.
  • 12 targeted existing browser journeys passed, one worker, stop on first failure, no retries. Includes both roles and picker modes, no-op/direct requestSubmit and successful Enter paths, cookie-backed server HTML, UTC+14/no-cookie timezone intent, cross-midnight ranges, chain capabilities/history, pending guest/host dropdown prefill, form/conflict preservation and desktop/mobile layout.
  • Independent code, readability and test-value reviews completed. The readability finding concerned test layout organization; production readability review reported no findings. Extracted a file-local layout helper and strengthened the existing submission/SSR proofs without adding another browser harness or case.

Web-only change with a patch changeset. No dependency, worker, shared-package, configuration-schema or CI-policy changes. Local owner changes to mise.toml and pnpm-lock.yaml are excluded in full; local checks used the installed dependency graph. No release, deployment or merge action; owner will land the PR.

## Summary Closes #105. - Allow guests and admins to change the start time, duration, or both. Keep the existing guest choices plus the actual booked length, and the existing broader admin palette; no arbitrary minute entry. - Reject only an unchanged interval, comparing both endpoints as instants. Normalize equivalent timestamp spellings before availability checks, and repeat the no-op check against the fresh row inside the existing write transaction to handle concurrent duration edits without extra history, token changes or enqueueing. - Start rescheduling on calendar Step 1 with the original local day, start and duration selected. Keep normal Back/Continue/Confirm navigation available for unchanged or incomplete drafts; gate only final submission on a complete, offered, changed interval and valid form. Cover the visible CTA, native Enter submission and enhance cancellation. - Retain the selected start when a changed duration fits; otherwise clear it and explain outside the summary. Never inject an unavailable original interval into offered slots or silently select another time/day. - Apply incoming day/slot intent once the viewer timezone is known, support cookie-backed SSR, and avoid guessed initial times or replaying stale query intent after timezone edits. - Restore pending guests' saved location dropdown selection only when it exactly matches a configured public location choice. Keep the ordinary pending appointment projection and private host-entered details unchanged. ## Reschedule summary - Three equal desktop columns: **Back to appointment | Original | Proposed**. Keep return navigation separate from plain appointment facts, with matching dividers. - On mobile, use a centered full-width return link above two side-by-side fact columns; remove side borders, rounded corners and bottom margin. - Show compact local dates and start–end time ranges instead of duration labels. End times stay time-only across midnight; incomplete facts remain factual placeholders. ## Validation - Full web V8 coverage: **1,109 tests / 79 files passed**, coverage thresholds unchanged. - Native Kit sync and svelte-check: **0 errors / 0 warnings**. Full web Prettier/ESLint, changeset formatting and native production build passed. - **12 targeted existing browser journeys passed**, one worker, stop on first failure, no retries. Includes both roles and picker modes, no-op/direct requestSubmit and successful Enter paths, cookie-backed server HTML, UTC+14/no-cookie timezone intent, cross-midnight ranges, chain capabilities/history, pending guest/host dropdown prefill, form/conflict preservation and desktop/mobile layout. - Independent code, readability and test-value reviews completed. The readability finding concerned test layout organization; production readability review reported no findings. Extracted a file-local layout helper and strengthened the existing submission/SSR proofs without adding another browser harness or case. Web-only change with a patch changeset. No dependency, worker, shared-package, configuration-schema or CI-policy changes. Local owner changes to mise.toml and pnpm-lock.yaml are excluded in full; local checks used the installed dependency graph. No release, deployment or merge action; owner will land the PR.
eleith-gitea-agent Bot added 1 commit 2026-11-02 00:05:33 +00:00
feat(web): allow duration-aware rescheduling
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
a1a3d31277
eleith merged commit a1a3d31277 into main 2026-11-02 00:14:59 +00:00
eleith deleted branch feat/reschedule-duration 2026-11-02 00:14:59 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/when#113