Skip to content

feat(console): Filesmith console for filesmith commands - #44

Merged
Maxaubert merged 18 commits into
mainfrom
feat/39-console
Oct 6, 2026
Merged

Maxaubert merged 18 commits into
mainfrom
feat/39-console

Conversation

@Maxaubert

@Maxaubert Maxaubert commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Closes #39

What

A Filesmith console: a bottom panel under the files view that runs filesmith commands (and only those) in a forked CLI process, built to the signed-off mockup docs/mockups/console/01-bottom-panel.html and spec docs/superpowers/specs/2026-10-06-console-design.md.

  • Open/close: the Console button in the bottom strip of the centre column (on every tab; it replaces the removed totals row, and the open panel sits above it), and Ctrl+`` everywhere (matched on code === 'Backquote'` for Nordic layouts; not under an open dialog). Resizable by a sash (pointer and ArrowUp/Down), height stored.
  • Runs: one command at a time, in the console's folder (last folder, else Downloads, else home). Each run is a forked cli.js under the app's own executable with an IPC channel: human text plus NDJSON events for the live progress row. Runs never join the queue.
  • Stop / Ctrl+C: staged (IPC interrupt, again, then tree kill after 5 s); a stopped run reports exit 130.
  • Limited by design: the first word must be a catalog command or alias (after an optional filesmith prefix and global flags). Anything else (del *.*, claude, paths, operators) is refused with one plain line of text (no button). Main reclassifies the raw line itself before forking; it never takes an argv from the renderer.
  • Built-ins: cd (relative, .., quoted, ~, D:, cd -), clear/cls/Ctrl+L, help, history (100 lines, session only, no scrollback across restarts).
  • Completion: catalog-driven Tab completion for commands, flags, values and files; Up/Down history.
  • Output: result rows, summary with Show in File Explorer, right-click a result row for Show in File Explorer / Open in default app.
  • View-size keys (Ctrl+=, Ctrl+-, Ctrl+0) no longer change the files view while typing in any text field; Ctrl+wheel over the console neither steps the view size nor zooms.
  • Progress reads like the queue, no space before the bracket: 63%(4s) in the console and in the CLI's human output.
  • Version 0.8.0 (minor, feature).

Owner feedback on 0.8.0 (commit 8318179)

  • Folder button toggles: a second click on the console head's folder button now closes its menu. Cause: the shared context menu closed on any window mousedown, then the button's click opened it again. Menus opened from a button now carry their trigger; a press on the trigger is left to its click, which toggles (menuToggle.ts). The View menu and the option selects already excluded their trigger and toggled; e2e now pins both the folder and View buttons (open, close, open).
  • Bottom strip: the totals row is removed (TotalsRow, queueTotals and their CSS and tests deleted). A 30px strip flush with the window bottom holds only the Console button (pressed while open) on every tab, Generate, PDF Tools, Completed and Settings included. The files toolbar is Add files, the count and View.
  • Progress format: 62%(4s) everywhere (console panel and CLI human reporter; tests and spec updated).

Verification

Run in the worktree on Windows 11:

Gate Result
npm run typecheck pass
npm run lint pass
npx prettier --check . pass
npm test 96 files, 907 passed, 1 skipped
npm run build pass
npm run test:e2e 92 passed, 3 skipped (the opt-in FILESMITH_SHOTS visual captures); the GPU tests passed on this machine
FILESMITH_SHOTS=1 console capture pass; docs/mockups/console/shots/impl-idle.png, impl-running.png refreshed
npm run package Filesmith-Setup-x64-0.8.0.exe built, installed silently, installed app launched (0.8.0.0)

Hands-on, scripted against the built app (hidden window, fresh profile):

  • `Ctrl+`` opens with the prompt focused and closes again; the strip's Console button opens it. Default folder: Downloads.
  • doctor: exit 0, tool table printed.
  • convert sample.png --to webp in a temp folder: ok sample.png -> sample.webp, exit 0, Show in File Explorer shown, file written, queue row count unchanged.
  • del *.* and claude: not run, plain refusal line; a direct consoleRun of calc through the bridge is refused by main.
  • Tab: conv to convert ; files listed for sam; --to we lists webp/webm and Enter inserts webp. Up recalls claude, then del *.*.
  • A 31-file avif --quality best run: live row [12/31] big11.png 63%, Stop gives exit 130, Stop button gone, no partial outputs left.
  • cd .. moves the folder up and prints the note.
  • Ctrl+= / Ctrl+Shift+= in the prompt: view size stays details, zoom stays 1.

Implementation shots next to mockup 01 match in layout, greys, Stop in red and the Console button; differences are only the HiDPI scale and the long temp path in the prompt.

Known gaps

  • The mockup's open-idle shot shows an intro paragraph ("Runs filesmith commands in this folder ...") at the top of the scrollback. The spec does not list it (an empty scrollback shows the placeholder convert *.heic --to webp), so it is not built. Say if you want it.
  • The Show in File Explorer click was not exercised by the script (it opens a desktop window); the e2e checks the button.
  • Unsigned installer, as for every release until SignPath enrollment.

🤖 Generated with Claude Code

  • Tooltips: removed those that repeat a visible label (sidebar when expanded, Console button, Add files, Run, View, Stop, console note); kept on icon-only buttons, collapsed sidebar items and truncated paths.

  • Console simplified (owner feedback): open, the panel replaces the bottom strip flush with the window bottom; its head is a slim 28px row with only the close X (plus the red Stop while running). Folder menu, note and Clear left the head; cd / clear / Ctrl+L still work.

  • Extra UI removed (owner feedback): no Open in terminal anywhere (launcher, IPC, preload, icon, tests removed), no keycap hints at the prompt or in the completion list (Tab, Up/Down, Enter, Esc still work). Refusal: `del` is not a filesmith command. Only filesmith commands run here. Use a terminal for anything else.

Maxaubert and others added 18 commits October 6, 2026 00:08
…oved)

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
onChange now passes the new value to openCompletion and insert, so the
list filters on what was just typed and a picked word replaces the right
prefix (c, Tab, o, n, Enter gave `cconvert `). A lone match is inserted
on Tab only, not while typing. The onBusy effect depends on onBusy, not
the whole props object, and refusal notes draw backtick spans as code.
Adds e2e/console.spec.ts as the regression and the Console button to the
toolbar expectation in e2e/ui.spec.ts.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prompt folder now shrinks first, clipped at its start, and the input keeps at least 160px. Found while testing the installed 0.8.0 build in a deep folder.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The echo line's folder is clipped at its start like the prompt's, a long
command wraps and the exit or running status never leaves the panel. Long
output lines wrap too. The running footer keeps the Tab and Up/Down hints,
and the head folder gives way before the "filesmith only" note, as in the
running mockup. The space after the prompt's ">" is no longer dropped.
e2e: a run from a long folder keeps its status inside the panel; the
running footer shows the key hints and the head note reads in full.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2%(4s)

- The totals row is gone; a 30px bottom strip on every tab holds only the
  Console button, the open panel sits above it. The files toolbar is Add
  files, the count and View.
- The folder button's menu closed on mousedown and the click reopened it;
  a press on a menu's trigger is now left to its click, which toggles.
- Console and CLI progress read 62%(4s), like the queue.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tooltips stay only on icon-only buttons, sidebar items while collapsed, and
truncated paths or names. The sidebar and Console strip rule is pinned in
e2e/ui.spec.ts.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open, the bottom strip hides and the panel sits flush with the window
bottom. The head is a slim 28px row with an icon-only close X and, while
a command runs, the red Stop. Removed the Console label, folder menu,
note, Open in terminal and Clear from the head (Open in terminal stays on
the refusal line; cd, clear/cls and Ctrl+L still work), plus the recent
folders store, consoleFolders.ts and the unused clear icon.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ets the console

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner asked to remove the extra UI. The refusal line is plain text
with no button, the prompt row and the completion list lose their keycap
hints (the keys still work), and Open in terminal is removed end to end:
launcher, IPC channel, preload method, the external icon, CSS, tests and
spec/doc mentions. The limited-console guarantee and refusal stay.

Refs #39

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Maxaubert
Maxaubert merged commit cc639ad into main Oct 6, 2026
2 checks passed
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.

Filesmith console: run filesmith commands from inside the app

1 participant