tui: responsive/adaptive layout — adapt to terminal size #127
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom#127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a user running loom-tui in terminals of varying sizes (from 80x24 to ultra-wide), I want the layout to adapt to available space like the GTK app adapts to window size, so that the UI is usable at any terminal dimension.
Problem
Current layouts use hardcoded values:
columns: 4hardcoded regardless of terminal widthAcceptance criteria
Sidebar
Ctrl+Btoggle still works manually regardless of auto-collapseGallery grid
max(1, (main_area.width / 20).min(6))Generate screen
Entity screen
Settings screen
Model browser
Overlays
centered_rect()clamps to terminal boundsMinimum viable terminal
Event::Resizeto recompute all layouts immediatelyBreakpoint system
AppCtxorcompute_layout()exposes current breakpointsOut of scope
References
crates/loom-tui/src/components/mod.rs—compute_layout(),centered_rect()crates/loom-tui/src/screens/gallery.rs—columns: 4,cell_height: 10crates/loom-tui/src/screens/generate.rs— two-column param layoutcrates/loom-tui/src/screens/entities.rs— three-column layoutcrates/loom-tui/src/screens/settings.rs— two-pane layoutloom-gtkusesAdwBreakpointfor responsive layoutPartial progress (#129 /
tui/generate-rewrite-and-nav)Several acceptance criteria landed as a side effect of the masonry gallery + generate screen rewrite. Updating status:
Gallery grid
crates/loom-tui/src/screens/gallery.rsensure_masonry_layout().col_width; resize invalidates and re-images.self.columns: 4— needsmax(1, (main_area.width / 20).min(6))auto-calc.Generate screen
Constraint::Percentage(30)/Percentage(20)so prompts grow with terminal height.Still to do
Sidebar auto-collapse, entity layout breakpoints, settings/model browser breakpoints, overlay clamping, breakpoint system, minimum-terminal-size enforcement — all unchanged.
The breakpoint system (centralized
Breakpointsstruct) is still the right next step to consolidate the remaining work.