Skip to content

feat(web): read verifications, Bluesky profiles and follows, and the bug report space from HappyView - #256

Open
botandbang wants to merge 11 commits into
mainfrom
bnb/happyview-bluesky-records
Open

botandbang wants to merge 11 commits into
mainfrom
bnb/happyview-bluesky-records

Conversation

@botandbang

@botandbang botandbang commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #255.

What and why

Verifications, the display names they compare, the press kit "people the managers follow" audience and the bug report's space version were read from PDSes. They now read HappyView, and PublicRepo, which nothing reads through any more, is removed.

Added:

  • Checked-in app.bsky.graph.verification, app.bsky.actor.profile, app.bsky.graph.follow and com.atproto.label.defs lexicons
  • Record scripts that keep only the root's verifications; the display names of verified accounts and project managers; follows by the managers of a project with a press kit that lets the people they follow in; and the configured app.userinput.space (record scripts get USERINPUT_SPACE beside ROOT_DID)
  • Re-reads of those managers' follows (once per script version, when a project publishes its first press kit that reads follows, and for a new manager), the root's verifications and the space, and on demand for a profile or space HappyView doesn't have yet

Changed:

  • Granting a verification swaps on HappyView's CID and waits for the write to be served. New verifications are limited to project managers, since HappyView only keeps managers' and verified accounts' display names
  • The README gives the measured cost: Bluesky carried about 42 follow and 1.3 profile events a second on 2026-10-24, the gates cost about 0.6 ms and 1.3 ms of CPU each (the follow gate measured before it joined press kits to their projects for shared kits; expect it nearer the profile gate's cost), and HappyView 2.16 logs every script run (about 455 bytes), about 1.65 GB a day. HappyView 2.17 only logs that with verbose_event_logging; on 2.16, set event_log_retention_days to 1 before deploying

Removed: atproto/public-repo.ts.

How it was tested

  • Unit tests for every gate clause, the follow re-read, the managers-only check, the grant swap, strict reads and the space re-read
  • pnpm test:integration: verifying a manager, follows before and after a kit that reads them, and a bug report pinning HappyView's space version
  • pnpm verify and pnpm test:coverage

Checklist

  • Tests cover the change
  • For the website: Storybook stories cover any new UI states
  • For locallibrary: apps/locallibrary/CHANGELOG.md has a line under Unreleased, if people using it will notice
  • The READMEs, docs/ and --help still say what the code does

…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.
…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
…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
…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
@botandbang
botandbang requested a review from bnb as a code owner October 25, 2026 22:44
@github-actions github-actions Bot added documentation Improvements or additions to documentation web The Local Network website (apps/web) lexicons The computer.localnetwork.* lexicons web: directory Directory search, the show matcher, genres and places web: projects Project profiles, claims, and the DJ stats and sets on them web: epk Press kits and who can see them web: staff Admin, moderation and the audit log web: server Spaces, sync, HappyView, the database and the server around them web: ui Shared components, design tokens, layout and the static pages tests Tests, fixtures and test harnesses labels Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Coverage Report for apps/web

Status Category Percentage Covered / Total
🟢 Lines 94.46% (🎯 93%)
⬆️ +0.12 pp
5921 / 6268
🟢 Statements 92.8% (🎯 91%)
⬆️ +0.10 pp
9140 / 9849
🟢 Functions 93.33% (🎯 92%)
⬇️ -0.01 pp
2326 / 2492
🟢 Branches 82.55% (🎯 80%)
⬆️ +0.45 pp
4250 / 5148
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/web/src/lib/nsid.ts 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/shows.ts 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/components/ShowForm.svelte 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/app.ts 70.27%
⬆️ +1.48 pp
46.8%
⬆️ +0.14 pp
60.46%
⬆️ +5.20 pp
77.16%
⬆️ +0.94 pp
77, 109, 133, 135, 138, 196-209, 271, 281, 288, 291-292, 304, 326, 343-365, 369, 378-381, 391-396
apps/web/src/lib/server/http.ts 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/atproto/lexicons.ts 100%
🟰 ±0 pp
91.66%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/forms/announce.ts 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/forms/epk.ts 90.84%
🟰 ±0 pp
82.35%
🟰 ±0 pp
93.54%
🟰 ±0 pp
93.91%
🟰 ±0 pp
86, 115-120, 152, 180, 228, 233, 250, 258, 261, 279, 303, 305, 307, 324
apps/web/src/lib/server/forms/project.ts 98.91%
🟰 ±0 pp
91.09%
🟰 ±0 pp
100%
🟰 ±0 pp
99.51%
🟰 ±0 pp
319, 404, 451
apps/web/src/lib/server/happyview/bundle.ts 95.65%
⬆️ +0.20 pp
89.47%
⬆️ +2.81 pp
100%
🟰 ±0 pp
97.36%
⬆️ +0.22 pp
54, 93
apps/web/src/lib/server/happyview/client.ts 100%
🟰 ±0 pp
93.54%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/happyview/indexed.ts 98.27%
⬆️ +0.36 pp
100%
🟰 ±0 pp
94.11%
⬆️ +0.36 pp
100%
🟰 ±0 pp
29
apps/web/src/lib/server/happyview/refresh.ts 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/services/bug-reports.ts 100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
apps/web/src/lib/server/services/epk-drafts.ts 96.37%
⬆️ +0.04 pp
92.89%
🟰 ±0 pp
94.28%
🟰 ±0 pp
98.74%
⬆️ +0.02 pp
286, 328, 339-341, 507, 515
apps/web/src/lib/server/services/epk.ts 93.75%
⬆️ +0.14 pp
86.59%
⬆️ +0.81 pp
96.1%
⬆️ +0.52 pp
95.49%
🟰 ±0 pp
156, 191, 195, 209-218, 600, 760-762, 783-784
apps/web/src/lib/server/services/projects.ts 96.47%
🟰 ±0 pp
92.38%
🟰 ±0 pp
100%
🟰 ±0 pp
98.3%
🟰 ±0 pp
177, 273, 297, 350, 435
apps/web/src/lib/server/services/shows.ts 94.33%
⬆️ +1.23 pp
88.88%
⬆️ +9.94 pp
100%
🟰 ±0 pp
95.52%
⬆️ +1.36 pp
99-100, 108-109, 136, 445-447
apps/web/src/lib/server/services/verifications.ts 97.05%
⬇️ -1.25 pp
92.85%
⬇️ -4.02 pp
93.33%
🟰 ±0 pp
98.18%
⬆️ +0.36 pp
62, 130
apps/web/src/lib/server/testing/core.ts 94.91%
🟰 ±0 pp
80%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
69, 78, 85
apps/web/src/lib/server/testing/fakes.ts 88.97%
⬇️ -1.37 pp
80.28%
⬇️ -1.53 pp
93.02%
⬇️ -2.32 pp
92.37%
⬇️ -1.33 pp
33, 69, 80, 202-210, 219, 248, 322
apps/web/src/lib/server/testing/happyview.ts 94.19%
⬆️ +1.44 pp
88.6%
⬆️ +2.40 pp
97.36%
⬆️ +0.22 pp
96.31%
⬆️ +1.51 pp
185, 190, 212, 232, 296, 365, 383, 414, 428, 508, 533-544, 577
Generated in workflow #480 for commit dc51146 by the Vitest Coverage Report Action

Size

Compared with main. KiB are 1,024 bytes.

This pull request main Change
Client JavaScript 619.4 KiB 619.2 KiB +214 B (+0%)
Client JavaScript, brotli 204.6 KiB 204.5 KiB +23 B (+0%)
Client CSS 87.6 KiB 87.6 KiB 0 B (0%)
Client CSS, brotli 12.5 KiB 12.5 KiB 0 B (0%)

@github-actions

Copy link
Copy Markdown

Rust coverage

From run 468. Both are held to the thresholds in .cargo/config.toml.

Tests Lines Functions Regions
All 97.48% (79305/81353) 96.66% (12646/13083) 95.78% (174216/181886)
Hegel property tests alone 95.44% (77641/81353) 93.93% (12289/13083) 93.49% (170052/181886)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lexicons The computer.localnetwork.* lexicons tests Tests, fixtures and test harnesses web: directory Directory search, the show matcher, genres and places web: epk Press kits and who can see them web: projects Project profiles, claims, and the DJ stats and sets on them web: server Spaces, sync, HappyView, the database and the server around them web: staff Admin, moderation and the audit log web: ui Shared components, design tokens, layout and the static pages web The Local Network website (apps/web)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants