Repository navigation
feat(web): read DJ records and press kits from HappyView instead of PDSes - #253
Merged
Merged
Conversation
…DSes Project pages read each manager's DJ profile and sets, and press kits read and listed epk records, straight from each account's PDS. HappyView now indexes dj.profile, epk and locallibrary.settings, keeps dj.set's full tracklists, and answers two generic queries, getRecords and listRecords, that an IndexedRepo reads through. Saving a press kit swaps on the CID HappyView served, so an edit made elsewhere since asks the owner to reload. Record lexicons are collected from the record scripts under lua/, and the per-version re-read covers every manager collection.
# Conflicts: # apps/web/src/lib/server/app.ts # apps/web/src/lib/server/happyview/bundle.ts
…t's whole record Since stored sets keep their full tracklist, the charts and artist queries went back to each set record for every play, and SQLite parsed the whole record, tracklist included, each time. The plays query now takes namedTracks out of each set once and carries each play's track with it, so getCharts and getArtist stop joining back to the set.
The edit form carries the press kit record's CID, and a save is refused with a reload message when HappyView serves a different version, before anything is written. The PDS write swaps on that CID too, so a change HappyView hasn't seen yet is refused the same way.
…adow the record's
# Conflicts: # apps/web/README.md # apps/web/src/routes/epk/[did]/[rkey]/edit/+page.server.ts
# Conflicts: # apps/web/README.md # apps/web/src/lib/epk.ts # apps/web/src/lib/server/db/migrations.ts # apps/web/src/lib/server/epk-page.test.ts # apps/web/src/lib/server/epk-page.ts # apps/web/src/lib/server/forms/epk.test.ts # apps/web/src/lib/server/forms/epk.ts # apps/web/src/lib/server/services/epk.test.ts # apps/web/src/lib/server/services/epk.ts # apps/web/src/routes/dashboard/projects/[slug]/press-kits/[did]/[rkey]/+page.server.ts # apps/web/src/routes/projects/[slug]/press-kits/page.svelte.test.ts
Coverage Report for apps/web
File Coverage
SizeCompared with main. KiB are 1,024 bytes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rust coverageFrom run 463. Both are held to the thresholds in .cargo/config.toml.
|
bnb
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Project pages read each manager's DJ stats and sets, and press kits read and listed
computer.localnetwork.epkrecords, straight from each account's PDS throughPublicRepo. They now read HappyView.Added:
computer.localnetwork.directory.getRecords(up to 25 URIs) andlistRecords(one account's records of one collection, with a cursor), returning each record's URI, CID and value as its record script stored itIndexedRepo(happyview/indexed.ts), which reads through them with PublicRepo's call shape. A HappyView outage reads as nothing for display, andstrictreads (the ones a write depends on) fail with the directory-offline 503 insteaddj.profile,epk(the root's own press kits, and legacy ones by a manager of the project they name) andlocallibrary.settingshappyview/refresh.ts), generalized from the one dj.set had, plus a re-read when a project gains a managerChanged:
lua/, so indexing a collection is one new filedj/set.luakeeps every author's sets, with the tracklist as written (tempo, keys, transitions); the queries narrow to managers of the root's projects, as beforeepk.luakeeps the root's own press kitsgetArtisttake minutes on a large seedHow it was tested
pnpm test:integrationagainst a real PDS and HappyView 2.16: DJ stats and sets with tracklists, and a press kit draft saved, published, edited elsewhere while its form is open (refused), and saved againpnpm verifyandpnpm test:coverageChecklist
apps/locallibrary/CHANGELOG.mdhas a line under Unreleased, if people using it will noticedocs/and--helpstill say what the code does