Skip to content

Delete dead #event-detail-content write in track-panel click handler #26

Description

@luandro

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 loadEventDetailsetupEventTrackPanel(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

  1. Delete the #event-detail-content div in index.html
  2. Delete loadEventDetail in app.js (or extract the setupEventTrackPanel(event) call into a small helper and call only that from the click handler)
  3. Update tests/test_fr24_track_panel_vm.mjs if it relies on the old behavior

Discovery

Sonnet r4 NIT 1, r6 NIT 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions