Repository navigation
feat(keyboard): remappable shortcuts, palette > filter, back/forward history, ⌘Z undo (#1506 H2) - #1507
Conversation
Each provider's own read-only status command, verified on this machine against the installed CLIs: claude auth status --json, codex login status (stderr), cursor-agent status --format json, opencode auth list. grok, kimi and muse have no status command and report unknown. An API key in the env turns a codex/cursor 'signed out' into unknown. The boot providers:list kicks the probe in the background; later lists (picker, Settings > Agents) await a 30s rate-limited re-probe. ProviderInfo.auth carries the result. terminal:signIn types the login command from a fixed table into a fresh 'signin' shell: the thread's, or a dedicated home-directory shell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…icker (#1501) Settings > Agents gets a Providers section (installed, signed in, Sign in). The model picker flags a signed-out harness under its group label. Sign in opens the open thread's Terminal pane on the login shell, or a dedicated terminal sheet when no thread is on screen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1501) projects:discoverRecent reuses the cli-sessions walkers (claude, codex, grok, kimi) and the OpenCode db (read-only) to find where the user worked lately, maps linked worktrees to their main checkout, and groups the checkouts by git remote. The newest checkout of the three most recent groups active in the last 14 days is pre-selected. Already-added projects, the home dir and temp dirs are left out. Cursor (lossy dir names) and Muse (cwd buried in nested records) are not scanned. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Project step lists discovered repos by remote, recent ones ticked, with one Add button; the folder picker becomes the secondary action. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…irst (#1501) A reveal that lands before terminal.list now still adds its split, is bound to its thread, and an empty list opens only the revealed shell. Sign in closes Settings before the dedicated sheet opens: two modal focus traps recursed. The dev fixture seeds mixed sign-in states. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…inal-cleanup-ebd61c' into g1-resolve # Conflicts: # electron/ipc-devserver.js
Lazy per-directory listing that drops gitignored entries unless asked, a whole-tree list for the filter, and a read-only preview with a 1 MB cap, binary sniff and image data URLs. Both reuse resolveUnderRoot and add a realpath check so a symlink in the checkout cannot read outside it. Remote projects are refused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ard (#1506) Every app shortcut now reads its chord from src/keybindings.ts. Users override chords by id as JSON in Settings › Keyboard, which warns on conflicts and resets. The keyboard sheet and palette hints render from the table with platform modifiers. mod still matches ⌘ or Ctrl, so nothing changes for anyone who has not customised. Co-Authored-By: Claude Opus 5.5 <[email protected]>
) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Files pane picks reuse the review-comment chip. An `excerpt` flag keeps them in the prompt without a note (blank diff comments are still dropped), and the chip shows an 'Add a note' hint. Co-Authored-By: Claude Opus 5.5 <[email protected]>
⌘[ / ⌘] on mac and Alt+←/→ elsewhere (Ctrl+[ stays vim Escape), plus the mouse side buttons. Steps skip deleted threads; the terminal keeps its own keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A one-slot undo holds the IPC call that restores the previous state, shown as a 10 s toast with Undo. ⌘Z reverses it, or the archive toast, but never inside text inputs, the composer or the terminal. Sidebar batches join into one entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A lazy tree of the thread checkout: directories load on expand, a toggle shows gitignored entries, a fuzzy filter searches the whole tree, and arrows/Enter/Home/End drive it. The preview shows highlighted read-only text (lazy highlighter), rendered markdown with a source toggle, images, and too-large/binary states. Click and shift-click line numbers, then Add to prompt to send the range as a composer chip. Open in uses the editor the worktree menu remembers. Loaded with lazyNamed, so only a small stub lands in the main chunk. Remote projects say Files is not available. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Also give Apply the base button style, and pin the clock in the snooze undo test since snooze presets depend on the hour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s-first-run-discove-b9aca6 feat: provider sign-in status with one-click Sign in; onboarding finds recent repos (#1501 G1)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # src/App.tsx # src/components/ThreadView.tsx
…e-history-undo-14fdc7' into HEAD # Conflicts: # src/components/SettingsModal.module.css
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2289917c56
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const next = | ||
| cur && cur.verb === verb && now - cur.at < BURST_MS | ||
| ? { ...cur, count: cur.count + 1, at: now, reverse: [...cur.reverse, reverse] } | ||
| : { key: now, verb, count: 1, at: now, reverse: [reverse] }; |
There was a problem hiding this comment.
Preserve every item in a batch undo
When a batch archive or settle has IPC completions more than 500 ms apart, this time-based grouping starts a new entry and discards the reversals accumulated for earlier items. Sidebar.runBatchArchive and runBatchSettle cannot preserve the batch boundary here—the App handlers return immediately and only call offerUndo when each request later completes—so one Cmd/Ctrl+Z may restore only the last part of a slow batch. Pass an explicit batch identity or register the batch as one undo entry instead of inferring it from completion timing.
Useful? React with 👍 / 👎.
| void setSettled(threadId, override).then(() => | ||
| offerUndoOnly(override === "settled" ? "Settled" : "Unsettled", () => | ||
| setSettled(threadId, prev), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
Gate undo registration on successful mutations
If settling or snoozing fails, these .then() callbacks still run because useCoderThreadActions.setSettled and setSnoozed catch the error and resolve normally. The UI consequently reports the action as completed and offers an undo for a state change that never happened; the same issue affects unarchive because handleSetArchivedUndoable discards the boolean result. Propagate a success result and only call offerUndoOnly after a successful mutation.
Useful? React with 👍 / 👎.
| export function matchesChord(e: KeyLike, chord: Chord): boolean { | ||
| const key = e.key.toLowerCase(); | ||
| // Option on mac turns letters into symbols (⌥F is "ƒ"); fall back to code. | ||
| const code = (e.code ?? "").toLowerCase().replace(/^(key|digit)/, ""); | ||
| if (key !== chord.key && !(e.altKey && code === chord.key)) return false; |
There was a problem hiding this comment.
Normalize Space before matching custom chords
A user can apply a valid-looking override such as {"palette.command":"mod+space"}, and the formatter even displays it as “Space,” but browser keyboard events report that key as " ", not "space". Because the code fallback is only considered while Alt is pressed, ordinary mod+space can never match. Normalize e.key === " " to the parser's space token (or consistently match by code).
Useful? React with 👍 / 👎.
| if (e.altKey !== chord.alt) return false; | ||
| if (chord.shift ? !e.shiftKey : e.shiftKey && !shiftAgnostic(chord.key)) { | ||
| return false; | ||
| } | ||
| if (chord.mod) return e.metaKey || e.ctrlKey; | ||
| return e.metaKey === chord.meta && e.ctrlKey === chord.ctrl; |
There was a problem hiding this comment.
Enforce literal modifiers when mod is also present
The parser accepts combinations such as mod+ctrl+k or mod+meta+k, but this early return ignores the literal ctrl and meta flags whenever mod is set. For example, mod+ctrl+k fires on plain Cmd+K on macOS even though Ctrl is not held. Either reject mod combined with ctrl/meta during validation or require all specified modifiers here.
Useful? React with 👍 / 👎.
| useEffect(() => { | ||
| if (!open || mode !== "command" || trimmed.length < 2) { | ||
| if (!open || mode !== "command" || actionsOnly || trimmed.length < 2) { | ||
| setContentHits(null); | ||
| return; |
There was a problem hiding this comment.
Clear remote loading when entering actions-only mode
If a two-character thread search has set remoteLoading and the user changes the query to an actions-only query before that search finishes, cleanup prevents the old request's finally from clearing the flag while this new early-return path also leaves it set. An actions-only query with no matching action then displays “Searching…” indefinitely even though no search is running; clear remoteLoading in this branch.
Useful? React with 👍 / 👎.
Item H2 of #1506.
What changed
src/keybindings.ts(id, label, default, scope).{"palette.command": "mod+e"}), with invalid-entry and conflict warnings plus Reset.>filter: actions only, labelled "Actions", with no transcript search.Behaviour changes:
Verified independently, on current main merged with this branch:
vite buildpasses.🤖 Generated with Claude Code