You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(palette): show up to 8 recent panes in Command Palette (#4035) - #4471
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.
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.
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.
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: 4
Check name
Status
Explanation
Title check
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
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
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
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.
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.
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/mainac3f0bf; 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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RECENT_SHOWN = 8fromsrc/lib/machinePalette.tsand raiseRECENT_LIMITtoRECENT_SHOWN + 1(9) so excluding the currently selected pane still leaves up to 8 recent targets visible.src/components/CommandPalette.tsxto use the sharedRECENT_SHOWNconstant instead of3.last_pane), documented inDESIGN.md.src/lib/machinePalette.test.tscovering storing 9 targets (rememberTargetandloadRecentTargets) 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.