Skip to content

fix: reconcile client state with server session on ws connect #31

Description

@paolino

Running riptide serve and opening the served UI surfaces Command failed: PlaybackTrackMissing (TrackId "t2"): the client boots from its client-side seed (e.g. "midnight set") while the server's Session loads from its own (empty) stores, so the client auto-syncs active tracks the server never heard of.

The plumbing is correct (the server rejects unknown-track commands and the UI surfaces the error) — the gap is the initial state handshake. Decide + implement one of:

  • client pushes its full state (tracks + definitions) to the server on connect (likely a new SaveState/upsert ClientCommand in Riptide.Protocol + handler), OR
  • server is source-of-truth: client adopts the state snapshot on connect and stops re-driving stale local active.

Cross-cutting (frontend + backend Protocol). Do this BEFORE the Tailscale deploy (#21) so the deployed app is clean.

Metadata

Metadata

Assignees

Labels

fixBug fix

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions