Edit voro.toml settings by selection on the Config screen, dispatch cap first - #182
Merged
Conversation
MJohnson459
force-pushed
the
config-settings-list
branch
from
August 19, 2026 10:33
4491765 to
e01b785
Compare
The Config screen bound a letter per value — `V` for the default viewer, `A` for the default agent — and `max_running`, the one queue option with no TUI surface at all, was next in line for a third. That does not scale, and it is the wrong model: a config screen is a list of settings you select, with one key that edits whatever is under the selection. The screen now carries a Settings list above the viewers — the default agent, the default viewer, and the dispatch cap — each showing the value in force and whether it came from `voro.toml` or is Voro's own default, which the resolved value alone cannot say when the operator's number happens to equal the default. A flat `config_rows` list holds the settings and the viewers together, the way `cockpit_rows` does, so one selection runs over both and ⏎ (or `e`) opens each row's own editor: the pickers `V`/`A` used to open, the viewer form, and a new numeric entry for the cap. `a` and `d` stay keys — `a` acts with nothing selected and `d` is destructive, neither being an edit of the selected value — and `d` on a setting is refused pointing at ⏎. `V` and `A` are unbound, which shrinks the case-convention exception list from seven entries to five. The cap is written by a new `config_edit::set_max_running` through the same comment-preserving `toml_edit` pair as the rest, refusing a negative count in the loader's own sentence (now factored into one place), and the save refreshes, so raising the cap while the queue reads `⏸ dispatch at capacity` restores the dispatch rows on that keypress. `AgentsConfig` keeps `max_running` as the raw `Option<i64>` and exposes the three from-file accessors the provenance column reads. Verified with `cargo test --workspace`, clippy and fmt clean, and driven live in tmux against a scratch store and config: selection crossing the two lists with one highlight, both pickers and the cap entry opening on ⏎, a negative and a non-numeric entry refused with the form still open, esc leaving the file untouched, a saved cap keeping the file's comments and re-gating the queue in place, `V`/`A` inert, and the parse-error branch unchanged.
MJohnson459
force-pushed
the
config-settings-list
branch
from
August 20, 2026 12:30
e01b785 to
43ac8d9
Compare
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.
The Config screen bound a letter per value —
Vfor the default viewer,Aforthe default agent — and
max_running, the one queue option with no TUI surfaceat all, was about to take a third. This turns the screen into a list of settings
you select, with one key that edits whatever is under the selection, and makes
the dispatch cap its first new setting.
What changed. A Settings list now sits between the agents pane and the
viewers: default agent, default viewer, dispatch cap, each showing the value in
force and where it came from —
(voro.toml)where the file names the key, andthe rule Voro fell back to where it does not (
first agent found on PATH,the only viewer configured,voro's default). The provenance is what the resolvedvalue alone cannot say, since an operator's cap of 5 and Voro's own default of 5
read identically. A flat
App::config_rows(ConfigRow::Setting/Viewer) holdsthe settings and the viewers as one selectable space, exactly as
cockpit_rowsdoes for the cockpit, so
config_selruns continuously over both lists, exactlyone highlight is ever drawn, and
Hit::ViewerRowbecomesHit::ConfigRowindexing the same space so a click in either list lands the selection.
e/⏎ route through oneactivate_config_row(): the two defaults open thepickers
V/Aused to open, the cap opens a newMode::EditMaxRunningnumericentry pre-filled with the cap in force, a user viewer opens the viewer form, and
a built-in viewer keeps today's refusal naming
a.aanddstay keys —adding acts with nothing selected and deleting is destructive, neither being an
edit of a variable — and
don a setting is refused pointing at ⏎.VandAare unbound; the key line, the
?map and DESIGN.md §9's case-conventionexception list all drop them, shrinking
CASE_EXCEPTIONSfrom seven to five.The cap is written by a new
voro-core::config_edit::set_max_running, throughthe same
load_doc/write_docpair as every other edit, so comments andsurrounding content survive; it refuses a negative count in the loader's own
sentence, now factored into
agent::negative_max_runningso the two surfacescannot drift.
0stays legal and keeps its meaning. The save callsrefresh()like
delete_selected_viewerdoes, so raising the cap while the queue reads⏸ dispatch at capacity (n/n running)restores the dispatch rows on the samekeypress.
AgentsConfignow keepsmax_runningas the rawOption<i64>andexposes
max_running_from_file,default_agent_from_fileanddefault_viewer_from_filefor the provenance column, rather than the TUIre-reading the file.
DESIGN.md is updated in prose in the same change: §5 gains the settings list, its
provenance rule and the cap's semantics; §7 notes the cap is now set on the
screen as well as in the file; §9's Config paragraph explains selection-not-keys
and why, and both case-convention sentences lose their Config-screen clauses.
CHANGELOG has an entry under Unreleased/Changed.
How it was verified.
cargo test --workspace(882 tests),cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --allare clean. Newtests: the writer in
voro-core(creates the file, preserves comments, accepts0, refuses a negative in the loader's words); in
app.rsthe row list and itsselection arithmetic, ⏎ routing per row kind,
drefused on a setting, theprovenance of every row with and without a file, and the cap save path writing,
refusing and re-gating the queue; in
ui.rsthe settings pane at 80x24 with bothprovenances and exactly one highlight either side of the boundary. Existing
Config tests were updated where the index space moved.
Also driven live in tmux against a scratch store and config (
verifyskill):j/k crossing from settings into viewers and back with one highlight; ⏎ opening
both pickers, the viewer form and the cap entry pre-filled;
-3and a typedletter refused with the entry still open; esc leaving the file byte-identical;
saving 4 keeping the file's hand-written comment and turning
⏸ dispatch at capacity (1/1 running)back into two dispatch rows without a restart;V/Ainert; the built-in refusals and add/delete unchanged; and the parse-error branch
still drawing neither list.