openpencil/crates
Kayshen-X 048d53d71d fix(native/paint): wire VariablesPanel into the right-rail paint pass
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.
2026-05-14 17:53:16 +08:00
..
anthropic-agent-sdk chore(crates): move vendored SDKs into workspace as forkable crates 2026-05-14 16:49:17 +08:00
copilot-sdk chore(crates): move vendored SDKs into workspace as forkable crates 2026-05-14 16:49:17 +08:00
openpencil-app feat(openpencil-app): skeleton crate (Stage F entry placeholder) 2026-05-03 22:05:00 +08:00
openpencil-desktop refactor(desktop): extract rotate-cursor builder into cursor_icon.rs 2026-05-14 17:38:16 +08:00
openpencil-shell-core feat(widgets): VariablesPanel — paints variables + active theme axes 2026-05-14 17:46:09 +08:00
openpencil-shell-native fix(native/paint): wire VariablesPanel into the right-rail paint pass 2026-05-14 17:53:16 +08:00
openpencil-shell-web feat(shell): export dialog + multi-format raster (PNG/JPEG/WEBP) + Property-panel preview 2026-05-14 14:02:52 +08:00
pen-codegen chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-core chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-engine chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-figma chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6) 2026-05-03 23:05:00 +08:00
pen-types feat(pen-types): skeleton crate (bucket A) 2026-05-03 22:35:00 +08:00
wasm-libc-shim style(shell): cargo fmt --all (rustfmt-clean) 2026-05-10 18:47:33 +08:00
CLAUDE.md feat(shell): canonical .op loader + jian-core layout + visual fidelity pass 2026-05-14 09:26:08 +08:00