Repository navigation
feat(communities): add relays saved by the previous buzz app - #1786
Open
kalvinnchau wants to merge 10 commits into
Open
kalvinnchau wants to merge 10 commits into
kalvinnchau wants to merge 10 commits into
Conversation
read the previous app's webkit localstorage community list read-only through a native command, and add its secure relays to each viewer's memberships once through the known-communities write. existing memberships and queued removals are kept; a per-viewer marker keeps later removals from being undone. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
return each saved community's recorded pubkey from the native reader and import only the ones saved for the current viewer. remember memberships held while the import runs so one left during the read stays gone after its removal is acknowledged. the disposer abandons a read in flight. start the import from the native app composition. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
record every removal each viewer queues while the import runs, alongside the memberships it holds, so a relay whose queued removal is acknowledged during the native read is not restored. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
…port until the import finishes, store the removal addresses it has seen under the per-viewer marker and seed them on the next launch, so a relay whose removal was acknowledged after a failed read or save is not restored when the import retries. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
mark the observed removal history unsaved when it grows and retry the write on each observation until it succeeds, so a removal whose first progress write failed is still kept once storage recovers. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
kalvinnchau
marked this pull request as ready for review
October 28, 2026 03:44
wesbillman
reviewed
Oct 28, 2026
wesbillman
left a comment
Collaborator
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
Verdict: one blocker and one product decision before merge. Reviewed head 10fc185 against main 6405ec8. The Royal Court split it into three lanes: native reader, importer, and an independent challenge.
Holds up:
- The importer computes and applies its sync state with no await in between, so it cannot clobber the Builderlab owner's acknowledgements.
- Interior symlinks are skipped, and the command takes no path argument.
- A targeted probe read committed UTF-16LE data while a WAL writer held an exclusive transaction.
Merge criteria
- Traversal errors fail the read instead of completing the import (inline,
legacy_communities.rs). - Decide whether the import may re-add relays the user already removed, and gate it if not (inline,
legacy-communities.ts:110). - Run a real migration from an installed old Buzz once. Today's tests use fixture SQLite layouts that bypass
root(), so WebKit discovery and the on-disk format are unproven.
The other inline comments are optional. CI is green at this head. Per this repo's AGENTS.md, this review is posted as a comment and not as Request Changes.
fail the legacy read on directory, entry, and file type errors while allowing only a missing root to read as empty. preserve symlink skipping and cover access recovery and importer retry after a rejected read. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
require approval for every nonempty legacy import because account state cannot prove that acknowledged removals never existed. offer the saved origins after launch and remember a declined import without adding or queueing communities. recheck current membership and sync state after consent, preserving edits made while the prompt is open. cover acknowledged removals, uncertain account sync, dialog disposal, native app wiring, and browser startup focus with reload persistence. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
set the storage event source so appearance applies the requested scale and assert the computed root size before checking keyboard reachability. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
remove the whole-app browser journey and duplicate dismissal cases. retain native traversal, consent, removal and retry regressions in the existing unit and component layers without expanding browser fixtures. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
remove native fixtures, importer permutations, dialog tests and the startup test at the author's request. retain only consent gating and the one-time completion check without changing production behavior. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
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.
Summary
Offer to import communities saved by the previous Buzz desktop app for the signed-in identity. Every nonempty import requires explicit consent because current account state cannot establish whether old communities were previously removed. The prompt lists eligible origins and warns that importing may restore removed communities. Declining persists the decision.
The native reader opens the old macOS WebKit databases read-only, skips symlinks and propagates traversal/database errors so failures remain retryable. Only an absent root reads as empty. Import preserves existing settings and memberships and checks current state again after consent.
Test scope
At the author's explicit request, keep only one small importer test for this one-time startup migration. It checks that nothing is written before consent, approval adds the community and upload intent, and the completion marker prevents another read. Migration-specific test code drops from 734 lines to 56.
Remove the native fixtures, importer scenario matrix, dialog suite and added startup test. The previously added browser journey is also removed; no shared browser-build infrastructure is added. Native parsing/traversal, removal/sync permutations, retries, dismissal/lifecycle and app/browser integration no longer have dedicated migration regression coverage. Prior checks remain historical evidence, not permanent coverage. This deliberately accepts that coverage tradeoff to reduce ongoing test maintenance and execution for a one-time feature.
Validation
afe0beb90. Latest-head CI run 40743552194 is pending for this reduction. Independent review approved the change with no findings. The prior head3ddb185f7passed CI run40737395802.Native GUI/IPC/OS-path acceptance and live relay reconnect remain unobserved. Optional skipped-entry diagnostics and importer simplification remain deferred.