Skip to content

Composer / palette includes the CLI verbs, not only orchestration - #482

Merged
currentbits merged 2 commits into
mainfrom
coder/composer-palette-should-include-the-cli--a9e74b
Aug 18, 2026
Merged

currentbits merged 2 commits into
mainfrom
coder/composer-palette-should-include-the-cli--a9e74b

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Why

People who live in Claude / Grok / Kimi / Codex type /compact, /rewind, /usage, /model without looking. Solenta’s composer / popup only listed /handoff, /advisor, and /committee (#338). Everything else was sent to the model as a prompt.

Same class of complaint as #469: the GUI grew a button for each action and hid the CLI grammar.

Fixes #472.

What changed

The / popup is now a single palette (src/slashCommands.ts). Enter either runs the existing UI or inserts a command that still needs a tail. Unknown /foo still goes to the model.

Token Action
/model /effort /permissions Open the existing composer pickers
/usage /context Pin-open the header context breakdown
/rewind /undo Last review-bar undo if there is one, else rewind-confirm on the last user message
/fork Same as the header Fork button
/new Create a thread
/clear Settle this thread, then start a new one (does not delete)
/compact Intercepted so it is not sent as a prompt; opens the context breakdown until #318 has a real compact action
/handoff /advisor /committee Still insert + space; the runner handles them
/btw /goal Insert + space (discoverability for #471 / #238)

No second Cmd+K (#150 stays files/projects).

Tests

  • test/slashCommands.test.ts — prefix matching, insert vs run, aliases

  • test/composerCommands.test.tsx — full palette, run verbs clear the token, unknown /foo still sends

  • test/composerSlashActions.test.tsx — ThreadView wiring for usage/compact/fork/new/clear/rewind

  • PR created by the Grok agent

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…e-should-include-the-cli--a9e74b

# Conflicts:
#	src/components/Composer.tsx
#	src/components/ThreadView.tsx
@currentbits
currentbits merged commit a5217c7 into main Aug 18, 2026
1 of 4 checks passed
@currentbits
currentbits deleted the coder/composer-palette-should-include-the-cli--a9e74b branch October 3, 2026 16:07
currentbits added a commit that referenced this pull request Oct 30, 2026
…more navigation and writing wins (#1776)

* Sidebar marker for threads with an unsent draft (#1770)

ThreadCard shows a quiet pencil glyph in the meta line, title "Unsent
draft", when a thread has non-whitespace composer text that hasn't
been sent. composerSession.setDraftText is now the single write path
for draft text (draftsRef aliases keptDrafts) and notifies a small
listener set only when the non-empty state flips, so sidebar rows
subscribe via useSyncExternalStore instead of polling localStorage
per row per render.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add buildFileTree: pure helper for the Changes/PR Code tree view (#1772)

Builds a directory tree from a flat file list for the upcoming Tree
toggle: single-child chains compress into one row, dirs sort before
files, and each directory carries a recursive file count and +/- sum.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Downscale oversize pasted/dropped images instead of rejecting them (#1773)

electron/attachments.js: saveImage, savePng, and the HEIC->JPEG conversion
path now run an oversize image through nativeImage (resize + re-encode,
JPEG stepping quality/size down, PNG kept first when alpha may matter)
before falling back to today's MAX_IMAGE_BYTES rejection. Target is 4096px
longest side / 4MB, safe under Claude's ~5MB/8000px API limits with
headroom for the other providers. nativeImage is injected via
setNativeImage so the pure step-down plan (planDownscaleSteps,
imageNeedsDownscale) and the full save paths are testable under plain
node. Chips show a quiet "resized from WxH" note, mirroring the existing
HEIC "converted from" note.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add threads.regenerateTitle: digest-based title refresh (#1774)

Regenerates a thread's title from its first user message plus a
digest of its latest few messages, via the same fm completion path
and sanitization/cap as the automatic one-shot title. Always an
explicit action (menu item, bulk action), so it overwrites a
user-set title too. Runs at most 2 threads concurrently; trashed
threads are skipped and one thread's failure never stops the rest.

Wires the IPC channel through ipcChannels.ts, CoderApi, the
threads:regenerateTitle handler, webScopes (steer), and the dev
fixture, plus a useCoder action that applies successful titles
locally.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Shortcuts to toggle pin and settle/restore the open thread (#1770)

thread.togglePin defaults to mod+shift+p, thread.toggleSettle to
mod+shift+a (mod+shift+s is already composer.unstash). Both call the
same threads.setPinned / threads.setSettled IPCs as the thread action
menu, toggling off the current effective state (same resolution as
the sidebar's settle computation). Since both are mod chords they
still fire while a text field is focused; only an open dialog blocks
them. Settle reuses the existing undo toast; pin has none to reuse.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add Tree view, Changes panel +/- total, and per-file copy path (#1772)

Git pane and PR Code tab: a shared List/Tree toggle (coder.diffTreeView,
same pattern as the shared Hide tests setting) renders buildFileTree
instead of the flat list, with collapsible directory rows showing a
file count and summed +/-. The Changes panel file list also gets a
summed +/- total next to its file count, respecting the hide-tests
filter. Every file row (both views, both panels) gets a copy-path
icon button; the Changes panel's context menu gets a matching "Copy
path" item, and Alt-click on its button copies the absolute worktree
path instead of the repo-relative one.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Wire Regenerate title into the thread menu, header menu, and bulk action

Row menu (src/threadActionMenu.ts, ThreadCard) and the chat header menu
(ThreadView) both get a "Regenerate title" item next to Rename; the
sidebar multi-select toolbar gets a "Regenerate titles" bulk action
(BatchBar). Affected rows show "Regenerating..." in place of the title
while in flight, and the toolbar reports success/failure counts.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Next/previous turn and PageUp/PageDown transcript navigation (#1770)

turn.prev/turn.next default to alt+arrowup/alt+arrowdown, deliberately
sharing the composer's alt+arrowup "edit last queued" chord: the
settings conflict checker already treats a shared shipped default as
intentional (same pattern as transcript.find/diff.find on mod+f), and
useTurnNavigation backs off whenever the composer textarea owns focus
so the two never fire for the same keypress.

currentRailTurn is TurnRail's scrollspy heuristic pulled out so the
shortcuts find "current" the same way the rail's own highlight does,
then step to the neighboring turn via the existing scroll-to-turn
jump. PageUp/PageDown page the transcript body by ~90% of its height
outside any editable element; the composer textarea keeps native
paging.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Confirm before closing a terminal with something still running (#1773)

electron/terminal.js: foregroundCommand/isBusy best-effort check whether
anything other than the login shell is running under a session's pid (POSIX:
any live child via `ps`; Windows ConPTY has no cheap query, so it is always
busy there). Wired through a new terminal:isBusy IPC channel (ipc-devserver.js,
ipcChannels.ts, preload regenerated, webScopes terminal:observe) that the
per-tab close button in TerminalPane.tsx calls on click: idle shells close
immediately, a running command shows "Close terminal? <command> is still
running." with Close/Cancel, using the same confirm-dialog shape and
useModalFocus as the rest of the app.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add commitMessageInstructions and prInstructions settings (#1774)

Two new AppSettings strings, normalized/validated exactly like
titleInstructions (#1765): trimmed, capped at ~1000 chars, default
empty. When set, they are appended to the commit message prompt
(electron/commitmsg.js buildPrompt) and the PR title/body prompt
(buildPrPrompt) as a "Follow these instructions from the user:"
block that takes precedence over the default style; the repo's PR
template still applies on top.

Mirrors the #1765 settings plumbing in store-normalize.js,
store-settings-methods.js, the dev/browser settings fixture, and the
AppSettings type, plus the auto-settle/budget-spend snapshot tests.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add commit message and PR instructions textareas to GitPane settings

Two textareas in the Pull requests section (Commit message
instructions, PR title and body instructions) save on blur, mirroring
the thread title instructions field. Distinct key prefixes avoid a
React duplicate-key collision when both fields are empty.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add Copy error report to the crash screen (#1773)

src/components/ErrorBoundary.tsx: componentDidCatch now keeps
ErrorInfo.componentStack in state, and the fallback gains a collapsed
<details> stack trace plus a "Copy error report" button that writes a
plain-text report (app version from the existing __BUILD_SHA__ seam,
platform, pane name, error.message, error.stack, componentStack) to the
clipboard, with the same "Copied" label-flip idiom used elsewhere (e.g.
Markdown's code-block Copy button). formatErrorReport is exported and
unit-tested separately from the clipboard plumbing.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Test Tree view, +/- total, and copy path; fix a shared chip class clash (#1772)

Renderer tests for all three #1772 features in both the Git pane and
the PR Code tab: List/Tree toggle plus a directory collapse, the
summed +/- total respecting Hide tests, and copy-path (button,
Alt-click absolute path, and the Git pane's context menu item) with a
stubbed clipboard.

Along the way, fix a real regression from the Tree view change: the PR
Code tab's new file-chip wrapper reused TurnDiffPanel's `.fileBtn`
class, which TurnDiffPanel's own turn-diff file chips still render
with — stripping their pill styling. The PR tab's inner button is now
`.entryBtn`, leaving `.fileBtn` untouched for its original caller.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* feat: per-project default-worktree override (#1775)

Projects already carry per-project defaults (threadDefaults); worktree was
the one global-only setting. Add ProjectInfo.defaultWorktree (true/false
pins it, null/absent inherits settings.defaultWorktree), editable in
EditProjectModal as a 3-way select, and resolve the override through one
shared helper per layer (electron/services-shared.js resolveDefaultWorktree,
src/projectDefaults.ts) at every place a new thread's worktree choice
defaults: the plain "New thread" button (useCoderRuns), Ask's Start work
(ThreadView), and chat-initiated threads (electron/channels/index.js).

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* feat: list a run's named background jobs (#1775)

The working-strip label collapses background work into one rolling line
("N agents working in the background" or the current tool). Add a derived
list instead: deriveBackgroundJobs (src/backgroundJobs.ts) reads shells
(Bash run_in_background, paired with a later KillShell/BashOutput by the
shell id the launch echoes back) and a still-open BashOutput poll straight
from the transcript's tool-call messages, reuses thread.subagents for
in-session Agent/Task subagents (already tracked server-side; this only
adds a startedAt stamp in electron/runner-subagents.js), and reads running
workflow fan-out agents off detail.workflow.

ThreadView shows it as a compact "Background: N running" row under the
working indicator, expanding to each job's label and elapsed time; the
one-line label stays as the collapsed summary. Jobs disappear with the run
because the derivation only runs while the thread is working.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add threads:setSortKey IPC for manual sidebar drag order (#1769)

New per-thread sortKey field (number | null, null by default) persisted
through every layer: ipc.ts/ipcChannels.ts, the regenerated preload,
electron/services-thread-state.js (plain field write, same shape and
bookkeeping-only updatedAt rule as setPinned), the ipc-threads.js handler,
the web scope allow-list, and the dev/fake coder implementations used by
tests. No ordering logic lives here yet - just the storage seam.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add the manual sidebar order helper: midpoint keys + renumbering (#1769)

src/threadOrder.ts is the pure fractional-ordering math: applyManualOrder
layers a persisted sortKey on top of a section's normal order (keyed
threads first ascending, unkeyed ones keep today's order), reorderSortKeys
turns a drop between two neighbors into a midpoint key or, when a neighbor
has no key or the gap has collapsed, a renumber of the whole section, and
moveNeighbors computes the one-step neighbors for a keyboard move.

buildFlatSidebar applies it to the pinned and active sections only -
settled/snoozed/archived keep today's ordering, unaffected.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Drag threads into your own order in the sidebar (#1769)

Wires src/threadOrder.ts into the sidebar UI:

- ThreadCard's existing detach-drag (#519) grows a reorder sibling: the
  outer row now also reports dragover/drop, and draggable no longer
  requires desktop's canDetachThread() (reordering works on web too).
  A thin indicator line (data-drop-indicator, the existing --accent
  marker color) shows where the drop would land; the dragged row dims.
- src/components/sidebar/useThreadReorder.ts holds the drag state and
  calls onSetSortKey. Handlers are stable across renders (state read
  through a ref, not a closure dependency) so passing the same function
  to every card never defeats ThreadCard's memo (#617) while idle.
- Alt+Shift+ArrowUp/Down (new thread.moveUp/moveDown bindings) moves the
  selected thread one step within its section, through the same helper.
- Cross-section drag is refused: no patch, no indicator.
- Plumbed end to end: App.tsx handleSetSortKey -> Sidebar onSetSortKey.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Add a hover-delayed detail card for PR links and pills (#1771)

Hovering a PR badge, PR list row, or linked PR for ~400ms shows title,
state, checks summary, review decision, +/- lines and author, fetched
through the existing git:prDetail IPC (extended with a checks rollup and
reviewDecision), cached ~60s and deduped per PR. Escape/mouse-out closes
it; keyboard focus opens it too; a failed fetch stays quiet.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Auto-link owner/repo#123 and bare #123 refs in markdown (#1771)

linkifyNode (PathLinks.tsx) now also turns qualified owner/repo#123 refs
and bare #123 (2+ digits) into links to github.com/<owner>/<repo>/issues/<n>.
Bare refs resolve against the thread's project GitHub remote (project.slug,
threaded through ThreadLinkContext); qualified refs work regardless. Skips
URLs, inline code and fenced code, and anything that looks like a file path
or a CSS hex color. A github.com link (synthesized or literal) gets a small
GitHub mark and, when it points at a PR or issue, the hover card from the
previous commit.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Find threads by linked PR number or title in search (#1771)

_buildSearchSnapshot now folds each thread's linked PR numbers (both
"#482" and "482", from prNumber and prLinks) and PR titles into the
notes text handed to the search scan, so ⌘K and sidebar search match a
thread by its PR.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Sidebar draft marker: server snapshot for renderToString (#1770)

The ThreadCard draft subscription had no getServerSnapshot, so the
prRender tests that render the card to a string threw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test: approval-redirect test accepts an already-drained queue (#1762)

On fast macOS runners the Codex turn ends right after the decline and the
runner drains the queued redirect into the next turn before the assertion
reads thread.queued. Accept either state, and check the text is posted once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Willem <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
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.

Composer / palette should include the CLI verbs, not only orchestration

1 participant