fix(telemetry): reconcile open door counts in 5-measurement bar with list and filter excluded doors #25
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📌 Problem Statement
In the Tactical Operations Deck (
DUAL_OPS_DECK), two related discrepancies exist between the top 5-measurement bar (#door-measurements-bar) and the active door listings:Count vs. Listing Mismatch:
ABIERTAS (ACTIVOS)(rendered in#meas-open) does not match the actual number of doors listed in the active views (theopen_longestlist and#portal-longest-count-badge).3 ABIERTAS, yet the ranking list or live activity view shows 5 doors, or vice versa.Excluded Doors Not Removed from Listings:
is_excluded = 1orexclude_from_rankings = truein SQLite / door settings, such as quarantined, maintenance, or test doors) are not getting removed from the listing.🔍 Root Cause Analysis
Frontend Exclusion Filtering Omission (
telemetry_engine.js):TelemetryEngine._constructSnapshot(), theopenLongestlist is generated as:!d.is_excludedand!d.exclude_from_rankings. Excluded doors are thus retained insnapshot.openLongest.Fallback Calculation Inconsistency (
command_deck_adapter.js):CommandDeckAdapter.renderMeasurementsBar(), the fallback count uses:CommandDeckAdapter.renderOpenLongest(), the fallback list uses:Backend / Frontend State Divergence (
door_service.py):door_service.py,open_doorsfiltersif is_open and not is_excluded:.snapshot.doorssent over WebSocket includes all doors with"is_excluded": is_excluded. When the frontend reconciles doors or usesdoorsList, the omission of client-side exclusion filters creates discrepancy againstopen_doors.🎯 Required Solution
d.is_excluded === trueord.exclude_from_rankings === trueacross all open door lists and active sensor rankings (openLongest,renderOpenLongest, and the door activity stream).#meas-open(ABIERTAS (ACTIVOS)) is strictly identical to the count rendered in#portal-longest-count-badgeand the actual length of the rendered open doors list.openVerifiednor displayed in the ranking.✅ Acceptance Criteria
#meas-open(ABIERTAS (ACTIVOS)) matches#portal-longest-count-badgeand the exact count of rendered rows in#tactical-open-longest-panel.is_excluded = 1/exclude_from_rankings = true) never appear in the open door ranking list.