Skip to content

fix(live): wire persisted view toggles before initialization awaits #125

Description

@dborup

Problem

PR #88 moved only the Multibyte control before the Live page's startup awaits. Heat, Ghost, Realistic, color-by-hash, Favorites, Matrix, and Matrix-rain controls are still wired after map-config loading and await loadNodes().

Early clicks can be lost, and persisted ON state can briefly render as OFF.

Upstream reference: Kpa-clawbot/CoreScope#1940.

Acceptance criteria

  • Add one idempotent Live-control wiring phase before the first startup await.
  • Restore state and persistence handlers immediately after markup exists.
  • Separate state wiring from effects requiring a ready Leaflet map and apply queued effects later.
  • Preserve Heat/Matrix mutual exclusion, filters, WebSocket/replay behavior, and SPA remounting.
  • Treat audio/geolocation separately where user-gesture/permission requirements apply.
  • Each control has at most one handler after remount.

Verification

With deterministic delayed config/node loads, click every affected toggle during startup, verify persistence/display/final effects, test Heat/Matrix and remount behavior, and add mutation checks that fail if wiring moves after the await.

Non-goals

No visual redesign, traffic-processing change, persisted-key rename, automatic audio/geolocation activation, or deploy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions