-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Background
When viewing logs in kubetui, users often need to see more information than the current fixed layout allows. This is especially true for:
- Long error messages or stack traces
- JSON formatted logs
- Comparing logs across multiple pods
Use Cases
-
Full-screen log viewing: When investigating detailed logs or errors, users want to maximize the log widget to see as much information as possible.
-
Flexible pod list + log layout: When switching between multiple filtered pods, users want to adjust the split ratio between the pod list and log viewer to optimize their workflow.
Proposed Features
1. Widget Expansion Mode
Allow users to temporarily expand the active widget to full screen (or near full screen).
Benefits:
- Maximize visible log content
- Toggle back to normal layout easily
- Works with any active widget
Proposed keybinding: z key
2. Split Ratio Adjustment
Allow users to dynamically adjust the size ratio between widgets in a split layout.
Benefits:
- Customize layout to personal preference
- Balance between pod list visibility and log detail
- Flexible workflow for different tasks
Proposed keybindings:
+or=: Increase active widget size (+10%)-or_: Decrease active widget size (-10%)0: Reset to default layout
Scope
Files to Modify
src/ui/tab.rs: Add expansion mode and ratio adjustment toTabandTabLayoutsrc/ui/window.rs: Add keybindings for new features- Tests: Ensure layout calculations work correctly
Implementation Phases
Phase 1: Widget Expansion Mode
- Add expansion state tracking to
Tab - Modify layout calculation to handle expanded state
- Add keybinding
Phase 2: Split Ratio Adjustment
- Add dynamic constraint adjustment to
TabLayout - Support min/max limits (e.g., 20%-80%)
- Add keybindings
Example Workflow (Vertical Split)
[Normal: 45:55] [Adjusted: 30:70] [Expanded: 100%]
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Pod List │ │ Pod List │ │ │
│ │ +/- → │ (30%) │ z → │ │
├─────────────┤ ├─────────────┤ │ │
│ │ │ │ │ Log View │
│ Log View │ │ Log View │ │ (100%) │
│ (55%) │ │ (70%) │ │ │
│ │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘
z ← (toggle back)
Notes
- Both features should work independently and not conflict
- Expansion mode should work on any active widget, not just logs
- Split ratio adjustment should respect layout constraints (nested layouts)