KQ-2100 · CONSOLE/SHELL
Console Shell
An editor-style frame for a firmware project — title bar, file explorer, an editor with file tabs, a bottom panel for problems, output and a console, and a slim status bar — whose panel is pulled up by its edge: the edge follows the finger 1:1 with rubber-band past full height, and on release the height is projected with the release velocity and committed to the nearest snap point (closed, a quarter, half or full) on springs.glide carrying the throw's velocity. Closed, only the status bar is left, and its error and warning counts roll one face on springs.snap the way they moved when new problems arrive while their chip warms once; the panel's tab indicator slides on snap and choosing a problem opens its line in the editor. Cmd or Ctrl+J toggles the panel, F6 moves focus between explorer, editor, panel and status bar, the edge is a separator stepped by arrow keys, and in a narrow container the panel opens as a full-height sheet.
Gaugeworks · gauge-fw
Explorer
- src
- sensor.c
- sensor.h
- main.c
- display.c
- board.toml
panel quarter · problems · 2 errors 3 warnings · build failed
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/console-shell
Props
- files
- ConsoleFile[]
- default defaultConsoleFiles
- The project's files: { id, name, folder, lines }. The explorer groups them by folder; C and TOML get light colouring.
- defaultFile
- string
- default the first file with a problem
- The file open first.
- problems
- ConsoleProblem[]
- default defaultConsoleProblems
- What the last build found: { id, file, line, col?, severity: error | warning | info, message }. Counts in the status bar roll when this grows.
- output
- ConsoleLine[]
- default defaultConsoleOutput
- The build log: { id, text, tone?: muted | error | warn | success | command }.
- history
- ConsoleLine[]
- default defaultConsoleHistory
- The console's history, oldest first; the host appends what a command printed.
- tab / defaultTab
- "problems" | "output" | "console"
- default "problems"
- The panel's tab, controlled or initial.
- onTabChange
- (tab) => void
- default —
- Fires from the tablist, the status counts or the Build button that changed the tab.
- panel / defaultPanel
- number
- default 0
- The panel's height as a share of the space above the status bar, 0 (closed) to 1, controlled or initial. On a phone any open value shows as the full-height sheet.
- onPanelResize
- (height: number) => void
- default —
- Fires when a drag, key or button settles the panel on a new height.
- onRunCommand
- (command: string) => void
- default —
- A command was entered in the console, or Build was pressed ("build").
- onOpenProblem
- (problem: ConsoleProblem) => void
- default —
- A problem was chosen; the editor has already opened its file and highlighted its line.
- build
- "idle" | "building" | "passed" | "failed"
- default "failed"
- The build's state in the status bar: a progress line and spinner while building, a danger tint when it failed.
- buildProgress
- number
- default 0
- While building, how far along, 0 to 1.
- statusItems
- { id: string; label: string }[]
- default Ln/Col, encoding, board
- Items on the right of the status bar (from a 40rem container).
- project
- string
- default "Gaugeworks · gauge-fw"
- The project's name in the title bar and the frame's accessible name.
- branch
- string
- default "main"
- The branch in the status bar.
- frameHeight
- number
- default 520
- The frame's height in px.
- snapPoints
- "quarter" | "half" | "free"
- default "quarter"
- Where the panel can rest: closed, a quarter, half or full; closed, half or full; or anywhere it is let go (with momentum).
- statusStyle
- "counts" | "pills" | "minimal"
- default "counts"
- How the status bar shows problems: icons and rolling numbers, tinted pills, or one dot and a phrase.
- accent
- "cobalt" | "plum" | "mint" | "ink" | string
- default "cobalt"
- Focus, selection, the panel's edge, keywords and the build progress; any CSS colour works.
- disabled
- boolean
- default false
- Read only: the panel cannot move and nothing runs.
- className
- string
- default —
- Classes for the frame.
| Prop | Type | Default | Description |
|---|---|---|---|
| files | ConsoleFile[] | defaultConsoleFiles | The project's files: { id, name, folder, lines }. The explorer groups them by folder; C and TOML get light colouring. |
| defaultFile | string | the first file with a problem | The file open first. |
| problems | ConsoleProblem[] | defaultConsoleProblems | What the last build found: { id, file, line, col?, severity: error | warning | info, message }. Counts in the status bar roll when this grows. |
| output | ConsoleLine[] | defaultConsoleOutput | The build log: { id, text, tone?: muted | error | warn | success | command }. |
| history | ConsoleLine[] | defaultConsoleHistory | The console's history, oldest first; the host appends what a command printed. |
| tab / defaultTab | "problems" | "output" | "console" | "problems" | The panel's tab, controlled or initial. |
| onTabChange | (tab) => void | — | Fires from the tablist, the status counts or the Build button that changed the tab. |
| panel / defaultPanel | number | 0 | The panel's height as a share of the space above the status bar, 0 (closed) to 1, controlled or initial. On a phone any open value shows as the full-height sheet. |
| onPanelResize | (height: number) => void | — | Fires when a drag, key or button settles the panel on a new height. |
| onRunCommand | (command: string) => void | — | A command was entered in the console, or Build was pressed ("build"). |
| onOpenProblem | (problem: ConsoleProblem) => void | — | A problem was chosen; the editor has already opened its file and highlighted its line. |
| build | "idle" | "building" | "passed" | "failed" | "failed" | The build's state in the status bar: a progress line and spinner while building, a danger tint when it failed. |
| buildProgress | number | 0 | While building, how far along, 0 to 1. |
| statusItems | { id: string; label: string }[] | Ln/Col, encoding, board | Items on the right of the status bar (from a 40rem container). |
| project | string | "Gaugeworks · gauge-fw" | The project's name in the title bar and the frame's accessible name. |
| branch | string | "main" | The branch in the status bar. |
| frameHeight | number | 520 | The frame's height in px. |
| snapPoints | "quarter" | "half" | "free" | "quarter" | Where the panel can rest: closed, a quarter, half or full; closed, half or full; or anywhere it is let go (with momentum). |
| statusStyle | "counts" | "pills" | "minimal" | "counts" | How the status bar shows problems: icons and rolling numbers, tinted pills, or one dot and a phrase. |
| accent | "cobalt" | "plum" | "mint" | "ink" | string | "cobalt" | Focus, selection, the panel's edge, keywords and the build progress; any CSS colour works. |
| disabled | boolean | false | Read only: the panel cannot move and nothing runs. |
| className | string | — | Classes for the frame. |