Skip to content

Live view simulator: replay/synthesize a voyage so Live features can be tested without sailing #143

Description

@DocGerd

Problem

Live-view features (GPS readout, leg advance, ownship marker, live reroute #115, and soon AIS #25) can only be genuinely exercised while sailing. Development, review, demoing, and regression-hunting all need a way to "sail" from a desk.

Idea

A simulator that feeds synthetic GpsFix sequences into the existing geolocation service layer (the watchPosition wrapper in services/geolocation.ts is the natural seam — the UI above it must not know the difference):

  • Track playback: follow an existing planned route at a configurable speed and time-scale (e.g. 50×), with plausible COG/SOG jitter.
  • Scripted scenarios: drift off-route (to exercise reroute), stop (SOG≈0), GPS dropout/permission loss, accuracy degradation.
  • Controls: play/pause, jump-to-position, speed multiplier.
  • Later, once AIS: live online traffic overlay with ownship recognition #25 lands: synthetic AIS vessels through the same harness (the AIS client already has an injectable socket factory by design).

Constraints (decide at spec time — needs a spec addendum + owner approval before implementation)

  • Must not ship as a user-facing production feature: gate it dev-only (import.meta.env.DEV) or UAT-only via the __SC_UAT__ fold-exact pattern (UAT deployment needs a visible in-app environment indicator #107) — prod bundle byte-identity rules apply if UAT-gated.
  • The app is a passage-planning aid; a simulator must not blur that framing in user-facing copy.
  • Offline-first invariants untouched (the simulator is local by nature).

Relation

The companion Live-view test-coverage issue handles what Playwright's geolocation emulation can already do; this simulator is the richer harness for manual/exploratory testing and future e2e scenarios. Related: #104, #113, #115, #25.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UXvHWVP7iALk2rScg3CtkT

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: toolingRepo config, Claude automation, CI/CD metapriority: mediumPlanned, not urgenttype: featureNew user-visible capability

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions