chore(web): retire the v1 front end, keeping its design tokens - #84
Conversation
web/ was the TanStack Start + Better Auth client for the v1 server. Its routes address a profile/library hierarchy that no longer exists and its server functions assume a Node runtime the single binary does not have, so it has been neither built, served nor tested since the v2 rebuild. Keeping it meant a half-application in the tree that every review kept flagging. packages/design-tokens is the part worth keeping: 14 theme presets, accent palettes and the DOM apply helper, with no dependencies and its own tests. Its shape mirrors the desktop's ThemePreset so a dump of the desktop preference hydrates the web side without translation, which is what M6 needs. It moves to webapp/src/design-tokens with its suite; vitest gains a jsdom environment, since applyTheme writes onto document.documentElement. Tooling comes back as Biome rather than the inherited eslint + prettier + plugins chain: one dependency and one pass for a client of a handful of files. It surfaced real issues — every non-submit button lacked an explicit type, which inside a form means submit — now fixed. The web workflow lints. Dependabot and the labeler tracked /web; both now point at webapp, and the rules that targeted Better Auth routes or the old husky/eslint/prettier config are dropped rather than remapped onto files that do not exist. Signed-off-by: InstaZDLL <github.105mh@8shield.net>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughLe client historique ChangesMigration du client web
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/dependabot.yml:
- Around line 30-34: Update the Dependabot entry for the webapp directory to use
package-ecosystem: bun instead of npm, ensuring the configuration targets
webapp/bun.lock directly while preserving the existing directory and update
settings.
In @.github/labeler.yml:
- Around line 52-59: Remove the obsolete authentication-pattern comments in the
scope: auth block of labeler.yml, or restore the corresponding sign-in.tsx and
sign-up.tsx globs if those files are still intended to receive the
authentication label. Keep the comments aligned with the active configured
patterns.
In `@webapp/package.json`:
- Around line 12-14: Align the lint and format script scope with the patterns
defined in webapp/biome.json: if root-level TypeScript and JSON configuration
files are intended to be checked, update both scripts from src to the repository
root using Biome’s recursive check; otherwise narrow the biome configuration
patterns to src and preserve the scripts.
In `@webapp/src/pages.tsx`:
- Line 42: Move the biome-ignore directive from inside the effect callback to
immediately before the useEffect(() => { call in the affected component, so it
suppresses useExhaustiveDependencies for that hook while preserving the
caller-supplied dependency list.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 5cafae27-da6f-48fa-beb5-907ee558c850
⛔ Files ignored due to path filters (5)
web/bun.lockis excluded by!**/*.lockweb/public/favicon.icois excluded by!**/*.icoweb/public/logo192.pngis excluded by!**/*.pngweb/public/logo512.pngis excluded by!**/*.pngwebapp/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (132)
.dockerignore.github/dependabot.yml.github/labeler.yml.github/workflows/ci-web.ymlAGENTS.mdCLAUDE.mddocs/M4-handoff.mdpackage.jsonweb/.coderabbit.yamlweb/.commitlintrc.cjsweb/.env.exampleweb/.gitignoreweb/.husky/commit-msgweb/.prettierignoreweb/.prettierrc.jsonweb/.vscode/settings.jsonweb/CLAUDE.mdweb/CONTRIBUTING.mdweb/LICENSEweb/README.mdweb/db/README.mdweb/db/migrations/0001_better_auth_initial.sqlweb/db/migrations/0002_jwt_plugin.sqlweb/eslint.config.jsweb/package.jsonweb/packages/design-tokens/package.jsonweb/packages/design-tokens/src/apply.test.tsweb/packages/design-tokens/src/palettes.tsweb/packages/design-tokens/src/themes.test.tsweb/packages/design-tokens/tsconfig.jsonweb/public/manifest.jsonweb/public/robots.txtweb/scripts/db-migrate.tsweb/src/components/DeletePlaylistDialog.test.tsxweb/src/components/DeletePlaylistDialog.tsxweb/src/components/Footer.tsxweb/src/components/Header.tsxweb/src/components/NowPlayingOverlay.test.tsxweb/src/components/NowPlayingOverlay.tsxweb/src/components/OAuthButtons.tsxweb/src/components/PlayableTrackList.test.tsxweb/src/components/PlayableTrackList.tsxweb/src/components/PlayerBar.tsxweb/src/components/PlaylistFormDialog.test.tsxweb/src/components/PlaylistFormDialog.tsxweb/src/components/QueuePanel.test.tsxweb/src/components/QueuePanel.tsxweb/src/components/ThemePicker.test.tsxweb/src/components/ThemePicker.tsxweb/src/components/ThemeProvider.test.tsxweb/src/components/ThemeProvider.tsxweb/src/components/ThemeStyle.tsxweb/src/components/ThemeToggle.tsxweb/src/components/TrackFilterBar.test.tsxweb/src/components/TrackFilterBar.tsxweb/src/components/WaveflowLogo.tsxweb/src/lib/auth-client.tsweb/src/lib/auth.tsweb/src/lib/db.tsweb/src/lib/format-time.tsweb/src/lib/player-context.test.tsxweb/src/lib/player-context.tsxweb/src/lib/server/waveflow-server.test.tsweb/src/lib/server/waveflow-server.tsweb/src/lib/share-format.test.tsweb/src/lib/share-format.tsweb/src/lib/use-focus-trap.test.tsxweb/src/lib/use-focus-trap.tsweb/src/router.tsxweb/src/routes/-sign-in.test.tsweb/src/routes/__root.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.$albumId.test.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.$albumId.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.test.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.$artistId.test.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.$artistId.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.test.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.tsxweb/src/routes/_authed.profiles.$profileId.libraries.$libraryId.tsxweb/src/routes/_authed.profiles.$profileId.playlists.$playlistId.test.tsxweb/src/routes/_authed.profiles.$profileId.playlists.$playlistId.tsxweb/src/routes/_authed.profiles.$profileId.playlists.test.tsxweb/src/routes/_authed.profiles.$profileId.playlists.tsxweb/src/routes/_authed.profiles.$profileId.tsxweb/src/routes/_authed.profiles.tsxweb/src/routes/_authed.settings.test.tsxweb/src/routes/_authed.settings.tsxweb/src/routes/_authed.tsxweb/src/routes/about.tsxweb/src/routes/api/auth/$.tsweb/src/routes/desktop-login.tsxweb/src/routes/index.tsxweb/src/routes/p.$token.tsxweb/src/routes/sign-in.tsxweb/src/routes/sign-up.test.tsxweb/src/routes/sign-up.tsxweb/src/server-fns/_internal.tsweb/src/server-fns/albums.tsweb/src/server-fns/artists.tsweb/src/server-fns/desktop-login.test.tsweb/src/server-fns/desktop-login.tsweb/src/server-fns/libraries.tsweb/src/server-fns/playlists.tsweb/src/server-fns/profiles.tsweb/src/server-fns/providers.test.tsweb/src/server-fns/providers.tsweb/src/server-fns/session.tsweb/src/server-fns/share.test.tsweb/src/server-fns/share.tsweb/src/server-fns/stream.tsweb/src/server-fns/theme.tsweb/src/server-fns/tracks.tsweb/src/styles.cssweb/tsconfig.jsonweb/vite.config.tsweb/vitest.config.tswebapp/biome.jsonwebapp/package.jsonwebapp/src/api.test.tswebapp/src/api.tswebapp/src/design-tokens/apply.test.tswebapp/src/design-tokens/apply.tswebapp/src/design-tokens/index.tswebapp/src/design-tokens/palettes.tswebapp/src/design-tokens/themes.test.tswebapp/src/design-tokens/themes.tswebapp/src/main.tsxwebapp/src/pages.tsxwebapp/src/player.tsxwebapp/src/styles.csswebapp/vitest.config.ts
💤 Files with no reviewable changes (110)
- web/.husky/commit-msg
- web/public/robots.txt
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.test.tsx
- web/src/components/TrackFilterBar.test.tsx
- web/.prettierrc.json
- web/.vscode/settings.json
- .dockerignore
- web/src/lib/format-time.ts
- web/src/lib/auth-client.ts
- web/src/routes/sign-up.test.tsx
- web/src/components/DeletePlaylistDialog.tsx
- web/src/routes/api/auth/$.ts
- web/eslint.config.js
- web/tsconfig.json
- web/src/components/QueuePanel.test.tsx
- web/public/manifest.json
- web/packages/design-tokens/tsconfig.json
- web/README.md
- web/db/migrations/0001_better_auth_initial.sql
- web/.coderabbit.yaml
- web/src/components/Header.tsx
- web/src/routes/-sign-in.test.ts
- web/.gitignore
- web/src/lib/player-context.test.tsx
- web/src/components/PlayerBar.tsx
- web/packages/design-tokens/src/apply.test.ts
- web/src/components/DeletePlaylistDialog.test.tsx
- web/scripts/db-migrate.ts
- web/src/components/NowPlayingOverlay.test.tsx
- web/src/components/ThemePicker.test.tsx
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.$artistId.test.tsx
- web/src/components/Footer.tsx
- web/src/styles.css
- web/db/migrations/0002_jwt_plugin.sql
- web/vite.config.ts
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.$albumId.tsx
- web/src/server-fns/libraries.ts
- web/db/README.md
- web/src/routes/_authed.profiles.$profileId.playlists.test.tsx
- web/src/server-fns/providers.test.ts
- web/CLAUDE.md
- web/.prettierignore
- web/src/server-fns/desktop-login.test.ts
- web/src/lib/share-format.ts
- web/.commitlintrc.cjs
- web/src/routes/p.$token.tsx
- web/src/components/ThemeProvider.test.tsx
- web/src/routes/index.tsx
- web/src/router.tsx
- web/src/routes/desktop-login.tsx
- web/src/server-fns/profiles.ts
- web/src/lib/share-format.test.ts
- web/src/components/PlaylistFormDialog.test.tsx
- web/src/server-fns/stream.ts
- web/src/lib/use-focus-trap.ts
- web/src/components/PlaylistFormDialog.tsx
- web/src/routes/_authed.tsx
- web/package.json
- web/CONTRIBUTING.md
- web/src/components/OAuthButtons.tsx
- web/.env.example
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.test.tsx
- web/src/routes/_authed.settings.test.tsx
- web/src/server-fns/share.ts
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.tsx
- web/src/components/NowPlayingOverlay.tsx
- web/packages/design-tokens/src/themes.test.ts
- web/src/routes/__root.tsx
- web/src/lib/server/waveflow-server.test.ts
- web/src/components/ThemePicker.tsx
- web/src/routes/_authed.profiles.$profileId.playlists.$playlistId.test.tsx
- web/src/components/PlayableTrackList.test.tsx
- web/src/lib/db.ts
- web/src/routes/about.tsx
- web/src/routes/_authed.profiles.tsx
- web/src/server-fns/providers.ts
- web/src/server-fns/share.test.ts
- web/src/components/QueuePanel.tsx
- web/src/server-fns/_internal.ts
- web/src/server-fns/tracks.ts
- web/src/lib/server/waveflow-server.ts
- web/src/components/WaveflowLogo.tsx
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.$artistId.tsx
- web/src/components/ThemeToggle.tsx
- web/vitest.config.ts
- web/src/routes/_authed.settings.tsx
- web/src/lib/auth.ts
- web/src/components/PlayableTrackList.tsx
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.$albumId.test.tsx
- web/src/routes/sign-up.tsx
- web/packages/design-tokens/src/palettes.ts
- web/src/server-fns/session.ts
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.tsx
- web/LICENSE
- web/src/lib/use-focus-trap.test.tsx
- web/src/server-fns/artists.ts
- web/src/routes/_authed.profiles.$profileId.playlists.$playlistId.tsx
- web/src/routes/sign-in.tsx
- web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.tsx
- web/src/components/TrackFilterBar.tsx
- web/src/routes/_authed.profiles.$profileId.tsx
- web/src/server-fns/albums.ts
- web/src/routes/_authed.profiles.$profileId.playlists.tsx
- web/src/components/ThemeProvider.tsx
- web/src/server-fns/playlists.ts
- web/src/server-fns/desktop-login.ts
- web/src/lib/player-context.tsx
- web/src/components/ThemeStyle.tsx
- web/packages/design-tokens/package.json
- web/src/server-fns/theme.ts
…andoff Review findings, verified one by one. The labeler still routed sixteen paths that the v1 removal deleted: scope: auth pointed at src/auth.rs and src/middleware.rs, scope: sync at the apply pipeline, scope: artwork at the object_store modules. Those labels could no longer fire. Scopes now name the v2 files, sync and artwork give way to subsonic and scanner, and no configured path is missing from the tree. Biome's config declared root-level TypeScript and JSON in scope while the scripts only passed src, so nothing checked them — including biome.json itself, which was using the deprecated `recommended` field. Both scripts now run over the package, 17 files instead of 12. Skipped, with reasons: - Switching Dependabot to the `bun` ecosystem. It exists now, but supports version updates only: no security updates. npm reads package.json + bun.lock correctly here and does raise security PRs. The stale claim that Dependabot has no Bun parser is corrected in place. - Moving the biome-ignore above useEffect. Tried it: the rule fires on the dependency argument, and the directive stops suppressing anything from the higher line — two warnings came back. It stays where it works, with a comment saying why. Handoff records that M4 is merged, that main is green again, and how the front tooling now works. Signed-off-by: InstaZDLL <github.105mh@8shield.net>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/dependabot.yml:
- Around line 30-36: Vérifiez le comportement réel de la configuration
Dependabot pour l’écosystème npm dans /webapp en recherchant une PR de mise à
jour de dépendance transitive qui modifie également bun.lock. Si ce comportement
n’est pas confirmé, remplacez npm par l’écosystème officiellement associé à
bun.lock ou ajustez la configuration pour utiliser un couple écosystème/lockfile
documenté, puis mettez à jour le commentaire pour refléter le choix validé.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 35622ceb-0f6f-46af-8333-adbc19eb9242
📒 Files selected for processing (6)
.github/dependabot.yml.github/labeler.ymldocs/M4-handoff.mdwebapp/biome.jsonwebapp/package.jsonwebapp/src/pages.tsx
Signed-off-by: InstaZDLL <github.105mh@8shield.net>
Signed-off-by: InstaZDLL <github.105mh@8shield.net>
…cisions The Desktop still talks entirely to the v1 server: its six endpoints have zero occurrences in the v2 codebase, and its login flow depends on the web front removed in #84. This is not a sync update but a paradigm change — a client-arbitrated peer protocol (Lamport/HLC clocks, digest reconciliation, LWW backfill) gives way to a linear journal the server owns. The document inventories the ~6000 affected lines, maps each v1 route to its v2 counterpart or records that none exists, and separates what becomes moot from what stays necessary. It also records the three decisions now settled, each verified against the server code rather than assumed: - A Desktop profile maps to a server account; profile_canonical_id becomes purely local. Nothing to add server-side: login already returns the account id and device id, and library_id is an existing catalogue filter. - Authorization Code + PKCE over loopback replaces the /desktop-login handshake. - The Desktop streams with a Bearer header; sealed tickets stay reserved for consumers that cannot send one. The queue constraints are spelled out because one of them is easy to miss and fails on an ordinary gesture: the server rejects a reused operation id whose canonical fingerprint differs, so a queued mutation must be immutable once enqueued. Correcting an action before the queue drains requires a new operation id, not an edited entry. Claude-Session: https://claude.ai/code/session_01NJBwjsQ17Bx2PgvPbBGNpM Signed-off-by: InstaZDLL <github.105mh@8shield.net>
Removes
web/, the TanStack Start + Better Auth client for the v1 server, after salvaging the one part worth keeping.Why it goes
Its routes address a
profiles/$profileId/libraries/$libraryIdhierarchy that no longer exists, and its server functions assume a Node runtime the single binary does not have. It has been neither built, served nor tested since the v2 rebuild — and since M4 it is outside CI entirely. Keeping it meant a half-application in the tree that every review kept flagging.What is kept
packages/design-tokens→webapp/src/design-tokens/: 14 theme presets (6 light, 8 dark), accent palettes and the DOM apply helper. No dependencies, its own tests. Its shape deliberately mirrors the desktop'sThemePreset, so a dump of the desktop preference hydrates the web side without translation — which is what M6 ("studio-nocturne, bilingual") will need.webapp/currently has a handful of hand-written CSS variables.vitest gains a jsdom environment, since
applyThemewrites ontodocument.documentElement.Tooling
Biome rather than the inherited eslint + prettier + husky + commitlint chain: one dependency and one pass, for a client of a handful of files. Flagged by the user as a preference to weigh, and I took it — noting it diverges from what
web/used.It found real problems: every non-submit
<button>lacked an explicittype, which inside a<form>means submit. Fixed. The web workflow now lints.Configuration
Dependabot and the labeler both tracked
/web. They now point atwebapp. Rules targeting Better Auth routes, or the old husky/eslint/prettier files, are dropped rather than remapped onto files that do not exist.Verification
fmtand clippy clean — unchanged by this PRweb/remains outside git historyCloses #81, closes #73 — both bumped dependencies of the removed front end.
Summary by CodeRabbit
Nouvelles fonctionnalités
Changements
Tests