feat(app): settings grouped by purpose, and four defects an audit found - #151
Merged
Conversation
Settings now show the recommended configuration first and fold everything else into a collapsed Experimental group per category. That is a statement about evidence, not about how finished the code is: inside are the levers measured on one device, measured once, or still owed a measurement. They stay in the release build, because testing them on other hardware is what this app is for and a lever nobody can reach is a lever nobody can refute. The caveat is stated once in the group header instead of leaking into some descriptions and not others. Every description was rewritten to say what the setting does for the person reading it. Out went the measured figures, which need the device, the model and the day beside them to mean anything and have none of that room under a switch, and out went the implementation names: O_DIRECT, top-k, dma-buf, mmap and KV cache are not what someone deciding whether to turn something on needs to know. The metrics screen keeps the flag names, deliberately: there the reader is matching the UI against a CSV column and the technical name IS the vocabulary. Four defects, all found by auditing rather than by anything failing: The session signature is now derived from the argv instead of being a hand-written list beside it. Those two had to be kept in step with nothing enforcing it, and forgetting a field is a silent bug: the setting appears to change while the engine keeps running the old configuration. Three of four rebases this week collided on exactly that list. A malformed end-of-turn summary no longer strands the UI. The whole handler sat inside a catch with no failure branch, so a parse error left the state in GENERATING with no turn committed and nothing said. The streamed answer is now kept, the reason is shown, and the state returns to READY. MainActivity drops from about 1050 lines to under 700: the model download and import UI moves to ModelPickerUi.kt, which shares nothing with the chat screen. No logic moved, only its address. Dead code removed: a field whose own comment described a use it did not have, two functions nobody called, and five string resources describing a UI two rewrites ago.
Rule 6: the changelog and the docs a change invalidates ship with it. The app README described the settings screen as it was before the regrouping, and explained one experimental lever in terms of predictor accuracy percentages that the UI no longer shows.
…l read as a boundary The first pass at rewriting the descriptions went too far: it renamed the controls into consumer phrasing and lost the vocabulary that lets a setting here be matched against the CLI, the CSV preamble and the docs. Labels are back to the flag's own names; the descriptions are shorter than the originals rather than longer, and still carry no measured figures. The Experimental group gets a divider and a tonal bar: collapsed, it is the only thing between the recommended configuration and the levers that can change the reply, so it has to look like a boundary rather than one more row.
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.
Settings
Each category now shows the recommended configuration first and folds the rest into a collapsed Experimental group. That is a statement about evidence rather than about how finished the code is: inside are the levers measured on one device, measured once, or still owed a measurement. They stay in the release build on purpose, because testing them on hardware other than the one test phone is what this app is for, and a lever nobody can reach is a lever nobody can refute. The caveat is stated once in the group header instead of leaking into some descriptions and not others.
Every description was rewritten to say what the setting does for the person reading it:
Out went the measured figures, which need the device, the model and the day beside them to mean anything and have none of that room under a switch. Out went the implementation names with them: \O_DIRECT, top-k, dma-buf, mmap and KV cache are not what someone deciding whether to turn something on needs to know. The metrics screen keeps the flag names deliberately, because there the reader is matching the UI against a CSV column and the technical name is the vocabulary.
Four defects, all found by auditing rather than by something failing
The session signature is derived from the argv instead of being a hand-written list beside it. The two had to be kept in step with nothing enforcing it, and omitting a field is a silent bug: the setting appears to change while the engine keeps running the old configuration. Three of the four merges in this release collided on exactly that list.
A malformed end-of-turn summary no longer strands the UI. The whole handler sat inside a catch with no failure branch, so a parse error left the state in GENERATING with no turn committed and nothing said. The streamed answer is now kept, the reason is shown, and the state returns to READY.
\MainActivity\ drops from about 1050 lines to under 700. The model download and import UI moves to \ModelPickerUi.kt, which shares nothing with the chat screen. No logic moved, only its address.
Dead code removed: a field whose own comment described a use it did not have, two functions nobody called, and five string resources describing a UI two rewrites ago.