Skip to content

Offer a copy of the link page and show 8-symbol device codes - #2

Merged
kualta merged 2 commits into
mainfrom
link-copy
Nov 9, 2026
Merged

kualta merged 2 commits into
mainfrom
link-copy

Conversation

@kualta

@kualta kualta commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Linking now tells you to approve from the browser where you use NOTE, and lets you carry the link there. It also picks up the new 8-character device code from @flow-industries/seal 0.2.0.

  • Why: the plugin opens NOTE's link page in the default browser, which may be a browser or profile that has never opened your notepad. Such a browser can't vouch for who has access to the notepad, so the page refuses to approve from it.
  • Copy: the link modal says the page opened in your default browser and that you should approve from the browser where you use NOTE. If that is a different browser or profile, copy the link and open it there. Then sign in if asked, enter the Flow ID code if the page asks for it (it does when you arrive signed out), and type the device code.
  • Copy link button: sits next to Open link page again. It puts the full link page URL, including the Flow ID code, on the clipboard and shows a Notice. If the clipboard write fails:
    • A Notice that stays until dismissed shows the URL.
    • The modal adds a read-only Link field with the URL, focused and selected, so it can be copied by hand.
  • Labels: the user code is labelled Flow ID code, to match NOTE's link page, which asks for the device code, not the Flow ID code. Device code is unchanged.
  • Device code format: now XXXX XXXX (eight Crockford base32 characters). It arrives formatted from seal 0.2.0, so the modal shows it as given.
  • README: the linking steps describe the 8-character device code, the default-browser behaviour and Copy link. They name the browser that set up or recovered the notepad, and say that a browser that has never opened the notepad can't approve. Neither can one NOTE says can't change who has access.
  • Versions: @flow-industries/seal goes ^0.1.0 -> ^0.2.0, which is required because the old code format can't complete a link with the updated NOTE page. The plugin version goes 0.1.0 -> 0.1.1 in manifest.json, package.json and versions.json.
  • e2e test: its pin on the device-code format now expects XXXX XXXX.

Testing

All on Bun 1.4.2:

bun x bun@1.4.2 install --frozen-lockfile
bun run lint            # clean
bun run lint:obsidian   # 0 errors (13 warnings, all on lines this PR doesn't touch)
bun run typecheck       # clean
bun test                # 94 pass, 0 fail (including the e2e link against seal 0.2.0's in-memory Flow ID)
bun run build
bun run smoke           # main.js loads, requiring only obsidian and @lezer

Manual check in Obsidian:

  1. Install main.js, manifest.json and styles.css into a test vault's .obsidian/plugins/flow-note/ and run FLOW NOTE Sync: Link this vault.
  2. The modal shows the Flow ID code and a device code like 7K3M 9QXZ, and opens NOTE's link page in the default browser.
  3. Copy link shows "Link copied…". The clipboard holds https://note.flow.talk/link?code=…. If the clipboard is unavailable, the selected Link field appears under the buttons.
  4. Opening that link in the browser where you use NOTE, then typing the device code, approves the link.

Simplify pass

I reviewed the diff against AGENTS.md:

  • Obsidian API use stays in src/obsidian/.
  • No new comments. UI text is sentence case and passes the obsidianmd rules.
  • The copy-to-clipboard handling is one method on the modal, which keeps a single flag for the fallback field.
  • A non-NOTE verification address still gets neither Open nor Copy, so the plugin never hands one on.

Nothing else needed simplifying. I re-ran lint, the obsidianmd lint, typecheck, the tests, the build and the smoke test after the pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T19:31:44.400947Z 6828a08 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kualta
kualta merged commit 6b5db5b into main Nov 9, 2026
1 check passed
@kualta
kualta deleted the link-copy branch November 9, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant