Skip to content

feat: add Cmd+K command palette for quick file search#41

Open
andrewhopper wants to merge 4 commits intomasterfrom
claude/issue-14-20260303-1119
Open

feat: add Cmd+K command palette for quick file search#41
andrewhopper wants to merge 4 commits intomasterfrom
claude/issue-14-20260303-1119

Conversation

@andrewhopper
Copy link
Owner

Adds a command palette (⌘K / Ctrl+K) for fast file navigation in QuickView.

Closes #14

Generated with Claude Code

Implements a command palette (Cmd+K / Ctrl+K) for fast file navigation:
- Press ⌘K (Mac) or Ctrl+K (Windows/Linux) to open the search overlay
- Type to filter files by name or path in real-time
- Navigate results with ↑/↓ arrow keys
- Press Enter to open the selected file
- Press Escape or click the backdrop to dismiss
- Also accessible via the "Search files" button in the header
- File icons match the sidebar conventions
- Highlights the opened file in the sidebar
- Closes refs #14

Co-authored-by: Andrew Hopper <andrewhopper@users.noreply.github.com>
@andrewhopper
Copy link
Owner Author

@claude resolve the conflicts

@claude
Copy link

claude bot commented Mar 3, 2026

Claude finished @andrewhopper's task in 4m 54s —— View job


Conflicts Resolved

  • Gather context and check git status
  • Identify conflicting files
  • Resolve conflicts by rebasing command palette onto master's modular architecture
  • Commit and push

What happened: This PR's branch diverged from master because PR #40 landed in the interim and refactored the codebase to a modular ES module architecture (separate js/managers/ and js/renderers/ files). The PR branch still had the older monolithic app.js.

How conflicts were resolved:

  • app.js — Rebased onto master's modular version (with import statements). Added the command palette state/methods to the new QuickViewApp class. Key adaptation: the SocketManager callback now stores the file tree on this.fileTree so getFlatFileList() can traverse it for search results.
  • index.html — Used master's version as the base (Tailwind/shadcn structure, <script type="module">), then added the command palette button to the header and the #command-palette overlay HTML before the loading spinner.
  • style.css — Already contained master's styles plus the command palette styles in full — no changes needed.
    |

…lar architecture

- Rebase app.js onto master's ES module structure (imports from js/managers/ and js/renderers/)
- Store file tree on QuickViewApp instance so command palette can traverse it
- Update index.html to use <script type="module"> and add command palette HTML
- style.css already contained master's styles + command palette styles (no change needed)

Co-authored-by: Andrew Hopper <andrewhopper@users.noreply.github.com>
@andrewhopper
Copy link
Owner Author

@claude pull in main/master and resolve conflicts

@claude
Copy link

claude bot commented Mar 9, 2026

Claude finished @andrewhopper's task in 29m 44s —— View job


Master pulled in and conflicts resolved

  • Check current git status and understand the conflict
  • Bring TypeScript source files from master into PR branch
  • Create CommandPalette.tsx React component (port from public/app.js)
  • Update App.tsx to add command palette state + keyboard handlers
  • Update Header.tsx to add the ⌘K button
  • Remove obsolete public/app.js, public/index.html, public/style.css
  • Sync remaining deprecated files (server.js, artifact HTMLs, etc.)
  • Commit and push

What happened

Master had gained a full TypeScript/React/Vite rewrite (PR #53) after this PR was opened, which deleted public/app.js and added src/client/ with React components. This created a significant divergence — not just a simple merge conflict.

How it was resolved

Commit 1 (ed5121f) — Brought in the TypeScript rewrite from master and ported the command palette:

  • Added all 41 TypeScript source files (src/client/, src/server/, src/shared/, tests/, config files)
  • Created new src/client/components/CommandPalette.tsx — a proper React component with keyboard navigation (↑↓ arrows, Enter, Escape), search filtering, and shadcn/ui styling
  • Updated App.tsx — added commandPaletteOpen state, ⌘K/Ctrl+K useEffect handler, and <CommandPalette> render
  • Updated Header.tsx — added ⌘K button with Command icon and tooltip
  • Removed old public/app.js, public/index.html, public/style.css (replaced by Vite/React build)

Commit 2 (e255223) — Synced remaining cleanup from master:

  • Updated README title (QuickView → ClawdView)
  • Removed server.js (replaced by src/server/server.ts), demo-messy-code.js, old artifact HTML files

The PR branch now contains master's full TypeScript architecture plus the command palette feature added on top, which is the correct state for merging.

github-actions bot and others added 2 commits March 9, 2026 14:56
… React

- Bring in TypeScript/React/Vite architecture from master (PR #53):
  src/client/ with App.tsx, Header, FileTree, renderers, shadcn/ui components
  src/server/ with Express routes and services
  tsconfig.json, vite.config.ts, package.json updates
- Port command palette (⌘K) to new TypeScript architecture:
  New CommandPalette.tsx React component with full keyboard nav
  Command palette state and Ctrl+K/⌘K handler added to App.tsx
  ⌘K button added to Header.tsx
- Remove old public/app.js, public/index.html, public/style.css
  (replaced by TypeScript Vite build)

Closes the merge conflict between the command palette PR and the
TypeScript rewrite that landed in master.

Co-authored-by: Andrew Hopper <andrewhopper@users.noreply.github.com>
- Rename QuickView -> ClawdView in README.md title
- Remove server.js (replaced by TypeScript src/server/server.ts)
- Remove demo-messy-code.js, artifact-*.html, cogit-qmech-backup/ (cleanup)

Co-authored-by: Andrew Hopper <andrewhopper@users.noreply.github.com>
@andrewhopper
Copy link
Owner Author

@claude pull in main and resolve conflicts

@claude
Copy link

claude bot commented Mar 9, 2026

Claude finished @andrewhopper's task in 3m 40s —— View job


Master sync check complete

  • Check current git status and branch state
  • Fetch latest from master
  • Analyze differences between master and PR branch
  • Confirm sync status

Result: Branch is already fully up to date with master

The PR branch (claude/issue-14-20260303-1119) is already in sync with master. Here's what I found:

origin/master tip: 97c0304 (Merge pull request #53 — TypeScript/Vite rewrite)

Differences between master and this PR branch (exactly 6 files, all expected):

File Change
src/client/components/CommandPalette.tsx Added — new feature component
src/client/App.tsx Modified — adds command palette state + ⌘K handler
src/client/components/Header.tsx Modified — adds ⌘K button
bin/quickview.js Modified — missing trailing newline only
package.json Modified — missing trailing newline only
package-lock.json Modified — dependency lockfile sync

All differences are either the intended command palette feature additions or trivial whitespace. The previous sync commit (e255223) already brought in all of master's content.

No action needed — the branch is conflict-free and cleanly adds the command palette feature on top of master's TypeScript architecture.
| Branch

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.

Add command k search so users can quickly search for a file and use arrows and enter to open the file

1 participant