Skip to content

feat: Obsidian saving enhancements — separator, auto-save, sanitization#240

Merged
backnotprop merged 3 commits intomainfrom
fix-improve-saving
Mar 7, 2026
Merged

feat: Obsidian saving enhancements — separator, auto-save, sanitization#240
backnotprop merged 3 commits intomainfrom
fix-improve-saving

Conversation

@backnotprop
Copy link
Owner

Summary

  • Filename separator setting (FR: Add toggle to save plan filename without spaces (obsidian vault) #235): New dropdown in Obsidian settings to replace spaces with dashes or underscores in generated filenames. Fixes issues with CLI tools (including Claude Code) fumbling space-escaped paths inside Obsidian vaults.
  • Auto-save on plan arrival (bug: Save plan doesn't work after approval via agent (claude code) #228): Opt-in toggle that saves plans to Obsidian the moment they load in the browser, before approve/deny. Fixes the workflow where approving from the CLI kills the hook server before the user can Cmd+S.
  • Hardened title sanitization: Strips parentheses, brackets, curly braces, hash, tilde, and backtick from plan titles when generating filenames.

Test plan

  • Enable Obsidian integration, set separator to "Dashes", verify filename preview updates and saved files have no spaces
  • Enable "Auto-save on Plan Arrival", open a plan, verify toast appears and file exists in vault
  • Approve a plan from the Claude Code CLI — verify the auto-saved file persists (server death doesn't matter)
  • Test plan with title # My Plan (v2) [draft] — verify clean filename
  • Cmd+S manual save still works independently

Closes #235, closes #228.

🤖 Generated with Claude Code

backnotprop and others added 2 commits March 7, 2026 08:25
Strip parentheses, brackets, curly braces, hash, tilde, and backtick
from plan titles when generating Obsidian filenames. Re-trim after
stripping to handle edge cases where stripped chars leave leading/trailing
whitespace. Closes part of #235.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Filename separator: adds a dropdown in Obsidian settings to replace
spaces with dashes or underscores in generated filenames. Fixes issues
with CLI tools fumbling space-escaped paths inside Obsidian vaults.
The setting flows through the save request to generateFilename() as a
post-processing step. Live preview reflects the choice.

Auto-save on arrival: adds an opt-in toggle that automatically saves
plans to Obsidian the moment they load in the browser, before the user
approves or denies. This fixes the workflow where approving from the
Claude Code CLI kills the hook server before the user can Cmd+S.
Guarded by a ref to fire only once per session.

Closes #235, closes #228.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop
Copy link
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

The ExportModal's save-to-Obsidian callsite was missing the
filenameSeparator config, causing the separator preference to be
silently ignored when saving via the Export Modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop backnotprop merged commit 7596854 into main Mar 7, 2026
3 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.

FR: Add toggle to save plan filename without spaces (obsidian vault) bug: Save plan doesn't work after approval via agent (claude code)

1 participant