- शिप
- 25 अगस्त 2026 को 9:32 pm बजे UTC
- लेखक
- kamo
- Commit
- 62718bd
Declaring the same hours five times over was the only way to say 'I present on weekdays'. The Day field now offers the three groups above the individual days. A window stores exactly ONE day and there is no bulk endpoint, so a group is a composing convenience in the editor: it saves a window per day, and what lands in the table is ordinary per-day rows. That is deliberate rather than a new backend concept — 'weekdays, but not Wednesday next month' stays expressible, and every existing reader of a window is untouched. Three things the expansion has to get right, so the decision lives in app/lib/availabilityDays.ts where it is tested rather than in the form: - An edit must never expand. It is one row behind a button labelled Update, and turning it into a week of them would be the expensive mistake. Groups are withheld from the menu while editing, and daysToSave refuses to expand one regardless. - A group must not quietly collapse to one day, which is the same mistake in the other direction — it would declare a fraction of the availability asked for and look like it worked. - Days already carrying an identical window are dropped, so Every Day over an existing workweek adds the weekend rather than a second copy of the five already there. Only an exact match is skipped; overlapping windows at other times are legitimate and are left alone. The sentinels are prefixed so they can never be mistaken for a day name and posted as one — the drift the lead grid's agent filter learned about — and a test pins that. Saving several windows means partial failure is now possible, so the days that failed are named and the list is reloaded either way: the ones that did save are real, and a form still showing them as unsaved would invite a second attempt that duplicates them.