Skip to content

feat(palette): show up to 8 recent panes in Command Palette (#4035) - #4471

Merged
devswha merged 2 commits into
mainfrom
feat/palette-recent-limit
Nov 24, 2026
Merged

devswha merged 2 commits into
mainfrom
feat/palette-recent-limit

Conversation

@devswha

@devswha devswha commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Export RECENT_SHOWN = 8 from src/lib/machinePalette.ts and raise RECENT_LIMIT to RECENT_SHOWN + 1 (9) so excluding the currently selected pane still leaves up to 8 recent targets visible.
  • Update src/components/CommandPalette.tsx to use the shared RECENT_SHOWN constant instead of 3.
  • Design reference: follows VS Code's recently opened list (and extends herdr's last_pane), documented in DESIGN.md.
  • Added unit tests in src/lib/machinePalette.test.ts covering storing 9 targets (rememberTarget and loadRecentTargets) and showing 8 targets when the newest one is currently selected.

Closes #4035.

Verification

  • bun test src/lib/machinePalette.test.ts src/conventions.test.ts scripts/changelog-fold.test.ts: 37 pass, 0 fail.
  • bun run typecheck: passed.
  • bun scripts/palette-machines-demo-regression.ts: passed.
  • git merge-tree --write-tree origin/release/relay-0510 HEAD: conflict-free with #4435.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental 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

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

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • The command palette’s Recent section now displays up to eight recently visited panes, even when the currently open pane is excluded.

The command palette now shows up to eight recent panes. It retains nine targets so it can exclude the selected pane and still show eight.

Changes: Recent Pane Limit

Layer / File(s) Summary
Recent target capacity
src/lib/machinePalette.ts, src/components/CommandPalette.tsx, src/lib/machinePalette.test.ts, DESIGN.md, changelog.d/palette-recent-limit.md
The palette defines a display count of eight and retains nine recent targets. Tests cover loading, selected-pane exclusion, and displaying the next eight panes. The design document and changelog describe the updated counts.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature · Severity of issue fixed: Medium

Merge Risk: Minimal · previous review 8ddef

The command palette's Recent section now shows up to eight panes instead of three, matching the linked request. No concrete risks were found, and the change is straightforward to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: showing up to 8 recent panes in the Command Palette. It matches the changeset, which exports RECENT_SHOWN = 8 and replaces the hard-coded 3 in CommandPalette.tsx. The …
Description check Passed The description covers the change, the design reference, tests, and verification commands with results, and closes issue #4035. It does not follow the template headings exactly: it has Summary and Ver…
Linked Issues check Passed Issue #4035 asks for the Recent section to show up to 8 panes and to remember one more than shown. The head exports RECENT_SHOWN = 8 and sets RECENT_LIMIT = RECENT_SHOWN + 1 (9) in `src/lib/machin…
Out of Scope Changes check Passed The reviewed diff for CommandPalette.tsx removes the local RECENT_SHOWN = 3 and imports the shared constant. The diff for machinePalette.ts exports RECENT_SHOWN and derives RECENT_LIMIT from…
Full details: Title check

Explanation

The title names the main change: showing up to 8 recent panes in the Command Palette. It matches the changeset, which exports RECENT_SHOWN = 8 and replaces the hard-coded 3 in CommandPalette.tsx. The title is short, single-sentence, and specific.

Full details: Description check

Explanation

The description covers the change, the design reference, tests, and verification commands with results, and closes issue #4035. It does not follow the template headings exactly: it has Summary and Verification sections rather than Change and Validation. It also does not state which checks were skipped, and it does not mention a changelog entry, though changelog.d/palette-recent-limit.md is in the changeset. The Change content is present but is not under a Change heading.

Resolution

Optional: rename headings to Change and Validation to match the template. List any checks skipped (for example, bun run check full). Confirm the changelog entry in changelog.d/ is intentional and mention it in the description.

Full details: Linked Issues check

Explanation

Issue #4035 asks for the Recent section to show up to 8 panes and to remember one more than shown. The head exports RECENT_SHOWN = 8 and sets RECENT_LIMIT = RECENT_SHOWN + 1 (9) in src/lib/machinePalette.ts. src/components/CommandPalette.tsx now imports RECENT_SHOWN instead of the hard-coded 3. The change needs no new setting, which matches the issue. The PR summary reports unit tests for storing 9 targets and for showing 8 when the newest target is selected. Those tests were not re-run in this review. The code change alone meets the stated coding requirements.

Full details: Out of Scope Changes check

Explanation

The reviewed diff for CommandPalette.tsx removes the local RECENT_SHOWN = 3 and imports the shared constant. The diff for machinePalette.ts exports RECENT_SHOWN and derives RECENT_LIMIT from it. Both changes directly implement #4035. The test file and the changelog entry support this change. The DESIGN.md update documents the new limit. No unrelated functional change was found in the inspected hunks.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a6cec30 and 8ddefb2.

Files selected for processing: 5

  • DESIGN.md
  • changelog.d/palette-recent-limit.md
  • src/components/CommandPalette.tsx
  • src/lib/machinePalette.test.ts
  • src/lib/machinePalette.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@devswha

devswha commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

Before/after captures of the Command Palette's Recent section (demo app, isolated, no live session). History seeded with 10 recent panes on two PCs; the selected pane is "Idempotent payments".

Before is origin/main ac3f0bf; after is this branch at 4be61f4.

before (main): 3 rows after (this PR): 8 rows
desktop 1440x900
phone 390x844

Phone, after, scrolled: the list scrolls past the last Recent row to the workspace headings.

Also pushed 4be61f4: a test case with nine eligible targets and none selected (only the eight newest are shown; verified to fail with the limit raised by one), and the changelog/DESIGN.md wording now says "up to eight, not counting the selected pane".

Validation: bun run check fast green at 4be61f4 (typecheck, build, unit 22362 pass / 0 fail); review by GPT-6.2 Sol: MERGE WITH NITS, both nits addressed here.

@devswha
devswha merged commit 549cba6 into main Nov 24, 2026
25 of 27 checks passed
@devswha

devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 4be61f432. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

reviews: Codex adversarial review (gpt-6.2-sol-fast, xhigh, VERDICT: APPROVE); CodeRabbit skipped head; on owner/Dori word

@devswha
devswha deleted the feat/palette-recent-limit branch November 24, 2026 02:47
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.

Command palette: let the Recent section show more than 3 panes

1 participant