Repository navigation
feat(locallibrary): read records from HappyView instead of data servers - #258
Draft
botandbang wants to merge 18 commits into
Draft
botandbang wants to merge 18 commits into
botandbang wants to merge 18 commits into
Conversation
…d of PDSes HappyView now indexes community.lexicon.calendar.event, keeping only events by accounts that manage one of the root's projects, and re-reads managers' events once per record script version. The announce form, the changed-in-another-app marker, and the reads before a save or delete come from HappyView instead of the manager's PDS. The edit form carries the CIDs of the show and event it shows, and a save only lands on those: one that HappyView no longer serves is refused before anything is written, and the event and then the show are written with swapRecord on them, so a change made elsewhere asks the manager to reload. A new show stays one applyWrites, a delete removes the event and then the show, and saves and deletes wait for the event to be served too.
HappyView only learns of records from Jetstream or a per-account backfill, so locallibrary records written before HappyView indexed their collections were missing from it. The new computer.localnetwork.directory.requestIndex procedure, answered with inter-service auth, re-reads the caller's own dj.set, dj.profile and locallibrary.settings at most every ten minutes per account, through a Backfills class the set picker now shares. locallibrary's permission set grants the call. dj/set.lua also keeps a set's createdAt, sources and address as written, so a read before a write sees the record as published.
Publish plans, settings import and the bug report space's version now come from Local Network's directory instead of each account's data server, and writes swap on the CID the directory has. The first plan for an account asks the website to have the directory re-read it. --pds and the legacy plays publish record read are gone, and handles no longer fall back to Bluesky's AppView for resolution.
…bug report space from HappyView HappyView now indexes app.bsky.graph.verification (the root's only), app.bsky.actor.profile (display names of verified accounts and project managers), app.bsky.graph.follow (follows by press kit owners whose kit lets the people they follow in) and app.userinput.space (the configured space only), each behind a record gate, with their lexicons checked in. Verifications, the display-name check, the press kit "following" audience and the bug report's space version read through IndexedRepo instead of PDSes. Verification grants swap on HappyView's CID and wait for it to serve the write. New verifications are limited to project managers, the only accounts besides verified ones whose display names HappyView keeps.
…vents # Conflicts: # apps/web/README.md # apps/web/src/lib/server/forms/project.ts # apps/web/src/routes/projects/[slug]/+page.server.ts
…cords # Conflicts: # apps/web/src/lib/server/services/epk.ts
# Conflicts: # apps/web/src/lib/server/services/projects.ts
…ky-records # Conflicts: # apps/web/README.md # apps/web/src/lib/server/happyview/bundle.test.ts # apps/web/src/lib/server/happyview/refresh.ts # apps/web/src/lib/server/services/sets.test.ts # apps/web/tests/integration/flows.test.ts
…ppyview # Conflicts: # apps/web/README.md # apps/web/src/lib/server/app.ts # apps/web/tests/integration/flows.test.ts
…vents # Conflicts: # apps/web/README.md
…ky-records # Conflicts: # apps/web/README.md # apps/web/src/lib/server/app.ts # apps/web/src/lib/server/happyview/indexed.ts # apps/web/src/lib/server/services/epk.test.ts # apps/web/src/lib/server/services/epk.ts
…ppyview # Conflicts: # apps/locallibrary/tests/it/main.rs # apps/web/README.md # apps/web/src/lib/server/services/projects.ts # apps/web/tests/integration/flows.test.ts # crates/locallibrary/src/atmosphere/repo/tests.rs
2 of 4 tasks
bnb
approved these changes
Oct 26, 2026
This branch has not been deployed
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.
Builds on #256.
What and why
locallibrary read records straight from each account's data server: the read before publishing settings, a DJ profile or a set;
settings import; and the bug report space's version. Its handle resolution also fell back topublic.api.bsky.app. It now reads HappyView, and handles resolve through DNS and.well-knownonly.Added:
computer.localnetwork.directory.requestIndex, a procedure the website answers with inter-service auth from the caller's PDS. It has HappyView re-read the caller's owndj.set,dj.profileandlocallibrary.settings, at most every ten minutes per account (aBackfillsclass the set picker now shares). locallibrary's permission set grants the callatmosphere/directory.rs: reads throughgetRecords, withLOCALLIBRARY_HAPPYVIEW_URLandLOCALLIBRARY_WEBSITE_URLoverrides. The first plan for an account callsrequestIndexand remembers it inatmosphere.jsonChanged:
dj/set.luakeeps a set'screatedAt, sources and address as written, and comparisons only count the fields the lexicon defines, so an unchanged set reads as unchangedIt also corrects the README's figure for the follow gate, which was measured at 0.6 ms before the gate joined press kits to their projects.
Removed:
--pds, the legacyplays publishrecord read, and the public AppView handle fallback.How it was tested
requestIndexoutcomescargo nextest, clippy,cargo coverageand the Hegel coverage run; apps/webpnpm verify,pnpm test:integrationandpnpm test:coverageChecklist
apps/locallibrary/CHANGELOG.mdhas a line under Unreleased, if people using it will noticedocs/and--helpstill say what the code does (apps/locallibrary/docs/rpc/too, for a sidecar change)