Skip to content

De-bloat pass: docs, comments, dead code, shared backend crate - #213

Merged
eetu merged 2 commits into
mainfrom
debloat-pass
Aug 8, 2026
Merged

De-bloat pass: docs, comments, dead code, shared backend crate#213
eetu merged 2 commits into
mainfrom
debloat-pass

Conversation

@eetu

@eetu eetu commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Repo-wide de-bloat: trim LLM-verbose docs and comments, delete dead code, and deduplicate — no functional changes intended. Net −2,627 lines (+2,111/−4,738 across 124 files).

Docs (~800 lines)

  • apps/tracker/CLAUDE.md 415→201: changelog sections dropped; the API list rebuilt from the actual router (it was missing /api/manifest, reload and the curation endpoints).
  • apps/tracker/MODULES-PLAYBOOK.md: Workflows A/B rewritten artist-primary — they still taught the removed group/artist filing and contradicted the model section.
  • apps/party/parties/README.md 775→658: gotchas back-pointer index reduced to its 5 novel entries; investigation logs compressed to their rules.
  • apps/party/AMIGA-ROMS.md is now the canonical home for the fast-RAM/JIT facts (previously stated in three places).
  • apps/party/CREDITS.md deleted (strict subset of THIRD_PARTY_NOTICES.md).
  • Root README: stale e2eintegration; .env.examples compressed (one documented a variable that no longer exists).

Dead code (~700 lines)

  • migrate.rs + tracker-migrate bin deleted — the artist-primary relayout ran to completion; UNKNOWN_ARTIST moved to scan.rs.
  • Unreachable RootKind guard, unused functions (facetFormats/facetTrackers/keyOf/cycleTheme/clearChannelMutes), ~25 internal-only symbols un-exported.
  • Unused js-dos and @tanstack/svelte-virtual deps removed (−23 packages).

New crates/scene-backend

The byte-identical error/auth/CSP/SPA-fallback/scan-guard/junk-list code both app backends carried now lives once. build_csp is parameterized (emulator_blobs) and the unsafe-eval guard test moved with it, covering both flag values.

Dedup

  • Rust: playlist row mapper, manifest_204/album_204, cached() response helper, classify table, shared capitalize_first.
  • Frontend: new fmtTime/hex2/persist/persistedMode/gl/canvas2d/stage helpers replace 3–15× copies; the 16-branch viz chain is a component map (ids defined once, BoingBall stays the fallback); the Escape cascade is an ordered table (order preserved); modal CSS moved to @scene/design (≤640 px fullscreen preserved); party api.ts gains tracker's richer error extraction.
  • Skipped: merging Track/PlaylistTrack — the Option split is load-bearing (present: false items).

Comments (~1,600 lines)

Iteration-journey notes, section banners, router-table narration and test war stories deleted; design essays compressed to their constraints. Constraint comments (CSP rationale, hvsc.rs, iOS audio, Tunnel seam math, cassette physics) untouched.

Verification

  • just lint (prettier + eslint + clippy/fmt): zero warnings
  • just build: all frontends + release workspace
  • cargo test --workspace + tracker integration (-- --ignored, spawned binary, real HTTP): pass
  • @scene/player unit + browser (171) and visual snapshot (68) suites: pass — no baselines regenerated
  • Both frontends typecheck clean

Known non-regression: the visual suite logs a pre-existing unhandled rejection in board-departures ("host not set" — the test mounts without setPlayerHost); same code path before this change.

eetu added 2 commits August 8, 2026 22:40
Docs (~800 lines): trim LLM verbosity across the repo docs. tracker
CLAUDE.md 415→201 (changelog sections dropped, API list rebuilt from the
real router table); MODULES-PLAYBOOK workflows rewritten artist-primary
(they contradicted the documented model); parties README loses its
back-pointer gotchas index and investigation logs; AMIGA-ROMS.md becomes
the canonical home for the fast-RAM/JIT facts (previously stated three
times); CREDITS.md deleted (strict subset of THIRD_PARTY_NOTICES.md);
root README stale e2e → integration fixed; .env.examples compressed.

Dead code (~700 lines): delete migrate.rs + the tracker-migrate bin (the
artist-primary relayout ran to completion; UNKNOWN_ARTIST moves to
scan.rs), an unreachable RootKind branch, unused functions
(facetFormats/facetTrackers/keyOf/cycleTheme/clearChannelMutes), ~25
needlessly exported symbols, and the unused js-dos +
@tanstack/svelte-virtual deps.

New crates/scene-backend: the byte-identical error/auth/CSP/SPA-fallback/
scan-guard/junk-list code both app backends carried now lives once. CSP
is parameterized (emulator_blobs) and keeps the unsafe-eval guard test.

Dedup: Rust helpers (playlist row mapper, manifest_204/album_204,
cached(), classify table, capitalize_first); frontend helpers (fmtTime,
hex2, persist, persistedMode, gl, canvas2d, stage) replace 3–15× copies;
the 16-branch viz chain becomes a component map with the ids defined
once; the Escape cascade becomes an ordered table; modal CSS moves to
@scene/design (≤640px fullscreen preserved); party api.ts gains
tracker's richer error extraction.

Comments (~1,600 lines): delete iteration-journey notes, section
banners, router-table narration and test war stories; compress design
essays to their constraints. Constraint comments (CSP rationale,
hvsc.rs, iOS audio, Tunnel seam math, cassette physics) untouched.

Net −3,374 lines. just lint (zero warnings), just build, cargo test
--workspace, tracker integration (--ignored), player unit/browser/visual
suites and both frontend typechecks all pass.
`POST /api/rescan/{root}` answers 202 and walks in the background for a
`scan` root, so the bare POST in collection_filter_scopes_rows_and_facets
left the second root racing the three queries that follow. Locally the
three-file fixture always won; on CI it did not, and the unfiltered
stream came back with 3 ids while each collection filter reported 3 —
`all.len() == mods.len() + extra.len()` failing 3 vs 6.

Use the harness's `rescan_root`, which asserts the 202 and then waits on
`/status`, and pin the unfiltered count so a silent regression to the
one-root reading cannot pass.
@eetu
eetu merged commit 6ea0b85 into main Aug 8, 2026
8 checks passed
@eetu
eetu deleted the debloat-pass branch August 8, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant