Skip to content

feat: searchable case picker + Command-K session palette (COD-151/153/157/192)#146

Merged
Ark0N merged 12 commits into
Ark0N:masterfrom
aakhter:cod-163-command-palette
Jul 12, 2026
Merged

feat: searchable case picker + Command-K session palette (COD-151/153/157/192)#146
Ark0N merged 12 commits into
Ark0N:masterfrom
aakhter:cod-163-command-palette

Conversation

@aakhter

@aakhter aakhter commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • COD-151: Searchable case picker — replaces the bare <select> for quick-start with a filterable input + dropdown, so users can type to find a case by name across a large list
  • COD-153: Command-K session palette — Ctrl+K (or Cmd+K) opens a floating palette that lets you switch between live sessions, start a new one, or open a case picker, without leaving the keyboard
  • COD-157: Shortcut palette label refinements — cleaner, more consistent binding labels in the help/shortcut overlay
  • COD-192: "Browse all sessions" escape hatch in the command palette — falls back to the full session list modal when the inline results are insufficient

Includes a shortcut settings UI (App Settings → Shortcuts tab) required by COD-157 test coverage: a list of all bindings with capture-to-rebind and per-shortcut enable/disable. No CSS for .shortcut-setting-row / .shortcut-capture-btn was added here — styling is left for a follow-up.

Conflicts resolved

Cherry-picks off origin/master diverged in the hot frontend files. Resolved:

File Conflict
app.js Escape handler + DEFAULT_SHORTCUTS block
index.html Help modal, command palette modal, session manager modal, shortcut grid
panels-ui.js Large block with Away Digest duplicate; kept only new palette sections
session-ui.js loadQuickStartCases() vs getCasePickerOptions() refactor
styles.css Empty HEAD vs full palette CSS
settings-ui.js closeAllPanels() additions
README.md Shortcuts table, API table, architecture numbers
test/run-mode-ui.test.ts HEAD Codex tests + new palette describe blocks
test/help-modal-shortcuts.test.ts Modify/delete — kept cherry-pick version
test/shortcut-registry-overlay.test.ts Modify/delete — kept + implemented required APIs

Test plan

  • tsc --noEmit — clean
  • npm test -- test/command-palette-ui.test.ts test/run-mode-ui.test.ts test/keyboard-shortcuts.test.ts test/help-modal-shortcuts.test.ts test/shortcut-registry-overlay.test.ts — 34/34 pass
  • npm run build — clean
  • Ctrl+K opens palette; typing filters sessions; Enter switches; Escape dismisses
  • Case picker search in quick-start dropdown filters by name
  • "Browse all sessions" item falls back to session list modal

🤖 Generated with Claude Code

johoja12 and others added 10 commits July 9, 2026 11:01
Pins a "Browse all sessions…" item at the bottom of the command palette
list (after "New session"). Activating it closes the palette and opens
the Session Manager modal, bridging the gap between the fast in-memory
switcher and the full server-side history browser.

The item gets a distinct visual treatment (≡ icon, muted title/icon
color, 4px top gap) so it reads as a secondary action separate from the
primary session rows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mote-case shell

- app.js: getShortcutRegistry()/matchesShortcutEvent()/showShortcutOverlay()/
  renderShortcutOverlay()/closeShortcutOverlay() (needed for DEFAULT_SHORTCUTS
  action dispatch + shortcut-registry-overlay tests)
- settings-ui.js: renderShortcutSettingsList()/startShortcutCapture()/
  onShortcutCaptureKeydown()/resetShortcutOverride()/toggleShortcutEnabled()
  (Settings → Shortcuts tab, needed for shortcut-registry-overlay tests)
- index.html: Shortcuts modal tab + shortcut overlay modal; remove Ctrl+Enter
  hint text (help-modal-shortcuts test asserts absence)
- session-ui.js: remote-case detection in runShell() (caseName vs workingDir);
  saveLastUsedCase after deleting selected case
- test/command-palette-ui.test.ts: expect browse-sessions item (COD-192 adds it)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude added 2 commits July 12, 2026 19:06
…stop Ctrl+K PTY leak, finish shortcut registry (PR Ark0N#146)

- Session Manager (COD-121/192): align _loadSessionManagerList() with the
  merged Ark0N#139 endpoint — map UnifiedSessionItem fields (lastActivityAt
  epoch-ms → lastModified, optional sizeBytes/firstPrompt/name) to the
  history-record shape _buildHistoryItem renders; surface non-2xx /
  error-envelope responses as a visible message instead of a silent
  "No sessions found"; route clicks by liveness (live row → selectSession,
  history row → resumeHistorySession by conversation UUID) via a new
  onActivate option so a live session is never duplicate-resumed
- Ctrl+K double-dispatch: gate the palette chord in
  attachCustomKeyEventHandler (return false on keydown) so xterm never
  writes 0x0b kill-line into the PTY while the palette opens; gate is
  registry-aware so a rebound/disabled palette shortcut restores normal
  terminal Ctrl+K
- Shortcut registry (COD-157) finished per maintainer decision: document
  keydown now dispatches through getShortcutRegistry() +
  matchesShortcutEvent() (legacy SHORTCUTS table removed), honoring
  per-shortcut disable and rebinds incl. the palette chord; overrides
  persist via saveAppSettingsToStorage() (correct device key + cache
  coherence, was orphaned 'codeman:settings'); Shortcuts tab renders on
  open via switchSettingsTab hook; capture uses a persistent listener that
  ignores bare modifier keydowns (combos now capturable) and requires a
  Ctrl/Cmd/Alt chord; settings rows use delegated listeners instead of
  inline onclick (JS-string injection sink) and overrides can no longer
  clobber id/label/action; added the missing row + overlay CSS
- matchesShortcutEvent: reject undeclared extra modifiers (Ctrl+Shift+K
  no longer hijacked from Firefox devtools) while keeping Ctrl/Cmd
  interchangeable; match physical code OR produced key for layout parity
- Registry/dispatch gaps: added restore-terminal-size entry, documented
  Ctrl+Shift+R again in the help modal (test flipped to assert presence),
  Ctrl+?/Alt+? now really open the registry-driven shortcut overlay, and
  Escape closes it
- Palette new-session pick routes through selectQuickStartCase() so the
  searchable combobox, dir display, and lastUsedCase stay in sync
- Removed fork cherry-pick debris: dead _onSessionListMaybeChanged(),
  orphaned .session-row-menu CSS, nonexistent closeMobileHeaderUtilities
  calls
- Tests: functional vm-harness coverage for the unified-list field
  mapping + error state + liveness routing, palette chord shift/disable/
  rebind handling, override persistence round-trip, capture flow, tab
  render hook, and source guards for the PTY gate + registry dispatch

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…help modal reachable (PR Ark0N#146)

- saveAppSettings() rebuilds settings from the DOM; carry over shortcutOverrides
  like showTokenCount/showCost so rebinding survives unrelated saves
- shortcut overlay footer links to the full help modal (its only opener was the
  legacy Ctrl+? route this PR replaced)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Ark0N Ark0N merged commit 460972a into Ark0N:master Jul 12, 2026
Ark0N pushed a commit that referenced this pull request Jul 12, 2026
- help-modal extractor bounds at the next HTML comment (cron modal's 'Run At'
  text false-positived the stale-shortcut regex)
- remote-shell run test expects the wired /api/quick-start path (#145) — POST
  /api/sessions has no caseName in its schema

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Ark0N

Ark0N commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Merged — thank you @aakhter! The Cmd+K palette + searchable case picker feel great and the shortcut registry is a solid foundation. Review completed the integration: the Session Manager now rides the #139 unified endpoint that landed first (with envelope unwrap + error states), Ctrl+K no longer leaks 0x0B into the focused PTY (xterm needed its own gate), the shortcut settings tab is fully functional (dispatch through the registry, right storage key, rendered on tab open), overrides survive unrelated settings saves, and the full help reference stays reachable from the overlay footer. 🙏

Ark0N pushed a commit to aakhter/Codeman that referenced this pull request Jul 12, 2026
Resolve the 4 conflicted files toward master's merged Ark0N#146 work while
keeping PR Ark0N#153's genuinely-new additions:

- app.js: keep the full Escape chain (closeSessionManager +
  closeCommandPalette + closeShortcutOverlay).
- index.html: keep master's Command Palette modal markup alongside the
  PR's Session Manager modal + header button.
- styles.css: keep master's Command Palette + COD-157 shortcut CSS AND
  the PR's COD-130 session-row kebab-menu CSS (both inserted at the same
  spot — reunited each with its own closing brace).
- terminal-ui.js: resolve _buildHistoryItem's main-row click handler to
  master's options.onActivate contract with a liveness + claudeSessionId
  -aware resume default, preserving the PR's two-shape/badges/kebab body.
- panels-ui.js: the PR's pre-Ark0N#146 Session Manager block auto-merged as a
  duplicate AFTER master's fixed block (last-key-wins regression) — drop
  it, keep master's implementation plus the PR's new
  _onSessionListMaybeChanged.

Backend projectKey plumbing and the SSE live-refresh listeners in app.js
merge additively and are kept as-is.
Ark0N pushed a commit to aakhter/Codeman that referenced this pull request Jul 12, 2026
…implementation (PR Ark0N#153)

- Hide the new btn-session-manager header button on phones: add it to the
  @media (max-width: 430px) display:none block in mobile.css (next to
  .btn-away-digest) and to KNOWN_PHONE_HIDDEN in the mobile-header policy
  test, closing the recurring phone-header-leak regression that was PR
  Ark0N#153's red CI job.
- Put the session-manager header button on its own line in index.html
  (was crammed onto the away-digest line).
- app.js: drop session:updated from the unified-list SSE refresh trigger —
  it is batch-broadcast ~every 500ms per active session and would turn an
  open modal / visible welcome list into a sustained ~1 Hz full projects
  rescan loop; created/deleted (structural changes) are sufficient.
- terminal-ui.js _fetchUnifiedSessions: check the ApiResponse envelope and
  throw on failure so a 5xx surfaces via the caller's catch instead of
  rendering an empty history.
- terminal-ui.js _openSessionRowMenu: on re-entry, invoke the previous
  menu's close fn (stored as _openRowMenuClose) so its document/window
  listeners are detached rather than leaked; use claudeSessionId ||
  sessionId in the 'Resume session' menu item to match the main-row and
  Session Manager resume routing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ark0N pushed a commit that referenced this pull request Jul 12, 2026
…Session Manager — welcome list + searchable modal + live SSE refresh

Rebuilt on the merged #146 Session Manager: kept master's Command Palette + fixed
Session Manager implementation, dropped the PR's stale duplicate block (last-key-wins
regression), rebased _buildHistoryItem on master's onActivate contract, kept the new
projectKey plumbing + SSE live refresh + kebab menu/badges, phone-hid the header button.
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.

4 participants