Codex stop-gate flagged that the previous commit (140d5495) shipped
`VariablesPanel` as a widget definition + tests but never wired it
into the host's paint composition, so users couldn't actually see
it. This commit closes that gap.
`crates/openpencil-shell-native/src/widget_host/paint.rs`:
- Step 4 (PropertyPanel) now also computes the right-rail x +
width as locals so the new VariablesPanel paint step reuses
them instead of duplicating the geometry math.
- New Step 4b: when `Document.var_table.variables` is non-empty,
paint a `VariablesPanel::for_document(...)` rectangle anchored
to the right rail. Layout decision:
- No selection: panel pinned at the top of the rail
(TOP_BAR_HEIGHT + 8 px) so it's the primary chrome there.
- Active selection: PropertyPanel owns the rail; Variables
anchors to the bottom (above the status bar). Approximate
because PropertyPanel paints to fill the rail today;
proper stacking lands when the rail grows scrollable
regions or tabs.
Variables stays hidden when `var_table` is empty — no visual
noise for documents that don't use them.
- `VariablesPanel` imported via `widgets::variables_panel::
VariablesPanel` (the module is `pub mod` exported in
widgets/mod.rs).
`crates/openpencil-shell-native/src/widget_host/input.rs`:
- Cleaned up the unused imports left over from the input/keyboard
split (5caa2eb3): `PropertyFocus`, `AIChatHit`, `AIChatPlaceholder`,
`LayerPanel`, `LayoutCx`, `Toolbar`, `Widget`, `TOOLBAR_WIDTH`,
`TOP_BAR_HEIGHT` were all moved to keyboard.rs but still
listed in input.rs's import list. Down to the actually-used
`ChatAnchor` + helpers + Point2D + Rect.
Tests: 274 shell-core + 54 desktop + 20 shell-native all pass.
Visual verification: opening a `.op` file whose `variables` array
is non-empty now shows the panel chrome (header "Variables" label,
active-theme chips, one row per variable with name + resolved
color swatch / scalar label). Edit interactions still pending —
`VariablesPanelHit::Row(idx)` is wired up but the host doesn't
dispatch it yet.