feat(ui): width-derived sidebar visibility — hide at <=90 cols (#21, ADR-0046 DB1)

The schema sidebar (the left Tables column) is now shown only when the
terminal is wider than 90 columns; at or below that it is hidden and
the output/input panels span the full width. This reclaims horizontal
space on narrow terminals — notably the 90-column screencasts, where
the sidebar added little and cost the output panel its width.

Visibility is a pure function of terminal width (sidebar_visible);
the Ctrl-O peek-reveal lands in Phase C. render() splits the layout
conditionally — full-width right column when the sidebar is hidden.

Snapshots/tests that rendered at 80 wide now reflect the hidden
sidebar; those whose intent IS the sidebar (populated_with_table, the
items-panel and drop-table integration checks) render at 110 so the
Tables list is actually exercised — one masked-intent integration
check (matched "Customers" in the output, not the panel) is corrected
the same way. New tests cover the width gate and the show/hide
boundary.
This commit is contained in:
claude@clouddev1
2026-06-10 18:28:57 +00:00
parent 41bae99ab3
commit 386627a262
10 changed files with 271 additions and 217 deletions
@@ -1,29 +1,29 @@
---
source: src/ui.rs
assertion_line: 1531
assertion_line: 2317
expression: snapshot
---
Tables ──────────────────╮╭ Output ──────────────────────────────────────────╮
(none yet) ││
││
││
││
││
││
││
││
││
││
││
││
││
│ │╰──────────────────────────────────────────────────╯
│ │╭ SIMPLE ──────────────────────────────────────────╮
││
│ │╰──────────────────────────────────────────────────╯
│ │╭ Hint ────────────────────────────────────────────╮
│ ││Type a command — press Tab for options, `help` │
││for a list
╰──────────────────────────╯╰──────────────────────────────────────────────────╯
Output ──────────────────────────────────────────────────────────────────────╮
╰──────────────────────────────────────────────────────────────────────────────╯
╭ SIMPLE ──────────────────────────────────────────────────────────────────────╮
╰──────────────────────────────────────────────────────────────────────────────╯
╭ Hint ────────────────────────────────────────────────────────────────────────╮
│Type a command — press Tab for options, `help` for a list
╰──────────────────────────────────────────────────────────────────────────────╯
Project: Term Planner
Enter submit · : advanced once · mode advanced switch · Ctrl-C quit