Skip to content

feat: Octarine notes integration + auto-save for all integrations#297

Merged
backnotprop merged 6 commits intomainfrom
feat/octarine-integration
Mar 16, 2026
Merged

feat: Octarine notes integration + auto-save for all integrations#297
backnotprop merged 6 commits intomainfrom
feat/octarine-integration

Conversation

@backnotprop
Copy link
Copy Markdown
Owner

Summary

  • Add Octarine as a third notes app integration alongside Obsidian and Bear, using the octarine:// URI scheme for deep-link note creation
  • Add auto-save on plan arrival toggle to Bear and Octarine (Obsidian already had this), consolidated into a single effect and single API call
  • Parallelize all integration saves with Promise.allSettled (was sequential await chains)

Changes

File What
packages/ui/utils/octarine.ts New — cookie-backed settings (enabled, workspace, folder, autoSave)
packages/server/integrations.ts OctarineConfig + saveToOctarine() via octarine://create URI
packages/server/index.ts Octarine in /api/approve + /api/save-notes, parallel execution
packages/editor/App.tsx Approve flow, quick save, Cmd+S, export dropdown, unified auto-save effect
packages/ui/components/ExportModal.tsx Octarine card in Notes tab, Save All logic
packages/ui/components/Settings.tsx Octarine settings tab + Bear auto-save toggle
packages/ui/utils/bear.ts Added autoSave field to BearSettings
packages/ui/utils/defaultNotesApp.ts Added 'octarine' to union type

Test plan

  • Settings > Saving > Octarine — enable, set workspace name, set folder
  • Settings > Saving > Octarine — auto-save toggle persists across sessions
  • Settings > Saving > Bear — auto-save toggle appears and persists
  • Approve a plan with Octarine enabled — note created in Octarine
  • Export > Notes tab — Octarine card with Save button
  • Export dropdown — "Save to Octarine" visible when enabled
  • Cmd+S with default app set to Octarine — saves directly
  • Auto-save on plan arrival fires for enabled integrations
  • Multiple integrations auto-save in parallel (single API call)

🤖 Generated with Claude Code

backnotprop and others added 4 commits March 15, 2026 09:39
Add Octarine as a third notes app integration alongside Obsidian and Bear.
Uses the octarine:// URI scheme to create notes via deep links, following
the same x-callback-url pattern as Bear.

- New file: packages/ui/utils/octarine.ts (cookie-backed settings)
- Server: saveToOctarine() in integrations.ts, wired into /api/approve
  and /api/save-notes endpoints
- UI: Octarine tab in Settings, card in Export > Notes, dropdown button,
  Cmd+S shortcut support
- Parallelize all integration saves with Promise.allSettled (was sequential)
- Add auto-save on plan arrival toggle to Bear and Octarine (Obsidian
  already had this), consolidate into a single effect + single API call

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prepend Octarine-compatible YAML frontmatter with tags, Status, Author,
and Last Edited properties. Uses the same extractTags() as Obsidian for
auto-generated tags (project name, title words, code fence languages).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Octarine's create action appends by default. If auto-save fires on plan
arrival and the user then approves within the same minute, the same path
gets hit twice — doubling the content. Using fresh=true replaces instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The UI checks workspace.trim().length > 0 but the server used raw values.
Accidental whitespace in settings would cause Octarine saves to fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@backnotprop backnotprop force-pushed the feat/octarine-integration branch from 36666ae to b927b95 Compare March 15, 2026 18:27
backnotprop and others added 2 commits March 15, 2026 11:40
Auto-save and approve checks used raw workspace truthiness, so
whitespace-only workspace would trigger a save attempt that the server
rejects. Now uses isOctarineConfigured() which trims before checking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bear creates a new note on every save, so skip it on approve when
arrival auto-save already succeeded. Gate the default-save dropdown
by actual configuration (vault path for Obsidian, workspace for
Octarine) instead of just the enabled toggle, matching the shortcut
behavior. Self-heal stale defaults back to "ask".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@backnotprop backnotprop merged commit d5e0ff6 into main Mar 16, 2026
5 checks passed
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