fix(date): make the pick-a-day command opt-in from a Command palette group - #1723
Conversation
Command-enabled choices no longer register a second palette entry by default. Add an Also add (another day) toggle under Which day; Shift in the QuickAdd menu still opens the picker without the extra command. Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
Deploying quickadd with
|
| Latest commit: |
a442a41
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://013635e1.quickadd.pages.dev |
| Branch Preview URL: | https://cursor-another-day-command-o.quickadd.pages.dev |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughThe change replaces automatic “another day” commands with an opt-in “pick a day” command. It adds shared command helpers, choice properties, builder settings, runtime registration rules, tests, and updated Capture, Macro, and Template documentation. ChangesPick-a-day command flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ChoiceBuilder
participant Choice
participant QuickAdd
participant ObsidianCommandPalette
ChoiceBuilder->>Choice: enable command and pickDayCommand
QuickAdd->>Choice: register choice settings
Choice->>ObsidianCommandPalette: register main and pick-a-day commands
ObsidianCommandPalette->>QuickAdd: invoke selected command
QuickAdd->>Choice: run for today or prompt for a day
Poem
✨ 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. Comment |
Replace the "Also add (another day)" toggle under Which day with a Command palette group in the Template, Capture, and Macro builders: "Add to command palette" (the same flag as the choice list) and, when it is on and Which day is not Ask each time, "Also add "Name (pick a day)"". The second command is named after the choice and asks which day first. Field renamed to pickDayCommand and command id suffix to :pick-day (both unreleased). Command helpers move to src/types/choiceCommands.ts. Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
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. |
Summary
#1710 registered a second
Name (another day)palette command for every command-enabled choice. That's too noisy as a default, and "(another day)" describes a situation rather than an action.This makes the second command opt-in and gives it a proper home. Each builder (Template, Capture, Macro) gets a Command palette group near the icon setting:
commandflag the choice list's lightning bolt toggles, now also editable in the settings modal.Which day goes back to being only about the day (its description now mentions Shift). Shift in the QuickAdd menu still works with nothing enabled.
Changes
pickDayCommand?: booleanonIChoice(undefined/false = off)src/types/choiceCommands.ts(choiceCommandId,pickDayCommandId→:pick-day,pickDayCommandName,shouldRegisterPickDayCommand,canOfferPickDayCommand, setting strings)CommandPaletteSetting.svelteused by Template and Capture forms; equivalentaddCommandPaletteSettings()inMacroBuilderDateOriginSetting.svelteback to master (date only)Testing / validation
pnpm run test— 5184 passed, 37 skipped (newchoiceCommands.test.ts,CommandPaletteSetting.test.ts, MacroBuilder visibility cases)pnpm run build-with-lint,pnpm run check— cleanDaily noteregisters onlyquickadd:choice:<id>quickadd:choice:<id>:pick-day"QuickAdd: Daily note (pick a day)" appears;pickDayCommand: truepersistedyesterday→Daily/2026-08-31.mdwith heading "Monday, August 31, 2026" and{{DATE+-1}}/{{DATE+1}}following the picked daydev:errors: noneCommand palette group in the Template choice builder, pick-a-day toggle on
Command palette showing QuickAdd: Daily note (pick a day)
Checklist
Release / migration
Additive, unreleased (#1710 hasn't shipped; latest release is 2.23.0). Existing choices keep today and gain no extra command. The
:another-dayid from #1710 is replaced by:pick-day; nothing on disk references it.To show artifacts inline, enable in settings.
Summary by CodeRabbit