Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
First of five PRs for the new stepped "New session" dialog (schedule + reschedule). This one adds the pure scheduling logic and copy the dialog will use, and pulls out three helpers so the dialog reuses existing code. No UI changes; nothing renders the new modules yet.
Changes
src/lib/scheduling.ts: busy sessions on a day, slot overlap (touching edges are free), next free start, free half-hour slots within working hours (default 9–17), a person's usual slot (series start, else a weekday+time seen at least twice), suggested start times (usual → coach's frequent starts → round hours, free only, max 5), and step order for schedule/move modes.src/lib/scheduling-copy.ts: dialog labels (Who sub-lines, busy/overlap lines, repeat and submit labels, meeting-link line). ToastsscheduledMessage/rescheduledMessagego insession-change-message.ts.src/lib/people.ts:peopleFor,activityByPerson,menuPerson,initialsOfmove out of the Join session menu hook unchanged, so the dialog can share them.sessionEndInandtoSessionDateinsession-window.ts(replaces 2 inline copies);sessionWriteFailureinlib/api/coaching-session-errors.ts(the session form's error-to-toast chain, same messages); duration field rules (clampDuration, 15–180 in steps of 5, chips 30/45/50/60).Testing Strategy
tscand lint clean.Concerns