Archived proposals:
- add-trigger-conditions-weekly-subscription: Trigger conditions and weekly subscription
- update-api-consistency: WebSocket auth, optimistic locking, workload defaults
All implementations were already complete in previous commits (f5f870d).
Updated tasks.md with implementation summary.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
1. Implementation
- 1.1 Update WebSocket auth spec and align server handshake/error messaging with the agreed behavior
- 1.2 Update optimistic locking conflict response spec and implement standardized payload
- 1.3 Update workload heatmap defaults (hide_empty, week window) and cache behavior
- 1.4 Update frontend workload views and API handling if required by new defaults
- 1.5 Add/adjust tests for WebSocket auth, conflict responses, and workload heatmap defaults
Implementation Summary
Changes Made (commit f5f870d)
-
WebSocket Auth (
backend/app/api/websocket/router.py)- Standardized error codes: 4001 (invalid token), 4003 (access denied), 4004 (not found)
- Clear error reasons in WebSocket close messages
-
Optimistic Locking (
backend/app/api/tasks/router.py)- 409 Conflict response with standardized payload:
error: "conflict"message,current_version,provided_version,your_version
- 409 Conflict response with standardized payload:
-
Workload Heatmap (
backend/app/api/workload/router.py,workload_service.py)hide_empty=Trueas default- Caching only when
hide_empty=True - Week bounds handle Sunday correctly (returns previous Monday)
-
Frontend (already aligned)
workload.ts:hideEmpty: boolean = truedefault- TaskDetailModal, GanttChart, CalendarView: Handle 409 conflict with conflict banner UI
-
Tests (
backend/tests/test_workload.py)- Week bounds tests including Sunday handling
- Load level calculation tests