Repository navigation
Description
GUI version
0.1.63
Operating system
Windows
Reproduction steps
A. ↑ destroys a multi-line draft instead of moving the caret
- Type a prompt that spans several lines (or one long paragraph that soft-wraps).
- Put the caret on the first line — or anywhere in a long wrapped paragraph, see "Root cause" below.
- Press ↑.
- The whole draft is replaced by an older prompt from history and the caret jumps to the end of it.
B. Recovering the draft is a manual dance
- After ↑, press ↓ a few times to walk the history back.
- The draft only comes back if the navigation session is still alive; any reset clears the stash, and you are left retyping or hunting the text character by character.
- If you actually wanted the line above, you now have to find your place again — with the mouse or with single-character moves.
C. No line-editing keys
- Ctrl+Y does nothing (no line delete; nothing is bound to it at all).
- No way to delete the current line quickly, no Home/End behaviour beyond the browser default, no spellcheck underlines.
Expected behavior
The composer should behave like a normal text editor:
- ↑/↓ move the caret through the text (including soft-wrapped visual rows). History recall must not fight that: it should require an explicit modifier (
Ctrl+↑/Ctrl+↓, orAlt+↑/↓) or an explicit picker, and it must never replace a non-empty draft silently. - Home / End = start / end of the current visual line; Ctrl+Home / Ctrl+End = start / end of the whole input.
- Ctrl+Y deletes the current line (Ctrl+K is the more common binding and does not collide with the Windows "redo" convention — either is fine, ideally configurable).
- Spellcheck works in the composer for the languages the user actually types, with suggestions on right-click.
- Prompt history gets its own picker, like the Windows clipboard history: a button opens a dialog showing every saved prompt with its full timestamp (
YYYY-MM-DD HH:MM:SS) and text, newest first, filterable, click to insert at the caret, plus per-entry delete and clear-all.
Actual behavior
- ↑ on the first logical line calls history recall, discards the draft from view and moves the caret to the end. Because the "first line" test is done on
\npositions, a single long wrapped paragraph counts as "first line" everywhere, so ↑ recalls history from any visual row of it. - ↓ on the last logical line does the reverse. The draft is stashed only inside the current navigation session (
Mapkeyed by history index, cleared onresetNavigation()), so it is easy to lose. - Ctrl+Y is unbound; the composer does not intercept Home/End/line-editing keys at all.
- No word is ever underlined and the "Add to dictionary" context-menu branch never appears, so spellcheck is effectively inert.
Screenshots, recordings, or sanitized logs
No recording needed — this is static, reproducible by key presses only.
Root cause read from the shipped bundle (symbol names are the minified ones from resources/app/out/renderer/assets/workspace-screen-*.js, so they can be grepped directly):
-
The composer keydown handler (
Oo) has exactly one arrow branch:if ((B.key==="ArrowUp"||B.key==="ArrowDown") && !er && !En && !metaKey && !ctrlKey && !altKey && !shiftKey) { const xe = nn.current; // textarea if (xe && xe.selectionStart === xe.selectionEnd) { // no selection const _e = xe.selectionStart, We = xe.value; if (B.key==="ArrowUp") { if (We.lastIndexOf("\n", _e-1) === -1) { B.preventDefault(); $(1); return; } // recall older } else if (We.indexOf("\n", _e) === -1) { B.preventDefault(); $(-1); return; } // recall newer } }
Two problems in that test: (a) it fires on the first logical line, so wrapped text is misjudged; (b) when it fires it replaces the entire value, with no regard for existing content.
-
$isrecallHistoryfrom theN9hook (BYwrapper aroundelectronAPI.promptHistoryList/Add). It sets the whole input and then callsfocusAtEnd(). The draft is saved in a localMap(l.current.set(p, e)) indexed by history position;resetNavigation()(c()) clears the map and resets the index to-1. -
There is no handler for Home, End, Ctrl+Y, Ctrl+K or line kill anywhere in the composer path — those keys fall through to the native
<textarea>(rendered through the sharedU_component), and no application menu item binds Ctrl+Y either. -
Spellcheck: the composer
<textarea>sets nospellCheckattribute,out/main/index.jsnever callssetSpellCheckerEnabled/setSpellCheckerLanguages, and the installed app ships nodictionaries/directory. The context-menu handler does handlemisspelledWordanddictionarySuggestions, but with no dictionary loaded that branch can never fire — hence no underlines and no suggestions. -
For the picker: the on-disk prompt history already stores exactly what the clipboard-style dialog needs. In
@commandcode/harness(src/session/prompt-history.ts) entries are JSONL records{ "p": <text>, "t": Date.now() }, capped atMAX_ENTRIES = 1000. ButgetAll()returns plain strings, the IPC handler forwardshistory: string[], andparseHistoryLine()tolerates both{p}and{text}— so timestamps exist on disk and are simply dropped before the renderer sees them. Exposing{p, t}[]would be backwards compatible.
Proposed requests
Part 1 — make the composer a real text editor: move history recall off bare ↑/↓ (modifier or picker only), never overwrite a non-empty draft without confirmation, add Home/End (and Ctrl+Home/End) semantics, line delete (Ctrl+Y as asked, or Ctrl+K), and working spellcheck with the user's languages.
Part 2 — history picker: a clock/history button in the composer toolbar that opens a dialog like the Windows clipboard history — list of saved prompts with YYYY-MM-DD HH:MM:SS and the full text, newest first, filter box, click to insert at the caret, per-entry delete, clear all. The timestamps are already persisted; only the transport and the UI are missing.
Safety check
- I removed credentials and private project information from this report.
Activity
aliarain commentedon Nov 25, 2026
thanks, there are several requests in here. i'll check the up-arrow on a wrapped draft first, since losing your text is the worst part. no date for the rest yet but will get this shipped soon