Skip to content

[codex] Add saved entry command palette commands - #9

Merged
mdroidian merged 1 commit into
mainfrom
codex/entry-command-palette
Jun 30, 2026
Merged

[codex] Add saved entry command palette commands#9
mdroidian merged 1 commit into
mainfrom
codex/entry-command-palette

Conversation

@mdroidian

@mdroidian mdroidian commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional saved-entry command palette setting with configurable prefix
  • register one command per saved page/block and open the matching entry directly
  • remove and re-add commands when bookmarks, enablement, or saved prefix changes
  • keep prefix edits local until Save Commands is submitted

Validation

  • npx prettier --check README.md src/quickSwitcher.tsx src/components/QuickSwitcherSettings.tsx src/index.ts src/utils/quickSwitcher.ts src/types/quickSwitcher.ts tests/quickSwitcher.test.ts
  • npm test
  • npm run build:roam
  • subagent review: no correctness findings; residual runtime coverage gaps noted for command sync transitions and React save-only behavior

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Free

Run ID: 4e09b35c-cc53-4add-a9e8-9d77f3e2ff82

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@mdroidian
mdroidian merged commit 7004feb into main Jun 30, 2026
2 checks passed
@mdroidian
mdroidian deleted the codex/entry-command-palette branch June 30, 2026 23:35

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

Comment on lines +672 to +678
<InputGroup
onChange={(
event: React.ChangeEvent<HTMLInputElement>,
): void => setCommandPalettePrefix(event.target.value)}
placeholder="Q S - "
value={commandPalettePrefix}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Command prefix input stays editable when the feature is toggled off, unlike the analogous query source input

The prefix text field remains active when the feature toggle is off (InputGroup at src/components/QuickSwitcherSettings.tsx:672), unlike the query source input which is disabled in the same scenario, so users can edit a field that has no effect.

Impact: Users may unknowingly configure a prefix while the feature is disabled, creating confusion about why their changes appear to do nothing.

Pattern inconsistency with the query source InputGroup

The query source section correctly disables its input when the toggle is off (disabled={!querySourceEnabled} at src/components/QuickSwitcherSettings.tsx:636). The new command palette section follows the exact same structural pattern (Switch toggle → FormGroup → InputGroup → Save/Reset buttons) but omits the disabled={!commandPaletteEnabled} prop on its InputGroup at line 672.

Suggested change
<InputGroup
onChange={(
event: React.ChangeEvent<HTMLInputElement>,
): void => setCommandPalettePrefix(event.target.value)}
placeholder="Q S - "
value={commandPalettePrefix}
/>
<InputGroup
disabled={!commandPaletteEnabled}
onChange={(
event: React.ChangeEvent<HTMLInputElement>,
): void => setCommandPalettePrefix(event.target.value)}
placeholder="Q S - "
value={commandPalettePrefix}
/>
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +551 to +560
export const normalizeCommandPaletteSettings = ({
settings,
}: {
settings: QuickSwitcherCommandPaletteSettings;
}): QuickSwitcherCommandPaletteSettings => ({
enabled: Boolean(settings.enabled),
prefix: settings.prefix.trim()
? settings.prefix
: DEFAULT_COMMAND_PALETTE_PREFIX,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Prefix normalization intentionally preserves internal whitespace

normalizeCommandPaletteSettings at src/utils/quickSwitcher.ts:551-560 checks settings.prefix.trim() to detect all-whitespace input, but returns the original untrimmed settings.prefix when it has non-whitespace content. This means a prefix like " QS " would be preserved with its leading/trailing spaces, producing command labels with leading whitespace (e.g. " QS My Page"). This appears intentional since the default prefix "Q S - " includes a meaningful trailing space. However, leading whitespace in a prefix would look odd in the command palette — the saveCommandPaletteSettings in the settings component does not trim or warn about leading spaces.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@charliecreates charliecreates Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the latest changes, and I don’t have actionable feedback to address.

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.

1 participant