Redesign Advanced options: category menu, current-value headers, compact layout - #24
Merged
Merged
Conversation
…category New process-profile controls on the tweak screen, each permitted via the override allowlist and proven to survive a real Orca slice (the e2e asserts every key lands in the sliced gcode): - Top layers / Bottom layers (top_shell_layers / bottom_shell_layers) - One wall on top (only_one_wall_top; never a global wall_loops=1) - Raft (raft_layers) Also tags every advanced field with a category (strength / first layer / finish / supports) and exposes the category list on the schema, so the Telegram renderer can group the controls into a two-level tweak menu. This commit is metadata + controls only; the menu navigation is wired next, so the flat advanced screen still renders unchanged.
The Advanced screen rendered every control on one flat wall of buttons, which reads as blind on a phone. Split it into sub-pages: Review's single Print-tweaks button opens a category menu (Strength & shells, First layer & adhesion, Surface finish, Supports), and each category opens a page with just its controls plus Back. - ADV_MENU state + am/ad/ar/cat callbacks drive the two levels - category menu shows a per-category "N changed" count and a Reset-all - the Supports category is hidden unless the Supports toggle is on, so a support style that Orca would ignore never appears - Review keeps one summary delta line and one entry button Renderer-only; the override engine, schema tags, and answer payload are unchanged.
The tweak controls read "profile default", which tells you nothing about what you'd be changing. Resolve the selected profile's actual value for each control and fold it into the keep option, so it reads "Walls: keep profile (2)" / "Infill: keep profile (15%)". The value tracks whichever profile is selected. - resolve_advanced_from_profile maps a flattened process profile to each control's current value; the workflow flattens every offered profile's inherits chain and carries the values per profile idx in the schema - the renderer looks up the value for the selected profile and rewrites the keep-profile label; a control whose value isn't in the profile stays on the generic label - display-only and fully guarded: a read failure just leaves the label generic Same override engine and answer payload; only the label gains the value.
Three issues from the first live run of the advanced-options menu: - The menu buttons were dead: their callbacks (am, cat:...) didn't match the gateway's callback pattern, so a tap only highlighted and nothing opened. Every callback was unit-tested by calling the handler directly, which bypassed the pattern that gates whether a tap reaches it. Namespace the menu callbacks under a single-char prefix (g:m, g:d, g:r, g:c:<cat>) so they stay in the form vocabulary and never shadow a native callback, and extend the gateway pattern. New test walks every screen and asserts the real pattern routes each emitted callback. - On the profile step, an already-selected profile (the pre-selected last-used) had no way forward except the pagination arrow, so "Next" paged to the next set of profiles instead of confirming. Add an explicit Continue button when a single-select already has a selection, and relabel the page arrows so they read as paging, not advancing. - Rename the Review entry from "Print tweaks" to "Advanced options" so it reads distinct from the Edit-a-selection rows above it.
Two issues from the first live run of the advanced-options menu: - Every tweak showed "profile default" instead of the profile's current value. The resolved values were computed only when the profile list was built fresh, but the form-emit call reuses persisted profiles (for index stability across the emit and answer turns), so the emitted form carried no resolved values. Compute them on both paths, resolving each profile's process JSON from its slug the same way the slicer does. The fresh path reuses the paths it already has; the persisted path re-derives them with one scan. - Category buttons showed "Strength & shells" because the label was HTML-escaped, but button text isn't HTML-parsed. Use the raw label.
The category sub-page rendered every option as its own full-width row, so a category read as one tall column of buttons. Give each setting a block: its current value as a full-width headline, its alternatives packed two-up beneath. A category is now a set of scannable blocks instead of a flat stack.
The block layout still repeated the setting name on every option ("Infill
10%", "Infill 15%"), which doubled the text and truncated the wider labels
at two-up. Give each setting a full-width header carrying its name and
current value, and render its alternatives as bare values ("30%", "gyroid",
"2") three-up beneath. The header names the setting so the values don't
have to, and short values fit three across without truncation. A category
now reads as titled sections, not a column of long buttons.
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.
Highlights
Also
New controls
Separate top/bottom shell layers, one-wall-on-top, and raft, on top of the existing infill, pattern, walls, brim, and fuzzy skin.
Notes