Materialize members' shared notes as vault files, kept fresh automatically - #73
Open
jakepel03 wants to merge 1 commit into
Open
Materialize members' shared notes as vault files, kept fresh automatically#73jakepel03 wants to merge 1 commit into
jakepel03 wants to merge 1 commit into
Conversation
jakepel03
force-pushed
the
materialize-shared-notes-69
branch
from
August 3, 2026 19:59
3b7349c to
a255ece
Compare
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.
Closes #69 — the read side of "a project is a folder in your vault": other members' shared notes appear as real files under
Shared Projects/<project>/and stay current automatically, so they work with native search, graph view, and backlinks instead of living behind the Discover modal.How it works
Two-tier refresh (
SharedNotesController, every 60s + on startup + a manual command):dkg:sourceFileHash(upstream content fingerprint) anddkg:sourceFileName(the author's real filename). Both verified to replicate to member nodes on a live two-node 10.0.2 setup.import-artifact/readpath, pinned at the curator's peer. Unreachable notes back off for 10 minutes instead of hammering the network every tick.Planner/IO split:
sharedNotes.tsis pure (listing parse + per-project plan, 15 unit tests);sharedNotesController.tsdoes the vault IO.Safety rules
materializedNotesstate); a mismatch means the user edited the file → updates for it stop with a one-time notice, and their version survives even if the note is retracted upstream.shouldSkipPathgained the root as a parameter — all call sites updated), and the author'sshared_to/sharedfrontmatter is stripped from materialized copies. Without that, moving a copy out of the folder would re-share the note into the project under the receiving user's identity. Provenance is recorded instead (dkg_origin,dkg_author,dkg_hash) — which is also what Shared project folders, write side: adding a note to a project folder shares it #70's authorship-based skip will key on.(2)suffix; leaving a project keeps the files and just drops their sync state.UX surface
Shared Projects), arrival-notice toggle. Batched notices only ("2 new, 1 updated"), never one per note.materialize?: boolean) exists in settings data; its dashboard toggle ships with the dashboard follow-up below.Deliberately not in this PR
sanitize/parseLiteralhelpers moved tosharedNotes.tsand are imported back).Backward compatibility
Fully backward compatible: four new optional settings keys (defaults fill in on load, no migration), one optional field on
SubscribedContextGraph, a new command id.shouldSkipPath's new parameter is optional; existing behavior is unchanged when it's absent. No node-floor change (the hash/filename triples are simply absent on notes shared by very old nodes — those notes still materialize, they just only re-fetch on manual refresh).Testing
main.jsin sync.our-trips), and the member-side P2P byte-read returns the author's real prose — which is how theshared_tostripping issue was caught.