Skip to content

R-6: Tracking-state and degradation chips on the camera tile#147

Merged
TCVinNYC merged 2 commits into
mainfrom
feat/r6-state-chips
Jul 3, 2026
Merged

R-6: Tracking-state and degradation chips on the camera tile#147
TCVinNYC merged 2 commits into
mainfrom
feat/r6-state-chips

Conversation

@TCVinNYC

@TCVinNYC TCVinNYC commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Operators finally see what tracking is doing, per the transparency rule (auto behavior must be visible):

  • State chip on the tile HUD (existing badge conventions): TRACKING (green), COASTING/MANUAL/DEGRADED/STANDBY (amber/neutral, honest labels), SEARCHING/AMBIGUOUS (attention), SELECTED (neutral — target picked but auto-tracking off). Colors derive from the engine's own severity field, so red is structurally unreachable for benign states and a future engine state falls back non-alarming (pinned by a vocabulary test covering all 9 emitted flavors).
  • Degradation chip: ×2/×4 when the auto quality ladder stretches detect cadence, tooltip carries the reason; hidden at configured cadence. One shared quality_multiplier() used by tile + properties panel.
  • Properties panel rows extended with state + degradation reason.
  • Zero engine changes — existing tracking_status/quality_state telemetry already carried everything; display-only.

Review history (two rounds)

Initial review caught the chip lying: standby (severity=info — including the "Confirming target" state that fires on every fresh target pick) rendered as red LOST, and locked showed green TRACKING even when auto-tracking was deliberately paused. Both fixed; severity-consistency now test-pinned. Final verdict: Approved.

Test plan

  • 20+ offscreen-Qt tests: per-state chip mapping (9 flavors), unknown-state fallback, feature-off hidden, old-telemetry back-compat, degradation multiplier show/hide, properties rows.
  • Full suite 1937 passed (run twice); ruff + mypy + selftest green.

Validation

Needs your visual sign-off (run the app, watch the chips through a pick→track→occlude→reacquire cycle). Label/color choices are flagged judgment calls — easy to tweak. Includes the #141 test-isolation cherry-pick (dedupes on merge).

🤖 Generated with Claude Code

TCVinNYC and others added 2 commits July 3, 2026 15:45
Reuses existing telemetry (tracking_status.state, quality_state) rather
than adding TelemetryMsg fields — no wire-format changes. Tile paints a
small colored state chip (locked/coasting/searching/ambiguous/lost) and
a x2/x4 degradation chip when the auto quality ladder relaxes detector
cadence below configured, matching the fps-chip's existing scrim-pill
style. Properties panel gets matching text rows for both, driven by the
same telemetry-tick refresh the quality-effective rows already use.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Derive the state chip's color from the engine's own severity field instead
of a second hand-maintained table, so a chip can never invert the engine's
severity ordering. Fixes the standby state (both the "Confirming target"
fresh-pick flavor and the terminal "Standing by for reacquire" flavor)
rendering red LOST — standby is severity=info and now renders neutral,
never alarming. manual/degraded now show their own MANUAL/DEGRADED labels
instead of a misleading COASTING label. locked now distinguishes its two
action flavors: actively driving PTZ (green LOCKED) vs. target selected
with auto-tracking off (neutral SELECTED) — a green chip while the camera
deliberately isn't moving was misleading.

Also extracts the duplicated `max(2, effective // configured)` quality
multiplier into a shared `quality_multiplier()` helper used by both the
tile's degradation chip and the properties panel's row, and makes the
degradation chip's x-offset derive from the state chip's actual painted
width instead of a hardcoded "COASTING" string measurement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TCVinNYC
TCVinNYC force-pushed the feat/r6-state-chips branch from 23c8d8c to 92cb6fd Compare July 3, 2026 19:45
@TCVinNYC
TCVinNYC merged commit 22a25f7 into main Jul 3, 2026
3 checks passed
@TCVinNYC
TCVinNYC deleted the feat/r6-state-chips branch July 3, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant