fix(availability): a meeting type's working hours are its whole week (#127) - #134
Merged
Conversation
Per-(type, host) optional override of the write calendar, stored as a (credential id, Google calendar id) pair so it survives the delete+reinsert CalendarSelectionService.save() does to google_calendar rows. Lands after calit-rma2, which stores the per-booking event address; without it, setting an override on a type with future bookings orphans those events by design. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f4ahdPRUMmSQQcXvjkc9Y
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f4ahdPRUMmSQQcXvjkc9Y
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f4ahdPRUMmSQQcXvjkc9Y
A meeting type's weekly grid used to be a per-WEEKDAY override: any day it left blank fell back to the owner's global hours for that day-of-week. A type configured for Mon+Tue only was therefore bookable every other day the global grid covered, with no way to say "not available on Thursday" for one type short of a date override per calendar date. Weekly rules are now all-or-nothing per type. A type that defines ANY rule owns its week and a weekday with no frames is closed; only a type with no rules at all still inherits the global week (so editing the global grid keeps propagating to types nobody has touched). No migration: existing partly configured types simply close the days they never filled in, which is the reported bug. So that the first save cannot silently close six days, a type with no hours of its own renders its grid PREFILLED from the owner's global week -- same for a co-host's own grid on a shared type -- and every day row gains a "Remove availability" button (workplan.js data-clear-day) that empties that day. Hints reworded on all three grids, de + he translated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f4ahdPRUMmSQQcXvjkc9Y
|
asm0dey
added a commit
that referenced
this pull request
Aug 17, 2026
Brings in 1.20.2 and the per-type working-hours fix (#134). Only conflict was the calit-rma2 bean file: main added an 'Amended 2026-08-17' note recording that google_calendar_id is text rather than VARCHAR(255), while this branch closed the bean out. Both kept — the amendment is the constraint V26 was written against. pom.xml auto-merged cleanly: version 1.20.2 from main, jackson-core 2.22.2 and spotless 3.10.0 from this branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f4ahdPRUMmSQQcXvjkc9Y
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.



Closes #127.
The bug
A meeting type's weekly grid was a per-weekday override: a day it left blank fell back to the owner's global hours for that day-of-week (
SlotService.windowsFor). So a type configured Mon+Tue only stayed bookable every other day the global grid covered — the reporter's booking page offered all seven days while the type's editor showed hours on two. There was also no way to say "not available on Thursday" for a single type, short of one date override per calendar date.Not a regression: the fallback dates back to the first availability commit (
25c8073). Ruled out along the way — #122 (viewer-local labels predate it), mis-owned rules (owner_idNOT NULL since V8).The change
Weekly rules are now all-or-nothing per type:
No migration. Existing partly-configured types simply close the days they never filled in — that is the fix, not a side effect. (A V26 that back-filled those days from global was written and then dropped deliberately.)
Editor changes
So a first save can't silently close six days:
workplan.js,data-clear-day) that empties that day; saving then closes itde+hetranslated alongsideTests
823/823green.SlotServiceTest.typeWithAnyRuleIsClosedOnTheDaysItLeavesBlank— written red first, confirmed failing against the old fallbackSlotServiceTest.typeWithoutOwnRulesStillUsesGlobalHours— pins the inherit pathAdminTypeHoursPrefillTest— prefill on, prefill off once the type owns hours, clear-day button on both gridsFollow-up
docs-site (
usage/) still needs the new semantics written up — not in this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_017f4ahdPRUMmSQQcXvjkc9Y