Skip to content

fix(date): make the pick-a-day command opt-in from a Command palette group - #1723

Merged
chhoumann merged 2 commits into
masterfrom
cursor/another-day-command-opt-in-a4fe
Sep 1, 2026
Merged

fix(date): make the pick-a-day command opt-in from a Command palette group#1723
chhoumann merged 2 commits into
masterfrom
cursor/another-day-command-opt-in-a4fe

Conversation

@chhoumann

@chhoumann chhoumann commented Sep 1, 2026

Copy link
Copy Markdown
Owner

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:

  • Add to command palette — the same command flag the choice list's lightning bolt toggles, now also editable in the settings modal.
  • Also add "Name (pick a day)" — shown only when the above is on and Which day isn't Ask each time. Registers one extra command that asks which day first. The label renders the live command name so you see exactly what lands in the palette.

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?: boolean on IChoice (undefined/false = off)
  • New src/types/choiceCommands.ts (choiceCommandId, pickDayCommandId:pick-day, pickDayCommandName, shouldRegisterPickDayCommand, canOfferPickDayCommand, setting strings)
  • New CommandPaletteSetting.svelte used by Template and Capture forms; equivalent addCommandPaletteSettings() in MacroBuilder
  • DateOriginSetting.svelte back to master (date only)
  • Docs: Command palette sections on Template, Capture, Macro; Which day text updated

Testing / validation

  • pnpm run test — 5184 passed, 37 skipped (new choiceCommands.test.ts, CommandPaletteSetting.test.ts, MacroBuilder visibility cases)
  • pnpm run build-with-lint, pnpm run check — clean
  • Manual, Obsidian 1.13.7 (Linux) with the built plugin:
    • Baseline: command-enabled Daily note registers only quickadd:choice:<id>
    • Toggle on in the builder → quickadd:choice:<id>:pick-day "QuickAdd: Daily note (pick a day)" appears; pickDayCommand: true persisted
    • Running it, typing yesterdayDaily/2026-08-31.md with heading "Monday, August 31, 2026" and {{DATE+-1}}/{{DATE+1}} following the picked day
    • Which day = Ask each time hides the pick-a-day toggle
    • dev:errors: none

Command palette group in the Template choice builder, pick-a-day toggle on
Command palette showing QuickAdd: Daily note (pick a day)

Checklist

  • PR title follows Conventional Commits
  • Linked any related issue(s).
  • Noted release/migration impact, if any.

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-day id from #1710 is replaced by :pick-day; nothing on disk references it.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features
    • Added an Add to command palette setting for capture, template, and macro choices.
    • Added an optional “Name (pick a day)” command that prompts for a date before running.
    • Updated command registration so date-picking commands are available only when supported and enabled.
  • Documentation
    • Updated guidance for choosing dates, including Shift-click behavior in the QuickAdd menu.
    • Documented command palette and hotkey usage for choices.
  • Bug Fixes
    • Clarified command naming from “another day” to “pick a day.”

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>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

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

View logs

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 4cf97a97-a352-4994-af3d-b45fcf63c36d

📥 Commits

Reviewing files that changed from the base of the PR and between 9f58254 and a442a41.

📒 Files selected for processing (17)
  • docs/src/content/docs/docs/Choices/CaptureChoice.md
  • docs/src/content/docs/docs/Choices/MacroChoice.md
  • docs/src/content/docs/docs/Choices/TemplateChoice.md
  • src/IChoiceExecutor.ts
  • src/gui/ChoiceBuilder/CaptureChoiceForm.svelte
  • src/gui/ChoiceBuilder/TemplateChoiceForm.svelte
  • src/gui/ChoiceBuilder/components/CommandPaletteSetting.svelte
  • src/gui/ChoiceBuilder/components/CommandPaletteSetting.test.ts
  • src/gui/MacroGUIs/MacroBuilder.test.ts
  • src/gui/MacroGUIs/MacroBuilder.ts
  • src/main.ts
  • src/types/choiceCommands.test.ts
  • src/types/choiceCommands.ts
  • src/types/choices/Choice.ts
  • src/types/choices/IChoice.ts
  • src/types/dateOriginPresets.test.ts
  • src/types/dateOriginPresets.ts

📝 Walkthrough

Walkthrough

The 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.

Changes

Pick-a-day command flow

Layer / File(s) Summary
Command contracts and eligibility
src/types/choiceCommands.ts, src/types/choices/*, src/types/dateOriginPresets.*
Adds command names, IDs, eligibility helpers, setting text, and the optional pickDayCommand property. Removes the former “another day” helpers and updates date-origin tests and text.
Choice builder settings
src/gui/ChoiceBuilder/..., src/gui/MacroGUIs/MacroBuilder.*
Adds command-palette toggles to capture, template, and macro builders. The pick-a-day toggle appears only when the main command is enabled and the date origin is eligible.
Command registration lifecycle
src/main.ts, src/IChoiceExecutor.ts
Registers and removes the pick-a-day command through the new helpers and updates the related JSDoc.
Choice documentation
docs/src/content/docs/docs/Choices/*
Documents Shift-based day selection and the command-palette options for Capture, Macro, and Template choices.

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
Loading

Poem

A rabbit toggles commands with care
Pick-a-day hops into the air
Today stays near
Other days appear
Shift opens paths everywhere

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/another-day-command-opt-in-a4fe

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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>
@cursor cursor Bot changed the title fix(date): make (another day) command opt-in fix(date): make the pick-a-day command opt-in from a Command palette group Sep 1, 2026
@chhoumann
chhoumann marked this pull request as ready for review September 1, 2026 20:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T20:54:13.004580Z a442a41 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chhoumann
chhoumann merged commit f622a2f into master Sep 1, 2026
13 of 14 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.

2 participants