Commit d5e0ff6
feat: Octarine notes integration + auto-save for all integrations (#297)
* feat: Octarine notes integration + auto-save for all integrations
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>
* feat: add YAML frontmatter properties to Octarine notes
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>
* fix: use fresh=true for Octarine saves to prevent content duplication
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>
* fix: trim workspace and folder in saveToOctarine before building URI
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>
* fix: use isOctarineConfigured() for client-side Octarine guards
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>
* fix: prevent Bear duplicate notes and align default-save dropdown gates
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>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 3bbefa9 commit d5e0ff6
8 files changed
Lines changed: 488 additions & 65 deletions
File tree
- packages
- editor
- server
- ui
- components
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
366 | 373 | | |
367 | 374 | | |
368 | 375 | | |
369 | | - | |
| 376 | + | |
370 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
371 | 387 | | |
372 | 388 | | |
373 | 389 | | |
374 | 390 | | |
375 | | - | |
376 | | - | |
| 391 | + | |
| 392 | + | |
377 | 393 | | |
378 | | - | |
379 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
380 | 408 | | |
381 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
382 | 418 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
387 | 422 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
392 | 431 | | |
393 | | - | |
| 432 | + | |
394 | 433 | | |
395 | 434 | | |
396 | 435 | | |
397 | 436 | | |
398 | 437 | | |
399 | 438 | | |
400 | | - | |
401 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
402 | 449 | | |
403 | | - | |
| 450 | + | |
404 | 451 | | |
| 452 | + | |
| 453 | + | |
405 | 454 | | |
406 | 455 | | |
407 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
408 | 459 | | |
409 | 460 | | |
| 461 | + | |
410 | 462 | | |
411 | 463 | | |
412 | 464 | | |
| |||
471 | 523 | | |
472 | 524 | | |
473 | 525 | | |
| 526 | + | |
474 | 527 | | |
475 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
476 | 532 | | |
477 | 533 | | |
478 | | - | |
| 534 | + | |
479 | 535 | | |
480 | 536 | | |
481 | 537 | | |
| |||
505 | 561 | | |
506 | 562 | | |
507 | 563 | | |
508 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
509 | 567 | | |
510 | 568 | | |
511 | 569 | | |
512 | 570 | | |
513 | 571 | | |
514 | 572 | | |
515 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
516 | 582 | | |
517 | 583 | | |
518 | 584 | | |
| |||
717 | 783 | | |
718 | 784 | | |
719 | 785 | | |
720 | | - | |
| 786 | + | |
721 | 787 | | |
722 | | - | |
| 788 | + | |
723 | 789 | | |
724 | 790 | | |
725 | 791 | | |
| |||
742 | 808 | | |
743 | 809 | | |
744 | 810 | | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
745 | 819 | | |
| 820 | + | |
746 | 821 | | |
747 | 822 | | |
748 | 823 | | |
| |||
752 | 827 | | |
753 | 828 | | |
754 | 829 | | |
755 | | - | |
| 830 | + | |
756 | 831 | | |
757 | 832 | | |
758 | 833 | | |
| |||
780 | 855 | | |
781 | 856 | | |
782 | 857 | | |
| 858 | + | |
783 | 859 | | |
784 | 860 | | |
785 | 861 | | |
786 | 862 | | |
787 | 863 | | |
788 | 864 | | |
789 | 865 | | |
| 866 | + | |
| 867 | + | |
790 | 868 | | |
791 | 869 | | |
792 | 870 | | |
| |||
1025 | 1103 | | |
1026 | 1104 | | |
1027 | 1105 | | |
1028 | | - | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1029 | 1118 | | |
1030 | 1119 | | |
1031 | 1120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
277 | | - | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| 285 | + | |
283 | 286 | | |
284 | 287 | | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | | - | |
294 | 293 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
300 | 306 | | |
301 | 307 | | |
302 | 308 | | |
| |||
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
| 328 | + | |
322 | 329 | | |
323 | 330 | | |
324 | 331 | | |
| |||
346 | 353 | | |
347 | 354 | | |
348 | 355 | | |
349 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
350 | 359 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 360 | + | |
357 | 361 | | |
358 | | - | |
359 | | - | |
360 | 362 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
| |||
0 commit comments