Skip to content

Redesign Advanced options: category menu, current-value headers, compact layout - #24

Merged
bbolinger merged 7 commits into
mainfrom
feature/advanced-tweak-menu
Jul 16, 2026
Merged

bbolinger merged 7 commits into
mainfrom
feature/advanced-tweak-menu

Conversation

@bbolinger

@bbolinger bbolinger commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Highlights

  • Advanced options are organized into categories. Instead of one long screen of every control, Review opens a short menu (Strength & shells, First layer & adhesion, Surface finish, Supports), and each category opens a page with just its controls.
  • Every control shows the profile's current value. Each setting has a header like "Infill: keep profile (25%)" so you can see what you'd change before you change it. The value tracks whichever profile is selected.
  • Cleaner per-setting layout. Each setting is a titled header with its options laid out three across ("30%", "gyroid", "2"), with no repeated labels and no truncation.

Also

  • The Supports category only appears when supports are on.
  • "Reset all to profile" clears every tweak at once, and Review shows a one-line summary of what changed.
  • The profile step gained a Continue button, so a pre-selected profile confirms with a tap instead of paging to the next set.

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

  • Profile values are read by flattening each profile's inheritance chain, the same way the slicer resolves them.
  • No change to the print-start safety path. This is form and UI only.
  • Full test suite green (1026 passed, 8 skipped).

…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 &amp; 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.
@bbolinger
bbolinger merged commit 454ad63 into main Jul 16, 2026
3 checks passed
@bbolinger
bbolinger deleted the feature/advanced-tweak-menu branch July 16, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant