Repository navigation
Sync the vault both ways with NOTE - #1
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2b0d9a2e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "fake-indexeddb": "6.2.4" | ||
| }, | ||
| "dependencies": { | ||
| "@flow-industries/seal": "link:@flow-industries/seal" |
There was a problem hiding this comment.
Replace the local-only seal dependency
The link: specifier depends on a developer-local package link rather than a registry or repository artifact. Both checked workflows perform a fresh checkout followed directly by bun install --frozen-lockfile, with no step that registers this link, so clean CI and release runners cannot install @flow-industries/seal and stop before tests or builds. Pin a source that fresh public checkouts can resolve.
AGENTS.md reference: AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
| this.remoteChanged(); | ||
| hash = local?.hash ?? ""; | ||
| } else if (remote && remote.path !== path) { | ||
| await vault.rename(id, path); |
There was a problem hiding this comment.
Stage rename cycles through a temporary path
When two existing notes exchange paths—for example A.md → tmp.md, B.md → A.md, then tmp.md → B.md—the planner emits two direct renames, but each destination remains occupied by the other note. The remote vault rejects both operations as path collisions, and every retry produces the same plan, so the swap can never sync. Rename cycles need to be detected and staged through a free temporary path.
Useful? React with 👍 / 👎.
Summary
FLOW NOTE Sync (plugin id
flow-note) links an Obsidian vault once throughnote.flow.talk/link, then syncs its notes and attachments both ways with the person's end-to-end encrypted NOTE notepad, through the device client in@flow-industries/seal.src/controller.ts,src/obsidian/modals.ts,src/account.ts):https://note.flow.talk.src/custody.ts,src/obsidian/vault.ts): the seed, tokens, pin and confirmed account live only in Obsidian's secret storage, under a per-vault namespace. The plugin writes nodata.json.SyncControllerowns the only open device vault. A Web Lock keeps a second window out, and a closed device keeps the lock until itsstop()settles (running work, a token refresh included, finishes first), so a reopen never races a refresh. An open still in flight when the vault closes keeps the lock too, until it settles and stops. Unlink and removal delete the device's databases only after that.src/plan.ts,src/engine.ts):repairLinks: (path) => !path.endsWith(".md"). NOTE then repairs only notes Obsidian doesn't index, such as.mdx, since a second repair of Obsidian's own edits would re-target links in chains and swaps..mdlinks as they are..obsidian/, hidden files, scripts other plugins run (.js,.mjs,.cjs,.jsx,.ts,.mts,.cts,.tsx,.py,.sh), names NOTE can't store, case variants and attachments over 32 MB.sync()since the vault opened reportsread: true, meaning it read and applied the notepad from the PDS. While it hasn't, the plugin makes no syncs of its own: it follows the device client's schedule and backoff, and asks once more after one of those syncs publishes a status it reaches only after a read (synced, or an upload refused for quota or size). A new link never plans against a notepad it hasn't read.eslint-plugin-obsidianmd(bun run lint:obsidian), the rules Obsidian's review runs.Blocked on
package.jsondepends on@flow-industries/sealthrough a locallink:while seal is unpublished. CI'sbun install --frozen-lockfilefails until it moves to the published version.Testing
All of these ran locally with Bun 1.4.2, against a clean local build of seal's latest commit.
bun run lintandbun run typecheckare clean.bun run lint:obsidianlints the whole repo, scripts and tests included, with no errors (also under the plugin's stock recommended config). 13 warnings stay by design: APIs thatminAppVersion1.11.5 still needs (display,setWarning), and timers in modules that also run underbun test.bun test: 94 pass across 9 files..mdxnote's links after a rename Obsidian made.did=record.tests/e2e.test.tsdrives the real device client on@flow-industries/seal/testing, with two vaults linked as two devices. It covers linking and confirmation, two-way sync of notes, MDX and a PNG, a passkey-signed note from NOTE, renames, conflicts, revocation, removal under Access mid-sync, a NOTE edit landing mid-round, and unlink.bun run buildgives 1034 KiB.bun run smokeloadsmain.jsrequiring onlyobsidianand@lezer/*.data.json.Simplify
Ran the simplify pass on each change. It finished a half-done compare-and-swap adoption, ordered each item's own write before its conflict copy, and shared one stale-write predicate.