Repository navigation
fix(cmd-j): short-screen fit and overflow copy for larger palette - #13123
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThe palette now gates expensive indexing while inactive, reuses sorted worktree results, and memoizes quick-action availability. Interleaved query results preserve section headers, including continuation sections. Dialog and command-list sizing now uses available viewport space. A shared alias matcher is used by simulator and workspace-tab searches. Workspace-tab search builds one indexed lookup for agent metadata. Tests cover alias matching and interleaved section rendering. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
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 |
Cap dialog/list height against the viewport so the input, filter chips, and footer stay visible after the larger Cmd+J shell, and align the English catalog overflow hint with the multi-primary “scroll or keep typing” wording.
When both open tabs and worktrees overflow their first-screen slice, the layout interleaves remainder rows. The trailing-section header renders before the leading remainder, so unlabeled rows read as the wrong section. Re-emit headers before each remainder with a distinct suffix for React keys. Refactor type-alias matching into a reusable utility that prefers earliest match position over declaration order.
P1-a: Move quickActionContext filtering into a useMemo with stable primitive deps (activeView, activeWorktreeId, sshConnectionStates, etc.) instead of calling buildQuickActionContext() inline every render — the fresh object identity defeated the middleItems memo on every keystroke. P1-b: Guard browserSortedWorktrees, browserPageEntries, simulatorTabEntries, and workspaceTabEntries on paletteStatusInputsActive so the always-mounted palette stops rebuilding full open-tab indexes after every store write while closed. P2-a: Derive sortedWorktrees from browserSortedWorktrees by filtering out archived worktrees — both called sortWorktreesSmart with identical deps, so one sort + filter replaces two. P2-b: Pre-index agent metadata by tabId once per build via buildAgentMetadataTabIndex, replacing the O(tabs × map entries) scan in collectAgentMetadataForTerminal with O(1) lookups per tab. P2-e: Assert in the interleaved test that rendered selectable row order matches orderMultiPrimaryPaletteItems, keeping listEntries and the layout function as a single source of truth. Co-authored-by: Orca <[email protected]>
7fdb265 to
0f14720
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…ablyai#13123) * fix(cmd-j): fit large palette on short screens and sync overflow copy Cap dialog/list height against the viewport so the input, filter chips, and footer stay visible after the larger Cmd+J shell, and align the English catalog overflow hint with the multi-primary “scroll or keep typing” wording. * fix(cmd-j): re-emit section headers for interleaved palette remainder ro When both open tabs and worktrees overflow their first-screen slice, the layout interleaves remainder rows. The trailing-section header renders before the leading remainder, so unlabeled rows read as the wrong section. Re-emit headers before each remainder with a distinct suffix for React keys. Refactor type-alias matching into a reusable utility that prefers earliest match position over declaration order. * fix(cmd-j): stabilize palette memos and gate heavy builders when closed P1-a: Move quickActionContext filtering into a useMemo with stable primitive deps (activeView, activeWorktreeId, sshConnectionStates, etc.) instead of calling buildQuickActionContext() inline every render — the fresh object identity defeated the middleItems memo on every keystroke. P1-b: Guard browserSortedWorktrees, browserPageEntries, simulatorTabEntries, and workspaceTabEntries on paletteStatusInputsActive so the always-mounted palette stops rebuilding full open-tab indexes after every store write while closed. P2-a: Derive sortedWorktrees from browserSortedWorktrees by filtering out archived worktrees — both called sortWorktreesSmart with identical deps, so one sort + filter replaces two. P2-b: Pre-index agent metadata by tabId once per build via buildAgentMetadataTabIndex, replacing the O(tabs × map entries) scan in collectAgentMetadataForTerminal with O(1) lookups per tab. P2-e: Assert in the interleaved test that rendered selectable row order matches orderMultiPrimaryPaletteItems, keeping listEntries and the layout function as a single source of truth. Co-authored-by: Orca <[email protected]> --------- Co-authored-by: Orca <[email protected]>
Summary
Follow-up polish for the larger Cmd+J palette (#13120). Addresses the remaining non-blocking issues from post-merge review:
72vh/ 600px) plus top offset could push input/filter/footer off short windows. Cap the dialog withmax-hand size the list asmin(600px, calc(100vh - 14rem)), with a slightly safer top offset.en.jsonstill said “keep typing or add a filter” while the runtime fallback said “scroll or keep typing”. Catalog now matches multi-primary overflow behavior.Intentionally not in this PR (by design / pre-existing noise, not regressions):
tabScreenshots
Testing
pnpm lintpnpm typecheckpnpm testpnpm builden.json+ fallbackAI Review Report
Residual review of #13120 found no release blockers. These two polish items were the only actionable leftovers:
72vh+ top 10% clipping chrome on short screensen.jsonoverflow string out of dateCross-platform: renderer CSS only (
vh/rem); no shortcuts, paths, shell, or Electron main changes.Security Audit
Notes
main).