Skip to content

feat: add optional github gist sync for the desktop app - #22

Merged
phaethix merged 1 commit into
mainfrom
cursor/github-gist-sync-e01d
Oct 30, 2026
Merged

phaethix merged 1 commit into
mainfrom
cursor/github-gist-sync-e01d

Conversation

@phaethix

Copy link
Copy Markdown
Owner

Summary

Desktop users can optionally sign in to GitHub with the OAuth Device Flow and push or pull the open mind map as text in a secret Gist. ~/Documents/Mind stays the source of truth. Nothing is uploaded until the user confirms a push. The browser build has no sync commands.

Closes #21

Type of change

  • Bug fix
  • New feature
  • Build, CI or tooling
  • Documentation

How it was tested

  • cargo test --locked --manifest-path desktop/src-tauri/Cargo.toml --lib github (device-flow mock, secret gist create/update, 1 MB limit, token file mode, link rename/delete, pull overwrite predicate)
  • cargo check --locked --manifest-path desktop/src-tauri/Cargo.toml
  • cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --check
  • bun x prettier --check .
  • bun web/src/utils/fileLibrary.test.cjs, bun web/src/utils/mermaidMindmap.test.cjs, bun simple-mind-map/test/xmind-associative-line.test.cjs
  • cd web && npm run build

The Tauri window was not launched here, so the menu, dialog, and a live GitHub device-code login were not clicked through.

Configure the OAuth App

  1. Create an OAuth App at https://github.com/settings/developers. Homepage URL can be this repository. Device Flow does not use the callback; http://127.0.0.1 satisfies the form.
  2. Enable Device Flow on the app. Copy the Client ID. Do not put a client secret in the app, the repo, or CI.
  3. Provide the Client ID with MIND_GITHUB_CLIENT_ID at runtime or compile time, or as clientId in github.json next to ai.json. YOUR_CLIENT_ID in the README is a placeholder, not a real id.
  4. Apply for the GitHub Developer Program at https://github.com/developer/register with a support email you monitor. This change does not submit that application.

Checklist

  • I ran the relevant build or test locally — CI covers formatting and the web build
  • Behaviour changes are reflected in the README or in code comments
Open in Web Open in Cursor 

Sign in with the OAuth device flow and push or pull the open map as text in a secret gist. The browser build stays local-only.

Co-authored-by: cosmoli <phaethix@users.noreply.github.com>
@phaethix
phaethix merged commit fd3064c into main Oct 30, 2026
5 checks passed
@phaethix
phaethix deleted the cursor/github-gist-sync-e01d branch October 30, 2026 17:06
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.

feat: Sync maps to GitHub Gists via OAuth Device Flow (Developer Program integration)

2 participants