feat(ui): Operator Viewport Overhaul — Master HUD & Split-Screen Dual Operations Deck (Phase 3) #17

Closed
opened 2026-09-09 16:22:15 +00:00 by gabogg · 3 comments
Owner

Parent

PR #13: docs(ui): industrial brutalist frontend redesign and tactical telemetry guidelines

What to build

Replace the operator view carousel with the split-screen tactical terminal layout.

This establishes the fixed 52px Master Tactical HUD ribbon, the 60% Left Wing Tactical Portal Matrix (with hardware contact states, wiring classifications, and alarm hoisting), and the 40% Right Wing Live Occupancy Tachometer & Flux Log (with Little's Law dwell envelope and directional flux stream), bound directly to TelemetryEngine.subscribe(snapshot).

Acceptance criteria

  • Fixed 52px Master Tactical HUD ribbon implemented displaying WebSocket latency, clock skew (\Delta t), active cycle phase, instantaneous headcount (t), adaptive multiplier , and active alarm counter.
  • Sliding carousel deprecated in favor of the persistent split-screen layout (60% portal telemetry, 40% occupancy tachometer).
  • Left Wing Tactical Portal Matrix renders hardware contact tiles with ASCII framing, contact pin status (CLOSED / OPEN), sensor classifications (VERIFIED_SENSOR, SENSORLESS_OPEN, SENSORLESS_JUMPERED), and dynamic alarm hoisting to top.
  • Right Wing Live Occupancy Tachometer displays instantaneous headcount with error margin, Little's Law dwell capacity envelope ({\max}$), and real-time monospaced directional flux feed (>>> IN, <<< OUT).
  • Entire operator presentation layer binds strictly as a declarative view adapter subscribing to TelemetryEngine.subscribe(snapshot).
  • Manual door overrides and operator actions execute via HTTP mutation endpoints and update via incoming telemetry.

Blocked by

  • #16 (feat(telemetry): Client-Side Deep Module TelemetryEngine & Frontend Test Harness (Phase 2))
## Parent [PR #13: docs(ui): industrial brutalist frontend redesign and tactical telemetry guidelines](https://git.gaboggamer.online/gabogg/hikcentral/pulls/13) ## What to build Replace the operator view carousel with the split-screen tactical terminal layout. This establishes the fixed 52px Master Tactical HUD ribbon, the 60% Left Wing Tactical Portal Matrix (with hardware contact states, wiring classifications, and alarm hoisting), and the 40% Right Wing Live Occupancy Tachometer & Flux Log (with Little's Law dwell envelope and directional flux stream), bound directly to `TelemetryEngine.subscribe(snapshot)`. ## Acceptance criteria - [ ] Fixed 52px Master Tactical HUD ribbon implemented displaying WebSocket latency, clock skew ($\Delta t$), active cycle phase, instantaneous headcount (t)$, adaptive multiplier $, and active alarm counter. - [ ] Sliding carousel deprecated in favor of the persistent split-screen layout (60% portal telemetry, 40% occupancy tachometer). - [ ] Left Wing Tactical Portal Matrix renders hardware contact tiles with ASCII framing, contact pin status (`CLOSED` / `OPEN`), sensor classifications (`VERIFIED_SENSOR`, `SENSORLESS_OPEN`, `SENSORLESS_JUMPERED`), and dynamic alarm hoisting to top. - [ ] Right Wing Live Occupancy Tachometer displays instantaneous headcount with error margin, Little's Law dwell capacity envelope ({\max}$), and real-time monospaced directional flux feed (`>>> IN`, `<<< OUT`). - [ ] Entire operator presentation layer binds strictly as a declarative view adapter subscribing to `TelemetryEngine.subscribe(snapshot)`. - [ ] Manual door overrides and operator actions execute via HTTP mutation endpoints and update via incoming telemetry. ## Blocked by - #16 (feat(telemetry): Client-Side Deep Module TelemetryEngine & Frontend Test Harness (Phase 2))
Author
Owner

📋 Tech Debt Carried Forward from Issue #16 Code Review

The following items from the #16 code review must be addressed during this issue (or as prefactoring before mounting the Operator Split-Screen Deck):

1. Issue #15 Carried Debt (Still Unresolved)

  • Extract TacticalStaticFiles: Move TacticalStaticFiles out of app/main.py into app/middleware/static.py to fix Divergent Change.
  • Harden air-gapped test: Add pytest.mark.xfail checks in test_static_assets.py for remaining CDN links (cdn.tailwindcss.com and cdnjs.cloudflare.com).

2. TelemetryEngine Deep-Module Architectural Refinements

  • Decouple FixtureTransport Concrete Class: Remove this._transport instanceof FixtureTransport in telemetry_engine.js:326. Transports must be handled polymorphically without class-name inspection.
  • Fix Facility Timezone Leak in Business Cycle: In _calculateBusinessCycle, calculate hours/minutes using server-time reference rather than client browser OS getHours(), preventing timezone drift in distributed operations desks.
  • Fix Nocturnal Quiet Window Range: Adjust phase boundaries so NOCTURNAL_QUIET covers the full 03:30–04:30 window rather than abruptly terminating at 04:00.
  • Deduplicate Dispatch Loop: Consolidate repeated subscriber notification loops into a helper _notifySubscribers().
## 📋 Tech Debt Carried Forward from Issue #16 Code Review The following items from the [#16 code review](https://git.gaboggamer.online/gabogg/hikcentral/issues/16#issuecomment-463) must be addressed during this issue (or as prefactoring before mounting the Operator Split-Screen Deck): ### 1. Issue #15 Carried Debt (Still Unresolved) - **Extract `TacticalStaticFiles`**: Move `TacticalStaticFiles` out of `app/main.py` into `app/middleware/static.py` to fix Divergent Change. - **Harden air-gapped test**: Add `pytest.mark.xfail` checks in `test_static_assets.py` for remaining CDN links (`cdn.tailwindcss.com` and `cdnjs.cloudflare.com`). ### 2. `TelemetryEngine` Deep-Module Architectural Refinements - **Decouple `FixtureTransport` Concrete Class**: Remove `this._transport instanceof FixtureTransport` in `telemetry_engine.js:326`. Transports must be handled polymorphically without class-name inspection. - **Fix Facility Timezone Leak in Business Cycle**: In `_calculateBusinessCycle`, calculate hours/minutes using server-time reference rather than client browser OS `getHours()`, preventing timezone drift in distributed operations desks. - **Fix Nocturnal Quiet Window Range**: Adjust phase boundaries so `NOCTURNAL_QUIET` covers the full `03:30–04:30` window rather than abruptly terminating at `04:00`. - **Deduplicate Dispatch Loop**: Consolidate repeated subscriber notification loops into a helper `_notifySubscribers()`.
Author
Owner

Phase 3 Resolved: Operator Viewport Overhaul — Master HUD & Split-Screen Dual Operations Deck

Delivered in commits 286467f and cdb7b90 as part of PR #13.


1. Carried Technical Debt Resolved (from Issue #16)

  • TacticalStaticFiles Extraction: Moved out of app/main.py into dedicated app/middleware/static.py and app/middleware/__init__.py.
  • Air-Gapped Test Hardening: Configured @pytest.mark.xfail(strict=True) in tests/test_static_assets.py for remaining external CDN links awaiting Phase 5 standalone compilation.
  • FixtureTransport Decoupling: Replaced concrete class inspection with duck-typed polymorphic transport contracts (autoConnect, injectSnapshot).
  • Facility Timezone Skew Fixed: Business cycle calculations in TelemetryEngine now project facility local time (UTC-4) via UTC getters, preventing client browser OS timezone skew.
  • Nocturnal Quiet Window Corrected: Extended NOCTURNAL_QUIET boundaries to cover 03:30–04:30 local time across the mid-night reset.
  • Subscriber Loop Deduplicated: Consolidated broadcast logic into _notifySubscribers().

2. Operator Viewport Architecture & Features Implemented

  • Fixed 52px Master Tactical HUD Ribbon:
    • Implemented #master-hud-ribbon with WebSocket status/latency, clock skew (\Delta t), active cycle phase, countdown to reset, instantaneous headcount N(t) with residual margin, adaptive multiplier \rho, and active alarm counter.
    • Implemented using semantic HTML5 elements (<output>, <data value="...">).
  • Sliding Carousel Deprecation:
    • Deprecated #operator-carousel-viewport and carousel scrolling logic (moveCarouselToSlide, initOperatorCarousel) in favor of a persistent, high-density split-screen blueprint deck.
  • Left Wing (60%): Tactical Portal Matrix:
    • Renders hardware contact tiles with ASCII framing [ P-XX ], contact pin state ([ CLOSED ] / [ OPEN ] / [ ALARM ] / [ OFFLINE ]), sensor classifications (VERIFIED_SENSOR, SENSORLESS_OPEN, SENSORLESS_JUMPERED), and dynamic alarm priority hoisting to the top of the matrix.
    • Formatted using semantic <dl>/<dt>/<dd> metadata and container event delegation (data-action).
  • Right Wing (40%): Live Occupancy Tachometer & Directional Flux Stream:
    • Displays instantaneous headcount N(t), Little's Law dwell capacity envelope (W_{\max}), and real-time monospaced traversal feed (>>> IN, <<< OUT).
  • Declarative View Adapter (CommandDeckAdapter):
    • Pure declarative adapter in app/static/js/src/ui/command_deck_adapter.js subscribing to TelemetryEngine.subscribe(snapshot).
  • Backend Door Control Mutation Endpoint:
    • Added POST /api/doors/{door_index_code}/control supporting operator commands (unlock, close) broadcasting immediately to WebSocket clients with standard DOOR_NOT_FOUND error code.
  • Single-Socket Architecture:
    • Reconciled WebSocket ingestion so app.js and TelemetryEngine share a single live WebSocket connection without redundant socket duplication.

3. Verification & Quality Gates

  • Frontend Unit Test Suite: 18 tests passing via Node 22 native runner (tests/frontend/*.test.js).
  • Full Backend Pytest Gate: 111 passed, 1 expected xfailed across all 112 test items.
  • Code Review & Standards Audit: Resolved all findings from Standards and Spec review subagents (zero-radius enforcement, semantic DOM, mathematical symbol standardization to N(t) and \rho, event delegation).
## Phase 3 Resolved: Operator Viewport Overhaul — Master HUD & Split-Screen Dual Operations Deck Delivered in commits [`286467f`](https://git.gaboggamer.online/gabogg/hikcentral/commit/286467f) and [`cdb7b90`](https://git.gaboggamer.online/gabogg/hikcentral/commit/cdb7b90) as part of [PR #13](https://git.gaboggamer.online/gabogg/hikcentral/pulls/13). --- ### 1. Carried Technical Debt Resolved (from Issue #16) - **`TacticalStaticFiles` Extraction**: Moved out of `app/main.py` into dedicated `app/middleware/static.py` and `app/middleware/__init__.py`. - **Air-Gapped Test Hardening**: Configured `@pytest.mark.xfail(strict=True)` in `tests/test_static_assets.py` for remaining external CDN links awaiting Phase 5 standalone compilation. - **`FixtureTransport` Decoupling**: Replaced concrete class inspection with duck-typed polymorphic transport contracts (`autoConnect`, `injectSnapshot`). - **Facility Timezone Skew Fixed**: Business cycle calculations in `TelemetryEngine` now project facility local time (UTC-4) via UTC getters, preventing client browser OS timezone skew. - **Nocturnal Quiet Window Corrected**: Extended `NOCTURNAL_QUIET` boundaries to cover `03:30–04:30` local time across the mid-night reset. - **Subscriber Loop Deduplicated**: Consolidated broadcast logic into `_notifySubscribers()`. --- ### 2. Operator Viewport Architecture & Features Implemented - **Fixed 52px Master Tactical HUD Ribbon**: - Implemented `#master-hud-ribbon` with WebSocket status/latency, clock skew ($\Delta t$), active cycle phase, countdown to reset, instantaneous headcount $N(t)$ with residual margin, adaptive multiplier $\rho$, and active alarm counter. - Implemented using semantic HTML5 elements (`<output>`, `<data value="...">`). - **Sliding Carousel Deprecation**: - Deprecated `#operator-carousel-viewport` and carousel scrolling logic (`moveCarouselToSlide`, `initOperatorCarousel`) in favor of a persistent, high-density split-screen blueprint deck. - **Left Wing (60%): Tactical Portal Matrix**: - Renders hardware contact tiles with ASCII framing `[ P-XX ]`, contact pin state (`[ CLOSED ]` / `[ OPEN ]` / `[ ALARM ]` / `[ OFFLINE ]`), sensor classifications (`VERIFIED_SENSOR`, `SENSORLESS_OPEN`, `SENSORLESS_JUMPERED`), and dynamic alarm priority hoisting to the top of the matrix. - Formatted using semantic `<dl>/<dt>/<dd>` metadata and container event delegation (`data-action`). - **Right Wing (40%): Live Occupancy Tachometer & Directional Flux Stream**: - Displays instantaneous headcount $N(t)$, Little's Law dwell capacity envelope ($W_{\max}$), and real-time monospaced traversal feed (`>>> IN`, `<<< OUT`). - **Declarative View Adapter (`CommandDeckAdapter`)**: - Pure declarative adapter in `app/static/js/src/ui/command_deck_adapter.js` subscribing to `TelemetryEngine.subscribe(snapshot)`. - **Backend Door Control Mutation Endpoint**: - Added `POST /api/doors/{door_index_code}/control` supporting operator commands (`unlock`, `close`) broadcasting immediately to WebSocket clients with standard `DOOR_NOT_FOUND` error code. - **Single-Socket Architecture**: - Reconciled WebSocket ingestion so `app.js` and `TelemetryEngine` share a single live WebSocket connection without redundant socket duplication. --- ### 3. Verification & Quality Gates - **Frontend Unit Test Suite**: 18 tests passing via Node 22 native runner (`tests/frontend/*.test.js`). - **Full Backend Pytest Gate**: 111 passed, 1 expected xfailed across all 112 test items. - **Code Review & Standards Audit**: Resolved all findings from Standards and Spec review subagents (zero-radius enforcement, semantic DOM, mathematical symbol standardization to $N(t)$ and $\rho$, event delegation).
Author
Owner

🔍 Code Review: Issue #17 — Operator Viewport Overhaul (Master HUD & Split-Screen Deck)

Fixed point: f4203d8 → HEAD (cdb7b90)
Diff: 17 files changed, +1511 / −791
Commits reviewed:

  • 286467f feat(ui): implement Master Tactical HUD and Split-Screen Operator Deck (#17)
  • cdb7b90 docs(ui): mark local ticket 03 as resolved (#17)

Standards

Hard Violations

# File & Location Standard Violated Detail
S1 app/static/css/tactical-telemetry.css:531 ui-design-guidelines.md §2.1 & ADR 0002 §2 Forbidden Soft Glowing Shadows: Uses box-shadow: inset 0 0 10px rgba(255, 42, 42, 0.2);. The design system explicitly forbids soft ambient glows/shadows in favor of crisp 1px solid boundaries.
S2 app/static/js/src/ui/command_deck_adapter.js:162, 343 & app/static/index.html:241 ui-design-guidelines.md §3.2 & §7 Checklist Missing tabular-nums on Dynamic Numeric Field: Residual error margin elements (±${errorMargin}) lack tabular-nums, causing visual jitter during live WebSocket updates.
S3 app/static/js/src/ui/command_deck_adapter.js:410 ui-design-guidelines.md §3.4 & CONTEXT.md §3 Client OS Timezone Leak: new Date(item.timestamp).toLocaleTimeString() formats timestamps according to the client browser's local OS timezone, violating the facility-synchronized clock invariant.
S4 app/controllers/door_controller.py:68-84 code-standards.md §2.3 & AGENTS.md §1.1 Untyped Mutation Endpoint & Literal Status: control_door lacks a typed response_model, passes raw dict[str, Any], and raises HTTPException with literal status_code=404 instead of status.HTTP_404_NOT_FOUND.

Judgement Calls (Fowler Smell Baseline)

Smell Location Note
Feature Envy & Private Access app/static/js/app.js:372 initWebSocket() directly accesses the private transport window.telemetryEngine._transport rather than using public engine APIs.
Duplicated Code command_deck_adapter.js:19, 36 vs app.js:29, 585 escapeHtml and duration formatting functions are duplicated across files instead of shared from a utility module.
Duplicated Broadcast Block app/services/door_service.py:1187, 1238 from app.services.monitor_service import ws_manager inline import and broadcast invocation is duplicated across door mutation methods.

Spec

(a) Missing or Partial Requirements

# Spec Reference Finding
M1 Proposal §4.2 (HUD Vital Telemetry) Missing Artemis/Bumblebee Indicators: renderHud() displays WebSocket latency and clock skew, but omits Artemis OpenAPI heartbeat and Bumblebee session status indicators specified in §4.2.
M2 Proposal §4.3 (Alarm Visual Dynamics) Missing Phosphor Text Pulse: Alarmed doors receive a faint background tint, but lack the high-visibility white phosphor flashing animation mandated in §4.3.

(b) Scope Creep (Unrequested Behaviour)

# Spec Reference Finding
C1 Issue #17 AC 3 (Portal Matrix Scope) command_deck_adapter.js:263-271 adds interactive door ranking exclusion buttons ([ + INCLUDE ] / [ - EXCLUDE ]) on every operator tile, pulling an administrative diagnostics feature into the operator surveillance view.

(c) Implemented-but-Wrong Requirements

# Spec Reference Finding
W1 CONTEXT.md §2, §3 & Proposal §4.2 Mathematical Notation Discrepancy: Headcount and multiplier are rendered as N(t) and ρ instead of the canonical domain symbols $O(t)$ (Estimated Occupancy) and $k$ (Proportional Exit Multiplier).
W2 Proposal §4.3 (Directional Traversal Feed) Millisecond Precision Lost: toLocaleTimeString() truncates flux traversal event timestamps to seconds (HH:MM:SS), discarding the millisecond timestamps required for high-frequency CCTV event reconciliation.
W3 AGENTS.md §2 (Error Response Contract) door_controller.py:79-83 passes X-Error-Code: DOOR_NOT_FOUND as an HTTP header rather than embedding {"detail": str, "error_code": "DOOR_NOT_FOUND"} in the response JSON.

Tech Debt Status from Issues #15 & #16

Item Status Notes
Extract TacticalStaticFiles from main.py RESOLVED ✅ Moved to app/middleware/static.py.
Harden test_static_assets.py air-gap assertions RESOLVED ✅ Added test_index_html_strictly_air_gapped_no_external_cdns with xfail(strict=True).
Decouple FixtureTransport concrete class RESOLVED ✅ Uses duck-typed autoConnect and injectSnapshot.
Business Cycle Nocturnal Quiet Window Range RESOLVED ✅ Correctly covers 03:30–04:30.
Deduplicate Subscriber Dispatch Loop RESOLVED ✅ Consolidated into _notifySubscribers().
Eliminate Client OS Timezone Skew PARTIALLY RESOLVED ⚠️ Fixed in TelemetryEngine._calculateBusinessCycle, but regressed in command_deck_adapter.js:410 via toLocaleTimeString().

Summary

Axis Findings Worst Issue
Standards 4 hard violations, 3 smells S1: Inset box-shadow violates brutalist zero-soft-shadow rule; S4: Untyped mutation endpoint.
Spec 2 missing/partial, 1 scope creep, 3 implemented-wrong W1: Notation mismatch ($N(t)$/\rho vs canonical $O(t)$/k); W2: Milliseconds stripped from flux feed.

📋 Tech Debt Carried Forward into Issue #18

  1. Purge Soft Shadow: Replace box-shadow: inset 0 0 10px rgba(...) in tactical-telemetry.css:531 with a solid 1px or 2px #FF2A2A brutalist border.
  2. Align Domain Notation: Standardize HUD and Tachometer headers from N(t) and ρ to the canonical domain symbols $O(t)$ and $k$.
  3. Format Directional Flux Milliseconds & Timezone: Replace toLocaleTimeString() in command_deck_adapter.js:410 with a millisecond formatter (HH:MM:SS.mmm) referencing facility time.
  4. Enforce tabular-nums on Margin: Add tabular-nums to ±${errorMargin} elements.
  5. Type control_door Endpoint: Define a Pydantic DoorControlResponse schema in app/schemas/models.py, use status.HTTP_404_NOT_FOUND, and return a standard {"detail": str, "error_code": str} body.
  6. Eliminate Private Transport Access: Refactor app.js:372 to use window.telemetryEngine.ingestMessage(...) instead of inspecting _transport.
## 🔍 Code Review: Issue #17 — Operator Viewport Overhaul (Master HUD & Split-Screen Deck) **Fixed point:** `f4203d8` → **HEAD** (`cdb7b90`) **Diff:** 17 files changed, +1511 / −791 **Commits reviewed:** - `286467f` feat(ui): implement Master Tactical HUD and Split-Screen Operator Deck (#17) - `cdb7b90 docs(ui): mark local ticket 03 as resolved (#17)` --- ## Standards ### Hard Violations | # | File & Location | Standard Violated | Detail | |---|-----------------|-------------------|--------| | S1 | `app/static/css/tactical-telemetry.css:531` | **ui-design-guidelines.md §2.1 & ADR 0002 §2** | **Forbidden Soft Glowing Shadows**: Uses `box-shadow: inset 0 0 10px rgba(255, 42, 42, 0.2);`. The design system explicitly forbids soft ambient glows/shadows in favor of crisp 1px solid boundaries. | | S2 | `app/static/js/src/ui/command_deck_adapter.js:162, 343` & `app/static/index.html:241` | **ui-design-guidelines.md §3.2 & §7 Checklist** | **Missing `tabular-nums` on Dynamic Numeric Field**: Residual error margin elements (`±${errorMargin}`) lack `tabular-nums`, causing visual jitter during live WebSocket updates. | | S3 | `app/static/js/src/ui/command_deck_adapter.js:410` | **ui-design-guidelines.md §3.4 & CONTEXT.md §3** | **Client OS Timezone Leak**: `new Date(item.timestamp).toLocaleTimeString()` formats timestamps according to the client browser's local OS timezone, violating the facility-synchronized clock invariant. | | S4 | `app/controllers/door_controller.py:68-84` | **code-standards.md §2.3 & AGENTS.md §1.1** | **Untyped Mutation Endpoint & Literal Status**: `control_door` lacks a typed `response_model`, passes raw `dict[str, Any]`, and raises `HTTPException` with literal `status_code=404` instead of `status.HTTP_404_NOT_FOUND`. | ### Judgement Calls (Fowler Smell Baseline) | Smell | Location | Note | |-------|----------|------| | **Feature Envy & Private Access** | `app/static/js/app.js:372` | `initWebSocket()` directly accesses the private transport `window.telemetryEngine._transport` rather than using public engine APIs. | | **Duplicated Code** | `command_deck_adapter.js:19, 36` vs `app.js:29, 585` | `escapeHtml` and duration formatting functions are duplicated across files instead of shared from a utility module. | | **Duplicated Broadcast Block** | `app/services/door_service.py:1187, 1238` | `from app.services.monitor_service import ws_manager` inline import and broadcast invocation is duplicated across door mutation methods. | --- ## Spec ### (a) Missing or Partial Requirements | # | Spec Reference | Finding | |---|----------------|---------| | M1 | **Proposal §4.2 (HUD Vital Telemetry)** | **Missing Artemis/Bumblebee Indicators**: `renderHud()` displays WebSocket latency and clock skew, but omits Artemis OpenAPI heartbeat and Bumblebee session status indicators specified in §4.2. | | M2 | **Proposal §4.3 (Alarm Visual Dynamics)** | **Missing Phosphor Text Pulse**: Alarmed doors receive a faint background tint, but lack the high-visibility white phosphor flashing animation mandated in §4.3. | ### (b) Scope Creep (Unrequested Behaviour) | # | Spec Reference | Finding | |---|----------------|---------| | C1 | **Issue #17 AC 3 (Portal Matrix Scope)** | `command_deck_adapter.js:263-271` adds interactive door ranking exclusion buttons (`[ + INCLUDE ] / [ - EXCLUDE ]`) on every operator tile, pulling an administrative diagnostics feature into the operator surveillance view. | ### (c) Implemented-but-Wrong Requirements | # | Spec Reference | Finding | |---|----------------|---------| | W1 | **CONTEXT.md §2, §3 & Proposal §4.2** | **Mathematical Notation Discrepancy**: Headcount and multiplier are rendered as `N(t)` and `ρ` instead of the canonical domain symbols **$O(t)$** (Estimated Occupancy) and **$k$** (Proportional Exit Multiplier). | | W2 | **Proposal §4.3 (Directional Traversal Feed)** | **Millisecond Precision Lost**: `toLocaleTimeString()` truncates flux traversal event timestamps to seconds (`HH:MM:SS`), discarding the millisecond timestamps required for high-frequency CCTV event reconciliation. | | W3 | **AGENTS.md §2 (Error Response Contract)** | `door_controller.py:79-83` passes `X-Error-Code: DOOR_NOT_FOUND` as an HTTP header rather than embedding `{"detail": str, "error_code": "DOOR_NOT_FOUND"}` in the response JSON. | --- ## Tech Debt Status from Issues #15 & #16 | Item | Status | Notes | |------|--------|-------| | Extract `TacticalStaticFiles` from `main.py` | **RESOLVED** ✅ | Moved to `app/middleware/static.py`. | | Harden `test_static_assets.py` air-gap assertions | **RESOLVED** ✅ | Added `test_index_html_strictly_air_gapped_no_external_cdns` with `xfail(strict=True)`. | | Decouple `FixtureTransport` concrete class | **RESOLVED** ✅ | Uses duck-typed `autoConnect` and `injectSnapshot`. | | Business Cycle Nocturnal Quiet Window Range | **RESOLVED** ✅ | Correctly covers `03:30–04:30`. | | Deduplicate Subscriber Dispatch Loop | **RESOLVED** ✅ | Consolidated into `_notifySubscribers()`. | | Eliminate Client OS Timezone Skew | **PARTIALLY RESOLVED** ⚠️ | Fixed in `TelemetryEngine._calculateBusinessCycle`, but regressed in `command_deck_adapter.js:410` via `toLocaleTimeString()`. | --- ## Summary | Axis | Findings | Worst Issue | |------|----------|-------------| | **Standards** | 4 hard violations, 3 smells | S1: Inset box-shadow violates brutalist zero-soft-shadow rule; S4: Untyped mutation endpoint. | | **Spec** | 2 missing/partial, 1 scope creep, 3 implemented-wrong | W1: Notation mismatch ($N(t)$/$\rho$ vs canonical $O(t)$/$k$); W2: Milliseconds stripped from flux feed. | --- ### 📋 Tech Debt Carried Forward into Issue #18 1. **Purge Soft Shadow**: Replace `box-shadow: inset 0 0 10px rgba(...)` in `tactical-telemetry.css:531` with a solid 1px or 2px `#FF2A2A` brutalist border. 2. **Align Domain Notation**: Standardize HUD and Tachometer headers from `N(t)` and `ρ` to the canonical domain symbols **$O(t)$** and **$k$**. 3. **Format Directional Flux Milliseconds & Timezone**: Replace `toLocaleTimeString()` in `command_deck_adapter.js:410` with a millisecond formatter (`HH:MM:SS.mmm`) referencing facility time. 4. **Enforce `tabular-nums` on Margin**: Add `tabular-nums` to `±${errorMargin}` elements. 5. **Type `control_door` Endpoint**: Define a Pydantic `DoorControlResponse` schema in `app/schemas/models.py`, use `status.HTTP_404_NOT_FOUND`, and return a standard `{"detail": str, "error_code": str}` body. 6. **Eliminate Private Transport Access**: Refactor `app.js:372` to use `window.telemetryEngine.ingestMessage(...)` instead of inspecting `_transport`.
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#17
No description provided.