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
+4 -3
View File
@@ -16,14 +16,15 @@
- **sftp_browser_tab.go footer**: Added `Enter/→:open`, `←/Backspace:up`
- **form tabs footer**: Added `Shift+Tab:prev`, `↑↓:nav`
### Responsive Layout (In Progress)
### Responsive Layout (Done)
- **NEW `responsive.go`**: Shared helpers (`wrapFooter`, `adaptiveSidePad`, `clampWidth`, `truncateStr`)
- Footer auto-wraps to multi-line when terminal is narrow (full labels preserved)
- Box width clamped to terminal width — no more overflow
- Host/key/snippet rows truncated with `…` when names are too long
- Host/key/snippet rows truncated with `…` when names are too long; compact row format on narrow screens
- SFTP panes stack vertically when terminal < 50 cols
- Tab bar truncates tab names on overflow
- Form contentW minimum lowered to 30 for mobile (Termux)
- Form contentW minimum lowered from 50 to 30 for mobile (Termux)
- Fixed: key_list_tab & snippet_list_tab were dropping last data row (off-by-one in `rows[:len(rows)-1]`)
- Breakpoints: compact (<60), medium (60100), wide (≥100)
## v1.0.0 (2025-01-30)