- Add AllocationController with CRUD + bulk endpoints - Add AllocationValidationService for capacity/estimate validation - Add AllocationMatrixService for optimized matrix queries - Add AllocationPolicy for authorization - Add AllocationResource for API responses - Add frontend allocationService and matrix UI - Add E2E tests for allocation matrix (20 tests) - Add unit tests for validation service and policies - Fix month format conversion (YYYY-MM to YYYY-MM-01)
1.6 KiB
1.6 KiB
Decision Log: capacity-expert-mode
2026-02-24 — Timezone & Accessibility Fixes
Issue
User reported that weekend shading in Expert Mode was misaligned (showing on 5th/6th instead of 4th/5th for April 2026). Additionally, the shading was too subtle for colorblind users, and cells were not prefilled with O/H for weekends/holidays.
Root Cause
Browser new Date('YYYY-MM-DD') interprets dates in local timezone, causing dates to shift for users west of UTC. A user in UTC-6 sees 2026-04-04 as 2026-04-03T18:00, which reports as Friday instead of Saturday.
Decisions Made
| # | Decision | Rationale |
|---|---|---|
| D8 | Use Eastern Time (America/New_York) as canonical timezone for weekend/holiday detection | Ensures consistent business-day alignment; future configurable |
| D9 | Use high-contrast styling for weekends/holidays (solid backgrounds + borders) | Accessibility for colorblind users |
| D10 | Prefill weekends with O, holidays with H on grid load |
Matches user expectations; reduces manual entry |
| D11 | Frontend and backend must sync when seeding default values | Prevents divergent behavior on refresh |
Implementation Notes
- Frontend: Parse dates as
new Date(dateStr + 'T00:00:00')to avoid timezone drift - Backend: Use Carbon with
America/New_Yorktimezone - Both sides must implement identical prefill logic
Future Considerations
- Make timezone configurable per-team or per-user (v2)
- Extract prefill rules to shared configuration
Earlier Decisions
See design.md sections D1-D7 for original design decisions.