docs: web comments say what the app does, not how it came to be (#6277)

Rewrites the web app's comments to rule 32. Task, milestone, rule and
spec ids are gone; regression stories are restated as the trap they
guard (public auth routes, the menu's stopPropagation, universal loads
under adapter-static, metric deltas with their margin). Flutter and
Tauri mentions now name the Android app or a native shell, operator
quotes and dates are dropped, and one library's counts no longer
appear outside test fixtures. Verified with a TypeScript-scanner token
comparison (template literals and regex literals re-scanned): only
comment text changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 12:42:12 -04:00
co-authored by Claude Opus 5.5
parent 6028d78844
commit 10d50dccbd
164 changed files with 602 additions and 624 deletions
+11 -14
View File
@@ -17,22 +17,19 @@ import type { PlayStartedResponse, EventOkResponse } from '#lib/api/types.js';
// - pagehide with a live row → navigator.sendBeacon a play_ended with
// the last position. The server's rule still classifies skip-vs-not.
//
// Earlier shape made the skip-vs-ended call client-side via a "within 3s
// of duration" rule, which left the server's threshold dead code and
// treated every "next" tap as a skip even after most of the track played.
// Backflow of the Android fix (commit d82e744d, 2026-06-01); see Scribe
// task 519. Flutter client is deprecated and not updated.
// The skip-vs-ended call is the server's, as on Android: a client-side
// "within 3s of duration" rule would leave the server's threshold dead and
// treat every "next" tap as a skip even after most of the track played.
export function useEventsDispatcher(): void {
let openPlayEventId: string | null = null;
let openTrackId: string | null = null;
// openLastPositionMs tracks the *open row's* track and is updated
// ONLY while that track is current — so a track change (which
// synchronously resets the store's position to 0 and duration to 0)
// can't clobber it before the close branch reads it. This is the
// #426 race fix. The pagehide + natural-end branches can read
// player.position directly because their current track is still the
// open one at fire time.
// openLastPositionMs tracks the *open row's* track and is updated ONLY while
// that track is current — so a track change (which synchronously resets the
// store's position to 0 and duration to 0) can't clobber it before the close
// branch reads it. The pagehide + natural-end branches can read
// player.position directly because their current track is still the open one
// at fire time.
let openLastPositionMs = 0;
let prevTrackId: string | null = null;
let prevState: string | null = null;
@@ -121,11 +118,11 @@ export function useEventsDispatcher(): void {
type: 'play_started',
track_id: trackId,
client_id: clientId,
// #415: tag the play with the system playlist it came from
// Tag the play with the system playlist it came from
// (null for library / user-playlist / radio) so the server
// can advance that playlist's rotation.
source: player.queueSource ?? undefined,
// #1551: device class for context conditioning. The web app is a
// Device class for context conditioning. The web app is a
// browser session, so it reports 'web'.
device_class: 'web'
});