Repository navigation
feat(desktop): connect-flow upgrades — live Notion MCP connection, guided Obsidian/Notion screens, Claude Code restart button - #10205
Merged
Conversation
…y copy in connect cards
After 'Do it for me' completes for Claude Code, the completion card now
detects running CLI sessions (ps comm basename == claude/claude.exe, current
user only — never Claude Desktop): none running shows 'you're all set',
running sessions get an explicit 'Restart N running sessions' button that
SIGTERMs them and points at 'claude --continue'.
Also fixes the manual-setup copy cards in the grouped connect sheet copying
the display label ('Server URL: https://…') instead of just the URL/key
value, which broke pasting into Claude's connector form.
Verification:
- xcrun swift build -c debug --package-path Desktop: Build complete
- swift test --filter ClaudeCodeSessionsTests: 2 tests, 0 failures
- Detection filter validated against live ps output on this machine:
matches 5 running claude.exe CLI sessions, excludes Claude.app + helpers
- Not yet exercised in-app (sheet click-through pending a named-bundle run)
…he vault trust prompt Obsidian's connect sheet had only a vault picker and one caption; users hit Obsidian's first-open 'Do you trust the author of this vault?' dialog with no framing. Add the same numbered-steps guidance the Claude connector uses: choose vault, where memories land + Sync to refresh, and that the trust prompt is about the vault's own plugins (either choice works, Omi only adds a Markdown note). Verification: - xcrun swift build -c debug --package-path Desktop: Build complete - Presentation-only static copy; no behavior change, no test added
…nect screen Replaces Notion's copy-paste memory pack with a real connection: NotionMCPConnector does the full MCP OAuth against mcp.notion.com (dynamic client registration + PKCE + loopback redirect — no pre-registered client or Notion app review needed), stores tokens in the Keychain with refresh handling, and syncs the markdown memory pack to an 'Omi Memories' page (notion-create-pages on first sync, replace_content after; recreates if the user deleted the page). The connect sheet gets the same guided numbered steps as Obsidian, a connected/not-connected card, and Connect/Sync actions. The stored token also covers notion-search and notion-fetch for the upcoming Notion-to-Omi read direction. Verification: - Full protocol sequence proven live against mcp.notion.com before porting to Swift: DCR registration, browser consent, PKCE token exchange (8h access + refresh), tools/list (20 tools), notion-create-pages from markdown produced a real page in the test workspace, update-page schema captured for replace_content - xcrun swift build -c debug --package-path Desktop: Build complete - swift test --filter NotionMCPConnectorTests: 3 tests, 0 failures (SSE frame parsing, create-result parsing, refresh window) - Swift in-app click-through not yet exercised (needs named-bundle run)
Contributor
Author
storeAuth ignored DesktopKeychainStore.setString Bool, so locked Keychain could report success then disconnect next launch. Failure-Class: none
undivisible
approved these changes
Jul 21, 2026
undivisible
left a comment
Collaborator
There was a problem hiding this comment.
Approve
Notion finally gets a real connection instead of a clipboard cosplay act — PKCE + loopback + Keychain, create-once/replace/recreate. Claude Code restart only SIGTERMs basename claude/claude.exe (Desktop stays alive), and Copy now pastes the value instead of Server URL: … fanfic.
Pushed a one-liner on top: storeAuth no longer ignores DesktopKeychainStore.setString failing — locked Keychain can’t fake a successful connect. Land this before #10208 so onboarding inherits live Notion, not the pack path.
Git-on-my-level
added a commit
that referenced
this pull request
Jul 22, 2026
…n redesign (#10340) ## Summary Restores onboarding functionality that the Second Brain redesign (#10218) dropped, re-implemented on top of the new conversational design (no old UI brought back). Each fix is its own commit: - **Auto-detect user name** (#9919) — seed the name field from the known `givenName`, kick a backend name fetch, and adopt an async name arrival (Apple sends the name only on first auth), so onboarding greets by name instead of a generic placeholder. Also re-hydrates name/language/role drafts on resume. - **Clear onboarding state on sign-out** (#10108) — `sbOnboardingResumeStep` + `onboardingRole` were added by the redesign but left out of the shared clearing list, leaking the prior user's resume step + role to the next account on the same Mac. Added both, plus a regression test. - **Drag-to-grant Full Disk Access** (#9742) — the drag-to-grant helper was wired for Screen Recording but not FDA; now both use it. - **Connector brand marks + Claude Code restart** (#10210 / #10205) — connect rows show each connector's brand icon, and Claude Code shows a restart prompt once connected so running sessions reload the new MCP config. - **Remove post-onboarding walkthrough** — the coach-mark tour that ran after onboarding (spotlighting each nav pill) is deleted; a just-onboarded user lands straight on Home. - **Pin the drag-to-grant card under System Settings** — the permission drag card was pinned to the screen's bottom quarter; it now anchors directly beneath the live Settings window (flipping above it when there's no room below) so it follows the window and never covers the drop target. ## Verification Build/manual verification pending — depends on #10334 (restores the `Package.swift`/`Package.resolved` that a stray "fixture" commit gutted on `main`, which currently breaks the desktop Swift build). This PR carries no Package changes; once #10334 lands and this rebases, it builds on the repaired manifest. ## Product invariants affected - INV-INT-1 ## Failure class (fixes) Failure-Class: none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10340?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
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.
Connect-flow upgrades: Claude Code restart, guided Obsidian/Notion screens, live Notion MCP connection
What
Improvements to the "Connect your AI" / memory export flow:
Notion becomes a live connection over Notion's hosted MCP server (
mcp.notion.com), replacing the copy-paste memory pack.NotionMCPConnectorperforms the standard MCP OAuth (dynamic client registration + PKCE + loopback redirect — no pre-registered client, no Notion app review), stores tokens in the Keychain with refresh handling, and syncs the markdown pack to an "Omi Memories" page:notion-create-pageson first sync,replace_contentupdates after, recreation if the user deleted the page. The connect sheet shows guided numbered steps (same pattern as Obsidian below), a connection state card, and Connect/Sync actions. The granted token also coversnotion-search/notion-fetchfor a future Notion→Omi read direction.Claude Code completion card is now state-aware with a restart button. After "Do it for me" completes, the card previously always said "Restart Claude Code to load Omi Memory" — wrong when no session is running, and unactionable when one is. Now the card detects the current user's running Claude Code CLI sessions:
claude --continueto resume. The kill is only ever user-initiated.Detection matches the process basename
claude/claude.exefor the current uid only, which covers native and pnpm/bun CLI installs while never matching Claude Desktop or its helpers ("Claude", "Claude Helper", chrome-native-host).Obsidian connect gets guided numbered steps (same pattern as the Claude connector): choose vault, where memories land + Sync to refresh, and that Obsidian's first-open "Do you trust the author of this vault?" prompt is about the vault's own plugins — either choice works, Omi only adds a Markdown note.
Manual-setup copy cards copy the paste-able value, not the display label. In the grouped connect sheet, the Copy button under Claude (cloud)'s manual steps wrote
Server URL: https://…(andKey: …) to the clipboard — label included — which breaks pasting into Claude's connector form. Display text keeps the label; the clipboard now gets just the URL/key. Command/config snippets (Claude Code, Codex, Hermes, OpenClaw) still copy their full text, which is correct for them.Product invariants affected
Desktop/Sources/**/MemoryExport*): compliant — Claude Code session detection/stop is deterministic (psparse +kill), the Notion connection is a deterministic API/MCP client (no agent sent to do an API-reachable job, no element-anchoring heuristics), and the Notion setup flow ends with a functional probe (the sync itself creates/updates the page and stores its URL).desktop/macos/Desktop/Sources/MemoryExportService.swift): compliant — no tier changes; the Notion export reuses the existingfetchMemoriespath and default access policy, exactly as the Obsidian export does.Verification
xcrun swift build -c debug --package-path Desktop— build complete.xcrun swift test --package-path Desktop --filter ClaudeCodeSessionsTests— 2 tests, 0 failures (CLI-vs-Desktop process matching, completion-subtitle states).psoutput: matched 5 runningclaude.exeCLI sessions, excludedClaude.appand all its helpers.omi-v5): connect sheet shows the state-aware completion card and the value-only copy behaves as described.make preflight— green.Failure-Class: none