refactor(statistics): consolidate duplicate is_closed and closed fields in hourly response #223

Open
opened 2026-10-03 06:54:01 +00:00 by gabogg · 0 comments
Owner

P3 follow-up from PR #178 review pass 3 (r32 item b).

Finding

PresenterHourlyResponse emits both is_closed and the new closed (app/schemas/statistics.py:100, 168), and day_view.js:703 reads both. DailyStatistics.is_closed already existed in the domain model. Having duplicate boolean fields for the same semantic property causes ambiguity in serialization and client rendering.

Acceptance Criteria

  • Consolidate is_closed and closed in PresenterHourlyResponse into a single field (is_closed).
  • Update day_view.js and any other frontend consumers to read only is_closed.
  • Update API contracts and tests to assert on the single consolidated field.
  • Ensure all backend and frontend node tests pass.

Refs #178, #161.

P3 follow-up from PR #178 review pass 3 (r32 item b). ### Finding `PresenterHourlyResponse` emits both `is_closed` and the new `closed` (`app/schemas/statistics.py:100, 168`), and `day_view.js:703` reads both. `DailyStatistics.is_closed` already existed in the domain model. Having duplicate boolean fields for the same semantic property causes ambiguity in serialization and client rendering. ### Acceptance Criteria - Consolidate `is_closed` and `closed` in `PresenterHourlyResponse` into a single field (`is_closed`). - Update `day_view.js` and any other frontend consumers to read only `is_closed`. - Update API contracts and tests to assert on the single consolidated field. - Ensure all backend and frontend node tests pass. Refs #178, #161.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
gabogg/hikcentral#223
No description provided.