feat: responsive TUI layout — mobile/tablet/desktop support

- NEW responsive.go: wrapFooter, adaptiveSidePad, clampWidth, truncateStr
- Footer auto-wraps to multi-line on narrow terminals (full labels preserved)
- Box width clamped to terminal width across all tabs
- Host/key/snippet rows truncated with ellipsis; compact format <35 cols
- SFTP panes stack vertically when terminal < 50 cols
- Tab bar truncates names on overflow
- Form contentW minimum lowered 50->30 for mobile
- Fixed: key_list_tab & snippet_list_tab dropped last data row (off-by-one bug)
This commit is contained in:
swanadiva
2026-06-23 19:08:44 +07:00
parent d359688b75
commit d75621e9b4
11 changed files with 302 additions and 113 deletions
+10 -9
View File
@@ -52,15 +52,16 @@
**sftp_browser_tab.go footer**: Added `Enter/→:open`, `←/Backspace:up`
**Form tab footers**: Added `Shift+Tab:prev`, `↑↓:nav`
### In Progress: Responsive Layout Overhaul
🔄 **NEW `responsive.go`**: Shared helpers for adaptive layout (`wrapFooter`, `adaptiveSidePad`, `clampWidth`, `truncateStr`)
🔄 Footer auto-wraps to multi-line (full labels preserved) — no more overflow on narrow terminals
🔄 Box width clamped to terminal width across all tabs
🔄 Host/key/snippet rows truncated with `…` for long names
🔄 SFTP panes stack vertically when terminal < 50 cols
🔄 Tab bar truncates names on overflow
🔄 Form contentW minimum lowered from 50 to 30 for mobile (Termux)
🔄 Breakpoints: compact (<60 cols / mobile), medium (60100 / tablet), wide (≥100 / desktop)
### Done: Responsive Layout Overhaul
**NEW `responsive.go`**: Shared helpers for adaptive layout (`wrapFooter`, `adaptiveSidePad`, `clampWidth`, `truncateStr`)
Footer auto-wraps to multi-line (full labels preserved) — no more overflow on narrow terminals
Box width clamped to terminal width across all tabs
Host/key/snippet rows truncated with `…` for long names; compact format on narrow screens
SFTP panes stack vertically when terminal < 50 cols
Tab bar truncates names on overflow
Form contentW minimum lowered from 50 to 30 for mobile (Termux)
✅ Fixed bug: key_list_tab.go & snippet_list_tab.go dropped last row (`rows[:len(rows)-1]` excluded real data)
✅ Breakpoints: compact (<60 cols / mobile), medium (60100 / tablet), wide (≥100 / desktop)
---