feat(code): cmd palette on quill autocomplete + bump quill#2100
feat(code): cmd palette on quill autocomplete + bump quill#2100adamleithp merged 3 commits intomainfrom
Conversation
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/command/components/CommandMenu.tsx:243-253
**Keyboard Enter does not run commands**
`onValueChange` early-returns for every reason except `"input-change"`, so when the user navigates to an item with ↑/↓ and presses Enter, base-ui fires `onValueChange` with `reason: "item-select"` — but the handler ignores it. Command execution only works via mouse click (the `onClick` on each `AutocompleteItem`). The test plan line "Enter runs the highlighted command" will fail.
Reviews (1): Last reviewed commit: "fix: close cmd on esc with inline, close..." | Re-trigger Greptile |
| onValueChange={(val, eventDetails) => { | ||
| if (eventDetails.reason !== "input-change") return; | ||
| if (typeof val === "string") { | ||
| setQuery(val); | ||
| } | ||
| }} | ||
| filter={(cmd, q) => { | ||
| if (!q) return true; | ||
| const haystack = `${cmd.label} ${cmd.keywords ?? ""}`.toLowerCase(); | ||
| return haystack.includes(q.toLowerCase()); | ||
| }} |
There was a problem hiding this comment.
Keyboard Enter does not run commands
onValueChange early-returns for every reason except "input-change", so when the user navigates to an item with ↑/↓ and presses Enter, base-ui fires onValueChange with reason: "item-select" — but the handler ignores it. Command execution only works via mouse click (the onClick on each AutocompleteItem). The test plan line "Enter runs the highlighted command" will fail.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/command/components/CommandMenu.tsx
Line: 243-253
Comment:
**Keyboard Enter does not run commands**
`onValueChange` early-returns for every reason except `"input-change"`, so when the user navigates to an item with ↑/↓ and presses Enter, base-ui fires `onValueChange` with `reason: "item-select"` — but the handler ignores it. Command execution only works via mouse click (the `onClick` on each `AutocompleteItem`). The test plan line "Enter runs the highlighted command" will fail.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Not legit anymore — fixed in 1ccae8e by adding defaultOpen on Autocomplete (line 240). Selection routes through onClick on AutocompleteItem (line 277); base-ui's combobox fires the highlighted item's click on Enter when the popup is open, and defaultOpen keeps it open inside the Dialog. onValueChange is intentionally text-input-only — item-select is handled by the click path, not the value path.
Test: Cmd+K → type to filter → ↑/↓ → Enter runs the highlighted command. Esc closes in one press.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Reviews (2): Last reviewed commit: "fix: enter on cmd items by setting defau..." | Re-trigger Greptile |
adboio
left a comment
There was a problem hiding this comment.
one greptile comment that looks maybe legit, but otherwise lgtm!
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Reviews (3): Last reviewed commit: "chore: biome format globals.css" | Re-trigger Greptile |
…#2112) ## TL;DR Adds comprehensive analytics tracking for task creation events, capturing workspace mode (local/worktree/cloud), worktree file usage (.worktreelink/.worktreeinclude), and environment configuration details to enable insights into user preferences across different workspace modes. ## Problem We need to audit task creation events across different workspace modes (local, worktree, cloud) to understand which modes users prefer and identify feature usage patterns. The existing task creation tracking was incomplete and lacked the necessary data to build these insights. Closes #2100 ## Changes ### Backend (Workspace Service) - Added `getWorktreeFileUsage()` method to detect whether `.worktreelink` or `.worktreeinclude` files exist and contain non-empty, non-comment entries - Added `hasExcludeFileEntries()` helper to safely read and parse worktree exclude files - Added new Zod schemas `getWorktreeFileUsageInput` and `getWorktreeFileUsageOutput` for type safety ### API (tRPC Router) - Exposed `getWorktreeFileUsage` as a public tRPC procedure to allow frontend queries for worktree file usage data ### Frontend (Task Creation Tracking) - Added `trackTaskCreated()` function to comprehensively track task creation with: - Workspace mode (local/worktree/cloud) - Auto-run status - Repository provider (GitHub or none) - Branch information - Environment/sandbox environment configuration - Cloud run source and PR authorship mode - Worktree file usage (`.worktreelink` and `.worktreeinclude`) - Adapter type - Integrated tracking into task creation flow in `useTaskCreation` hook - Removed incomplete task creation tracking from `useTasks` hook to consolidate in one place ## How did you test this? - Verified the new tRPC endpoint is properly typed with input/output schemas - Confirmed worktree file parsing correctly identifies non-empty, non-comment lines - Validated task creation tracking captures all required analytics properties - Error handling ensures failed analytics calls don't block task creation ## Publish to changelog? yes --- *Created with [PostHog Code](https://posthog.com/code?ref=pr)*
Summary
CommandKeyHints) fromcmdk+ RadixKbdto quill'sAutocomplete*+Kbd/KbdGroup, matching the StorybookCommandPalettepattern. Settings dialog now closes when "Home" / "New task" is run.@posthog/quill0.1.0-alpha.7 → 0.3.0-beta.1, installtailwindcss-scroll-maskso quill'sscroll-mask-*utilities compile, fix the@sourceglob pointing at the npm dist.variantfromChipinGithubRefChipandMentionChipView— quill 0.3 removed the prop.theme(system option hidden when it would be a no-op vsprefers-color-scheme), eliminating drift from the old cycling toggle.inlineprop onAutocompletelets base-ui's dismiss handler bubble to the parent Dialog).Test plan
pnpm --filter code typecheckis clean.