Files
ARCADIA-Studio/harness/experiments/palette-readability-20260913/palette-overlay-handoff-20260913.md
T

5.6 KiB

Custom overlay palette follow-up

Commit b1e8e454cda3133622be8f96458514c975785a71, branch codex/palette-overlay-956atf-20260913, worktree .local/palette-overlay-20260913, base afa74a305980f611437dd3aa2f937d36e9266cfe. Three owned source files only. Root explicitly extended ownership to the exact ordinary enabled trigger boundary in trigger.rs. No root production edits, compiler/Cargo/rustc, native input, or Gitea operations occurred. Tests below are newly authored and uncompiled/unrun. Standalone rustfmt (edition 2024, skip_children) and git diff --check passed; the isolated worktree was clean after commit.

Paint changes

  • crates/oa-desktop/src/context_menu.rs:740: the existing focused enabled action row retains its pale fill and receives a TEAL 1.5-unit outline within a rectangle inset one unit from the measured row. The radius follows the existing rounded row shape. Degenerate dimensions skip only the added outline. The enclosing clip, row height, text padding, scrollbar width, focus/disabled predicate, keyboard navigation, hit tests and invocation messages are unchanged.
  • context_menu.rs:814: overflow scroll thumb fill changes LINE to BOUNDARY. Its geometry, pointer drag behavior, and visibility predicate remain intact. The decorative row separator and shadowed outer menu border remain LINE.
  • forms/reference_chooser/widget.rs:711: white popup boundary changes LINE to BOUNDARY, retaining one-unit border width/radius/layout.
  • widget.rs:756: highlighted candidate retains the existing pale fill and receives an inset two-unit TEAL bottom rule. Its bounds are x+2 through right-2, bottom-3 through bottom-1, inside the existing 34-unit row. This uses the parent-authorized non-hue marker option. Unlike menu labels, chooser labels start exactly at row.x; a vertical outline there could cross the first glyph. The bottom rule avoids changing label padding, measurement, ellipsis, input or hit bounds. Only the actual highlighted candidate branch paints it; the current-reference label and all navigation/Write semantics remain untouched.
  • forms/reference_chooser/trigger.rs:298: ordinary enabled, nonhovered/unfocused trigger outline changes LINE to BOUNDARY. Existing hover/focus TEAL, 1/2-unit width, and on_open.is_some() predicate remain intact. No disabled styling/event behavior changed.

Meaningful evaluators added

context_menu::tests::mounted_keyboard_menu_paints_target_and_scroll_thumb_then_invokes_that_action (context_menu.rs:1159) mounts the actual custom Popup using iced_runtime::UserInterface and the supported WGPU Headless renderer. The fixture includes headers, separators, disabled rows and enough actions to overflow. With no mouse cursor, it paints the initial action, sends actual ArrowDown, and paints the next enabled action after skipping disabled/nonaction rows. A measured lower-padding band must have >=3:1 grayscale luminance contrast against white in over 80% of its interior columns; the previous and disabled rows must remain below 20%. This measures a continuous actual shape cue, not TEAL identity or a synthetic replacement style. The old pale fill alone cannot pass. The actual thumb center must also contrast >=3:1 without hover. Two Enter key events must emit exactly the existing Properties action 22 once.

forms::reference_chooser::widget::paint_tests::mounted_chooser_keyboard_target_is_visible_and_enter_keeps_exact_identity (widget.rs:1073) mounts the real chooser overlay/input with a deliberately reversed candidate catalog, retains UI cache over the controlled rebuild, and sends actual ArrowDown then two Enters. Both painted frames require the same continuous lower-row contrast cue exclusively on the actual highlighted row; ordinary and previous rows must not retain it. The second context line includes System / supply topology with descenders, so scattered text in the lower band cannot stand in for the full-width marker. Arrow navigation must yield Browsed without changing Current; Enter must yield exactly the original scoped Write intent for Beta ID12 once. No synthetic highlight/focus is injected.

The pixel evaluators are intentionally independent of the selected token RGB values, tolerate antialiasing, and check presence and absence across a real keyboard transition. They do not establish native monitor appearance or every zoom/DPI condition. UserInterface draw resets the renderer each frame; prior target pixels cannot satisfy the new target check. Existing chooser paging/query/stale-generation/release tests and context-menu clipping/scroll/disabled/navigation tests are retained unchanged.

Risks and next acceptance

The bottom rule is close to the lower extent of the second text line. Production text is painted after the marker and measured bounds are unchanged, but the parent should inspect actual descenders at supported DPI/minimum window and verify the cue remains distinct without reducing text readability. The rule is not a new row separator on ordinary rows. The WGPU tests themselves have not yet been compiled or executed; no pass is claimed. The scope intentionally does not introduce a warning catalog, scene bridge, search framework, font/zoom policy, or chooser refactor.

After independent source review, combine this commit with the parent's current palette source and execute the two new mounted tests plus retained context-menu/chooser tests under the Windows gate. Native witness should include keyboard-only chooser and contextual-menu navigation/Enter/Escape, an ordinary blank enabled chooser trigger on the white Inspector panel, and a tall menu thumb before hover. Preserve the current source freeze until the parent integrates.