Conversation
Clicking Add in the Obsidian command, Editor commands or Choices row before picking anything showed error notices (two for Editor commands, plus an uncaught error). It now does nothing, as the User scripts row already did. Fixes #2122
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe command-sequence editor now ignores empty or whitespace-only input for Obsidian commands, editor commands, and choices. A regression test checks that clicking Add with no selection produces no command, notice, or error log. ChangesEmpty command selection handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to Empty Add clicks leave the macro unchanged without errors, while selected items still follow the existing add path. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit taps Add, then waits, Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
In the Macro builder, clicking Add in the Obsidian command, Editor commands or Choices row before choosing anything now does nothing. Before, it showed error notices: two for Editor commands ("invalid editor command type" and "A QuickAdd action failed: invalid editor command type") plus an uncaught console error,
Could not find Obsidian command with name ""for Obsidian command, andNo choice named "".for Choices. The User scripts row already behaved this way.Found in a fresh-vault pass of "Set up your first macro": step 3 says "Add an Editor commands entry and choose Move cursor to file end", so clicking Add first is a natural move on someone's first macro.
Repro (master 6082143 and 2.29.0, Obsidian 1.13.7): Settings > QuickAdd > New choice > Macro, click Add in the Editor commands row. With this branch, real Obsidian shows no notice and
dev:errorsstays empty for all three rows; choosing "Copy" and clicking Add still adds the step, and a typed name that matches nothing still reports it.The test stub's
DropdownComponentgainsgetValue(), which Obsidian's has; the new test needs it.Checks:
pnpm run build-with-lint,pnpm run test(6604 passed),.agents/run-e2eon a clean vault (397 passed, 24 Templater-only skipped). No release or migration impact.Fixes #2122
Note
Ignore empty Add input in macro builder's
CommandSequenceEditorAdds early returns so the Obsidian-command, editor-command, and Choice Add controls do nothing when their input is empty, whitespace-only, or unselected. Previously these Add clicks could modify the command sequence. Adds a regression test in CommandSequenceEditor.audit-macro.test.ts asserting no callback, notice, or error fires on empty Add clicks, and exposes
DropdownComponent.getValuein the test stub.Macroscope summarized 9c658c6.
Summary by CodeRabbit