feat(web): offer host duration choices and preserve booked lengths #87

Merged
eleith merged 1 commits from feat/host-duration-choices into main 2026-10-24 01:43:59 +00:00

Summary

One commit: 5fe9d8b — host duration choices and preserved reschedule lengths. This is checkpoint 3 of the host booking plan; editing an existing appointment's duration remains a separate later slice.

  • Hosts can choose 15, 30, 45, 60, 90, 120, 180, 240 or 300 minutes, plus the meeting's configured lengths.
  • New bookings default to the configured length, not the first numerically sorted host option.
  • Rescheduling defaults to the actual stored appointment length. Keeping that length is allowed for either role; only changing to another length is restricted to the requester's ordinary choices. Guests cannot invent new host-only lengths.
  • The duration chooser remains reachable on the calendar, with an empty chosen-length horizon, and when the viewed day has no timeline geometry. Switching lengths uses existing local finite maps, not network reloads.

Data flow and boundaries

The existing duration module owns one cohesive BookingDurations result containing the explicit default and choices. The common availability reader uses it to compute slot maps; picker loaders pass that same returned result into projection. The parser and submit checks use the same policy with the same meeting, fixed endpoint role and trusted current row. No client changed flag, generic policy framework, global store or new workflow is needed.

The typed current appointment replaces the old exclusion-start string, supplying both stored elapsed duration and unchanged self-exclusion data without increasing validator argument counts. Existing create-day versus reschedule-horizon reads and daily-count behavior remain unchanged.

Public POSTs stay guest even with a host session or forged role/current-duration fields. Private POSTs stay authenticated host. Known actual conflicts, working hours, notice, horizon, spacing, state/approval rules and same-start rejection remain in force. Already-landed host buffer/day-cap exceptions are retained. No duration editor, mutation-service/worker/provider/schema/dependency or operating-doc changes.

Wrapper keys use stable meeting/appointment identity plus role, not query strings or refreshed data objects. This prevents mixing a new meeting with captured old maps without clearing an enhanced form on a same-identity refresh. General same-identity map resynchronization is not included.

Reviews and checks

Independent code and readability reviews found no introduced production defects or actionable readability issues. Final read-only review also checked the added browser proofs.

  • Shared declarations built before consumers; workspace check, lint, coverage and builds passed.
  • 1,977 workspace tests passed: config 135, DB 107, calendar 174, jobs 24, video 78, CLI 48, web 854, worker 557.
  • 48 browser tests passed, fresh isolated production fixture after builds, CI=1, retries=0, workers=4.
  • Additional browser proofs cover full host palette/configured default, no-fetch empty-state recovery, actual 90-minute host booking, guest retained 90 versus configured 25, omitted-duration preservation, role/current-duration forgery rejection, geometry-null controls, real client slug navigation and enhanced-failure field/length preservation.
  • Web checks: zero errors/warnings. Whitespace clean; new/touched awaited-argument/return violations: zero.
  • Twelve production files, 158 additions/57 deletions; the larger diff is primarily test coverage and API fixture updates. Dedicated unlisted browser meeting/schedule leaves existing chat/host-rules settings unchanged. Own fixed-app-group patch changeset included.

Explicitly separate bugs and limits

Review found two pre-existing defects, both reproduced independently on landed main aee8312 and filed as #85 (removed-meeting snapshot detail crash) and #86 (cross-route host form errors not displayed). Neither is fixed here. The enhanced-409 test proves retained inputs/length and the returned failure, not visible error feedback. No claims of stronger atomic conflict exclusion or fresh remote-calendar guarantees are introduced.

Existing nonblocking CLI esbuild ES2025 warnings are unchanged. No live application data/config, provider/SMTP calls, service restarts, releases or deployment were used. Ready for owner review; not merged.

## Summary One commit: **5fe9d8b — host duration choices and preserved reschedule lengths**. This is checkpoint 3 of the host booking plan; editing an existing appointment's duration remains a separate later slice. - Hosts can choose **15, 30, 45, 60, 90, 120, 180, 240 or 300 minutes**, plus the meeting's configured lengths. - New bookings default to the configured length, not the first numerically sorted host option. - Rescheduling defaults to the actual stored appointment length. Keeping that length is allowed for either role; only changing to another length is restricted to the requester's ordinary choices. Guests cannot invent new host-only lengths. - The duration chooser remains reachable on the calendar, with an empty chosen-length horizon, and when the viewed day has no timeline geometry. Switching lengths uses existing local finite maps, not network reloads. ## Data flow and boundaries The existing duration module owns one cohesive BookingDurations result containing the explicit default and choices. The common availability reader uses it to compute slot maps; picker loaders pass that **same returned result** into projection. The parser and submit checks use the same policy with the same meeting, fixed endpoint role and trusted current row. No client changed flag, generic policy framework, global store or new workflow is needed. The typed current appointment replaces the old exclusion-start string, supplying both stored elapsed duration and unchanged self-exclusion data without increasing validator argument counts. Existing create-day versus reschedule-horizon reads and daily-count behavior remain unchanged. Public POSTs stay guest even with a host session or forged role/current-duration fields. Private POSTs stay authenticated host. Known actual conflicts, working hours, notice, horizon, spacing, state/approval rules and same-start rejection remain in force. Already-landed host buffer/day-cap exceptions are retained. No duration editor, mutation-service/worker/provider/schema/dependency or operating-doc changes. Wrapper keys use stable meeting/appointment identity plus role, not query strings or refreshed data objects. This prevents mixing a new meeting with captured old maps without clearing an enhanced form on a same-identity refresh. General same-identity map resynchronization is not included. ## Reviews and checks Independent code and readability reviews found no introduced production defects or actionable readability issues. Final read-only review also checked the added browser proofs. - Shared declarations built before consumers; workspace check, lint, coverage and builds passed. - **1,977 workspace tests passed:** config 135, DB 107, calendar 174, jobs 24, video 78, CLI 48, web 854, worker 557. - **48 browser tests passed**, fresh isolated production fixture after builds, CI=1, retries=0, workers=4. - Additional browser proofs cover full host palette/configured default, no-fetch empty-state recovery, actual 90-minute host booking, guest retained 90 versus configured 25, omitted-duration preservation, role/current-duration forgery rejection, geometry-null controls, real client slug navigation and enhanced-failure field/length preservation. - Web checks: zero errors/warnings. Whitespace clean; new/touched awaited-argument/return violations: zero. - Twelve production files, 158 additions/57 deletions; the larger diff is primarily test coverage and API fixture updates. Dedicated unlisted browser meeting/schedule leaves existing chat/host-rules settings unchanged. Own fixed-app-group patch changeset included. ## Explicitly separate bugs and limits Review found two pre-existing defects, both reproduced independently on landed main aee8312 and filed as **#85** (removed-meeting snapshot detail crash) and **#86** (cross-route host form errors not displayed). Neither is fixed here. The enhanced-409 test proves retained inputs/length and the returned failure, **not visible error feedback**. No claims of stronger atomic conflict exclusion or fresh remote-calendar guarantees are introduced. Existing nonblocking CLI esbuild ES2025 warnings are unchanged. No live application data/config, provider/SMTP calls, service restarts, releases or deployment were used. Ready for owner review; not merged.
eleith-gitea-agent Bot added 1 commit 2026-10-24 01:38:17 +00:00
feat(web): add host duration choices and preserve booked lengths
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
5fe9d8ba0b
eleith merged commit 5fe9d8ba0b into main 2026-10-24 01:43:59 +00:00
eleith deleted branch feat/host-duration-choices 2026-10-24 01:43: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#87