Codex stop-gate flagged: with no selection, the right-rail
`VariablesPanel` was painted (commit 0bd98ae2 wired the paint
step) but `canvas_region` still returned the full viewport width
because its `has_property` gate only checked `property_panel_
visible()` — which is false without a selection. The canvas
paint pass (Step 5) then extended over the right rail and
overpainted the Variables panel, defeating the visibility fix
the previous commit was supposed to deliver.
`crates/openpencil-shell-core/src/document/mutators.rs`:
- New `Document::right_rail_visible() -> bool` is the unified
gate: true when either `property_panel_visible()` is true or
`var_table.variables` is non-empty. Future right-rail widgets
(Components, Themes header, etc.) extend this method instead
of patching every caller.
`crates/openpencil-shell-native/src/widget_host/geometry.rs`:
- `canvas_region` swapped from `property_panel_visible()` to
`right_rail_visible()`. The shrunk-canvas branch no longer
requires a selection — any rail-occupying widget reserves the
column.
Test (1 added, 275 shell-core total):
- `right_rail_visible_tracks_property_panel_and_variables`
covers the four state combinations:
empty doc → rail hidden
var-table-only (no selection) → rail shown (codex repro)
selection-only (no vars) → rail shown (legacy gate)
cleared selection + cleared vars→ rail hidden again
20 shell-native + 54 desktop + 275 shell-core tests pass.