Refresh Week Ahead calendar availability with atomic reflow #1266

Closed
opened 2026-08-22 14:23:25 +00:00 by rockachopa · 0 comments
Member

Evidence

Week Ahead persists calendar-derived free windows, but the rolling seven-day view can outgrow those dated overrides and fall back to generic weekday defaults. Refresh currently applies capacities immediately (frontend/week-calendar-import.js) while reflow is a separate action (frontend/week-plan.js), so a calendar change can persist an overloaded intermediate plan. Historical issue/PR and recent commit searches found calendar import (#1206/#1208/#1212), reflow (#1226), rolling defaults (#1256), and free-window persistence (#1258), but no combined refresh-and-reflow flow.

User outcome

From the private calendar import, show current → refreshed capacity and planned load for every date. When refreshed availability overloads planned days, preview deterministic moves and apply capacities plus reflow in one Week update while preserving opted-in free windows and every work identity exactly once.

Acceptance

  • Seven privacy-safe comparison cards show old/new capacity, delta, planned load, and overload state without calendar details.
  • A fitting refresh performs one staged Week write.
  • An overloaded refresh previews reflow and one Apply action stages/flushed the complete plan once.
  • Reflow preserves refreshed free windows and each planned identity exactly once; work that cannot fit is reported unscheduled.
  • Invalid/unsupported imports and cancel perform no writes.
  • Focused behavioral tests and full suite pass.

Implementation uses strict TDD and closes this issue from a deterministic branch.

## Evidence Week Ahead persists calendar-derived free windows, but the rolling seven-day view can outgrow those dated overrides and fall back to generic weekday defaults. Refresh currently applies capacities immediately (`frontend/week-calendar-import.js`) while reflow is a separate action (`frontend/week-plan.js`), so a calendar change can persist an overloaded intermediate plan. Historical issue/PR and recent commit searches found calendar import (#1206/#1208/#1212), reflow (#1226), rolling defaults (#1256), and free-window persistence (#1258), but no combined refresh-and-reflow flow. ## User outcome From the private calendar import, show current → refreshed capacity and planned load for every date. When refreshed availability overloads planned days, preview deterministic moves and apply capacities plus reflow in one Week update while preserving opted-in free windows and every work identity exactly once. ## Acceptance - Seven privacy-safe comparison cards show old/new capacity, delta, planned load, and overload state without calendar details. - A fitting refresh performs one staged Week write. - An overloaded refresh previews reflow and one Apply action stages/flushed the complete plan once. - Reflow preserves refreshed free windows and each planned identity exactly once; work that cannot fit is reported unscheduled. - Invalid/unsupported imports and cancel perform no writes. - Focused behavioral tests and full suite pass. Implementation uses strict TDD and closes this issue from a deterministic branch.
timmy was assigned by rockachopa 2026-08-22 14:23:25 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#1266
No description provided.