Commit f202acf
refactor(scheduling): wire availability form to action and address PR review
- Make AvailabilityCalendar controlled (value/onChange) and SSR-safe via anchor prop
- Wire AvailabilityForm to selectAvailabilities with useActionState; submit button now actually submits
- Replace hardcoded hex colors with design tokens; use Textarea/Button/Label primitives
- Consolidate drag state into a single discriminated union (no more parallel state/ref pairs)
- Add keyboard support (Space/Enter to toggle) and improved aria-labels
- Remove hardcoded weekend block; daysOfWeek is now the single source of truth
- Fix tooltip to follow the pointer instead of being pinned to viewport center
- Persist optional coach message via notes field on coaching_sessions
- Rename users-availability-calendar -> availability-calendar
- Rename user-availability-calendar-submit-coach-message -> availability-form
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 8d7b873 commit f202acf
7 files changed
Lines changed: 660 additions & 567 deletions
File tree
- app/scheduling
- components/scheduling
- lib/scheduling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
131 | 140 | | |
132 | 141 | | |
133 | 142 | | |
| 143 | + | |
134 | 144 | | |
135 | 145 | | |
136 | 146 | | |
| |||
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
| 166 | + | |
156 | 167 | | |
157 | 168 | | |
158 | 169 | | |
| |||
0 commit comments