Repository navigation
fix: command line and UI driver polish from QA - #133
Merged
Merged
Conversation
Offscreen apps start wit 8000 h no window until kg open makes one, so a snapshot or key on window 0 failed with a bare "window 0". Name the missing window and say how to open one.
…st in reading order `kg ui key notakey` answered "done": GPUI accepts any text as a key. A key is now one character or a named key such as escape, enter or f5, and any other name is refused with the names that work. The snapshot read its elements from a map, so each run could list them in another order. It now lists them top to bottom, then left to right. `kg ui scroll` takes a negative amount without `--`, and its help and docs say a negative amount scrolls down and a positive one scrolls up.
…errors say what to write A saved width was clamped when the window read it, so `kg preference get` could show a number the screen did not use. `kg preference set` now refuses a width outside 200 to 420 (left) or 240 to 560 (right) and names the range. The ranges live in kg_domain::prefs, which the window reads too. A boolean preference now says "must be true or false", and rail-hidden says what to write, such as ["hello"]. Decision 241.
…d rules refuse control characters `kg saved-prompt add` takes its text from --file (`-` for stdin), as `kg instructions set` does, so a long prompt no longer hits the argument limit. A title another saved prompt has is refused, ignoring case, as a saved program's rename is, so two prompts never share one title. Rules refuse a control character other than a line break or tab, so a NUL byte is not saved into the text an agent reads. CLI text output ends with a newline, so `kg instructions get` no longer leaves the shell prompt on the same line. Decision 242.
`kg thread send` on an unknown id says "thread thr_x not found", not "terminal". A saved program's clash says "A saved program named x already exists." with the same capital and full stop as its other messages. An automation name with a control character says so, not "needs a name". A value given after `kg env set NAME` says the value is read from stdin. A socket path over the limit says its length and how to set KG_SOCKET, instead of the socket library's message.
…ixes Behaviour: ui key refuses an unknown key name; ui scroll sign; saved-prompt add takes --file and refuses a taken title; preference widths are refused out of range; rules refuse a control character. The CLI reference is regenerated for the scroll help and the saved-prompt add help. Cost: product Rust is 80079 lines, 205 over the 79874 ceiling. The QA CLI fixes add those lines (error and output paths, key names, reading order, width checks, saved-prompt file and title, rules check, socket and env hints). The ceiling rises to the measured total; the 35000 target is unchanged.
Rules accept Windows line endings: CRLF is a line break, so a file saved by a Windows editor, or the window's editor on Windows, is no longer refused. The control-character refusal keeps LF, CRLF and tab. Text that a command prints gets its trailing newline only in a terminal. A pipe or a file gets the text exactly as written, so `kg instructions get > file` writes no extra byte. A parse error no longer panics on a non-UTF-8 argument: the argument list is read once, lossily, and both the JSON and the plain error paths use it. The snapshot sorts in a pure function, and the key refusal is tested through the driver, so a removed guard or sort fails a test. The sidebar clamp of an old saved width has a test of its own. Named keys are pinned: each one parses back to its own name. Control, alt and platform are modifiers, not keys, and are no longer in the list. Saved-program and saved-prompt messages use the house style: lowercase, no full stop, as "branch x already exists" does. The size ceiling is set to the measured product count (80115) with a Cost line in decision 242.
Logs stay raw: a followed log is written in chunks, so only text a command prints as one result gets the terminal newline. Modifier words are key names again. GPUI reads `ctrl`, `alt`, `cmd` and `fn` typed alone as control, alt, platform and function, so the test checks the words people type and the names GPUI reports for them. Saved-program name messages use the house style too: lowercase, no full stop. A rename onto a taken name has a test, and the messages have mutation runs that fail when they change. The argv test is shown failing when argv is read with unwrap, and the snapshot, key-refusal and width tests fail when their guards are removed. Help for `program pin` and `plugin rail` says what the positional values are. The CLI reference is regenerated, and the size ceiling is set to the measured product count (80128) with a Cost line in decision 242.
# Conflicts: # .config/size-budget.txt # docs/decisions.md
# Conflicts: # .config/size-budget.txt # crates/core/src/tests/thread.rs # crates/domain/src/op/automation.rs # crates/domain/src/op/check.rs # crates/domain/src/program.rs # crates/domain/src/tests.rs # crates/kg/src/main.rs # crates/kg/src/tests/socket.rs # docs/behaviour.md # docs/decisions.md
# Conflicts: # .config/size-budget.txt # docs/decisions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch feat/qa-cli.
Reviewed by a fresh reviewer, fixed, and re-checked (SHIP). Gate: fmt, clippy -D warnings, workspace tests, scripts.