Context
PR #15 moved the FR24 track panel out of the orphaned #view-event-detail section (round-3 BLOCKER 2 fix). The track panel now lives inside #view-events and is updated by setupEventTrackPanel (app.js:912) when opened.
But the track-panel delegated click handler (app.js:2324-2370) still calls loadEventDetail(requestedEventId) on success/error, which writes into #event-detail-content (still present at index.html inside the now-never-activated #view-event-detail section — handleHashRoute no longer activates that view).
The write is harmless (the element exists, just permanently hidden) because the meaningful side effect of loadEventDetail — setupEventTrackPanel(event) — correctly targets the moved, live #event-track-panel. But the dead branch pollutes the trace and creates a false invariant ("this code path does something") for future maintainers.
Suggested fix
- Delete the
#event-detail-content div in index.html
- Delete
loadEventDetail in app.js (or extract the setupEventTrackPanel(event) call into a small helper and call only that from the click handler)
- Update tests/test_fr24_track_panel_vm.mjs if it relies on the old behavior
Discovery
Sonnet r4 NIT 1, r6 NIT 1.
Context
PR #15 moved the FR24 track panel out of the orphaned
#view-event-detailsection (round-3 BLOCKER 2 fix). The track panel now lives inside#view-eventsand is updated bysetupEventTrackPanel(app.js:912) when opened.But the track-panel delegated click handler (app.js:2324-2370) still calls
loadEventDetail(requestedEventId)on success/error, which writes into#event-detail-content(still present at index.html inside the now-never-activated#view-event-detailsection —handleHashRouteno longer activates that view).The write is harmless (the element exists, just permanently hidden) because the meaningful side effect of
loadEventDetail—setupEventTrackPanel(event)— correctly targets the moved, live#event-track-panel. But the dead branch pollutes the trace and creates a false invariant ("this code path does something") for future maintainers.Suggested fix
#event-detail-contentdiv in index.htmlloadEventDetailin app.js (or extract thesetupEventTrackPanel(event)call into a small helper and call only that from the click handler)Discovery
Sonnet r4 NIT 1, r6 NIT 1.