Encapsulate calendar projection and selection ranges #276

Closed
opened 2026-10-15 21:52:15 +02:00 by nessar · 0 comments
Owner

What to build

Project a displayed plan or declaration-entry configuration into its covered months and calendar selections through one coherent operation. Calendar components can render day types and connected selection boundaries without inspecting or coordinating mutable raw and grouped ranges. Users retain the same leave, declared-day, weekend, holiday, and context-date presentation.

Acceptance criteria

  • Build selections from the complete range list and perform grouping internally. Remove the public raw/grouped-array mutation contract and caller-required update sequence; expose read-only selection, boundary, and day-type queries needed by the calendar.
  • Return covered months together with projected selections from the existing calendar projection boundary. Use that result for month enumeration and selected-day rendering so both share the same projection horizon.
  • Preserve the half-open planning horizon and distinguish it from adjacent displayed context dates. Time-off periods can extend into a preceding or following month or year without making those context dates eligible for a new leave placement or declaration.
  • Preserve declared-only time-off periods, adjacent declarations that belong to a connected period, exclusion of unrelated declarations outside the projection, and declaration-entry projection without a calculated plan. Changing input dates does not silently change the accepted result's horizon.
  • Preserve overlapping and adjacent selections, selection boundaries, today markers, weekend and public-holiday classes, localized tooltips, and accessible day labels. Typed queries return day types; presentation components retain localized wording and declared-day explanations.
  • Preserve declaration range previews, toggling and erasure, keyboard selection, context-date disabling, and highlighting of the selected placement and explained time-off period. Remove unused min/max tracking as part of replacing the selection representation.
  • Update all calendar callers and fixtures in the same change. Replace tests of internal synthetic groups with behavior assertions for visible day types and boundaries, retaining timezone, daylight-saving, partial-month, cross-year, and declared-day coverage.
  • Run the affected projection, month, year, and declaration-interaction checks plus required static checks and build. Confirm the submitted plan and its original horizon are not mutated by projection.

Integration

Use the shared feature/planning-architecture branch. This ticket can start independently of calculation ownership and worker lifetime changes; coordinate shared calendar callers when integrating their complete replacements. The final combined verification gate is recorded in ticket #275. Preserve the existing saved-data contracts and planning decisions; no new dependency or alternate projection path is required.

Blocked by

  • None — can start immediately.
## What to build Project a displayed plan or declaration-entry configuration into its covered months and calendar selections through one coherent operation. Calendar components can render day types and connected selection boundaries without inspecting or coordinating mutable raw and grouped ranges. Users retain the same leave, declared-day, weekend, holiday, and context-date presentation. ## Acceptance criteria - [ ] Build selections from the complete range list and perform grouping internally. Remove the public raw/grouped-array mutation contract and caller-required update sequence; expose read-only selection, boundary, and day-type queries needed by the calendar. - [ ] Return covered months together with projected selections from the existing calendar projection boundary. Use that result for month enumeration and selected-day rendering so both share the same projection horizon. - [ ] Preserve the half-open planning horizon and distinguish it from adjacent displayed context dates. Time-off periods can extend into a preceding or following month or year without making those context dates eligible for a new leave placement or declaration. - [ ] Preserve declared-only time-off periods, adjacent declarations that belong to a connected period, exclusion of unrelated declarations outside the projection, and declaration-entry projection without a calculated plan. Changing input dates does not silently change the accepted result's horizon. - [ ] Preserve overlapping and adjacent selections, selection boundaries, today markers, weekend and public-holiday classes, localized tooltips, and accessible day labels. Typed queries return day types; presentation components retain localized wording and declared-day explanations. - [ ] Preserve declaration range previews, toggling and erasure, keyboard selection, context-date disabling, and highlighting of the selected placement and explained time-off period. Remove unused min/max tracking as part of replacing the selection representation. - [ ] Update all calendar callers and fixtures in the same change. Replace tests of internal synthetic groups with behavior assertions for visible day types and boundaries, retaining timezone, daylight-saving, partial-month, cross-year, and declared-day coverage. - [ ] Run the affected projection, month, year, and declaration-interaction checks plus required static checks and build. Confirm the submitted plan and its original horizon are not mutated by projection. ## Integration Use the shared `feature/planning-architecture` branch. This ticket can start independently of calculation ownership and worker lifetime changes; coordinate shared calendar callers when integrating their complete replacements. The final combined verification gate is recorded in ticket [#275](https://gitea.nessar.fr/nessar/vac-optimizer/issues/275). Preserve the existing saved-data contracts and planning decisions; no new dependency or alternate projection path is required. ## Blocked by - None — can start immediately.
nessar added the ready-for-agent label 2026-10-15 21:52:15 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nessar/vac-optimizer#276