Skip to content

Commit ec46cf5

Browse files
committed
docs+fix: improve README navigation docs and fix error state handling
- Add Vim-style navigation documentation in README - Condense Lambda function details description for cleaner presentation - Fix bug where error state would lock navigation, preventing back navigation - Allow clearing errors with Enter key or back navigation - Ensure proper state reset when navigating back from error screens This improves user experience by documenting Vim-style navigation and ensuring users can always navigate back from error states.
1 parent c6c5d07 commit ec46cf5

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ A terminal-based application that unifies multi-cloud operations across AWS, Azu
4545
| | Pipeline Approvals | List, approve, or reject pending manual approvals |
4646
| | Start Pipeline | Trigger pipeline execution with latest commit or specific revision |
4747
| **Lambda** | | |
48-
| | Function Status | View all Lambda functions with runtime and last update info<br><br>**Function Details View:**<br>Select any function to inspect detailed configuration including:<br>• Memory allocation<br>• Timeout settings<br>• Code size<br>• Package type<br>• Architecture<br>• Role ARN<br>• Log group |
48+
| | Function Status | View all Lambda functions with runtime and last update info<br><br>**Function Details View:**<br>Select any function to inspect detailed configuration including memory, timeout, architecture, and other key attributes |
4949

5050
*Operations can be performed using any configured AWS profile and region (one active profile/region at a time)*
5151
*Multi-account aggregation for services will be coming in the future*
@@ -56,6 +56,7 @@ A terminal-based application that unifies multi-cloud operations across AWS, Azu
5656
- Context-aware navigation
5757
- Visual feedback and safety controls
5858
- Formatted display of timestamps and resource sizes
59+
- Vim-style navigation ('-' for backwards navigation, 'k/j' for up/down navigation, etc.)
5960

6061
- **Coming Soon**
6162
- Azure integration
@@ -102,11 +103,16 @@ cg # Launch the application
102103

103104
| Key | Action |
104105
|-----------|--------------------------|
105-
| ↑/↓ | Navigate options |
106+
| ↑/↓ or k/j | Navigate options |
106107
| Enter | Select/Confirm |
107108
| Esc/- | Go back/Cancel |
108109
| q | Quit application |
109110
| Ctrl+c | Force quit |
111+
| g/G | Jump to top/bottom |
112+
| u/d | Half page up/down |
113+
| b/f | Page up/down |
114+
115+
**Note:** Vim-style navigation keys (g, G, u, d, etc.) work in table views but are passed through as text when in input mode. Use Esc to exit text input mode.
110116

111117
## Development
112118

internal/ui/ui.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
114114
case constants.KeyCtrlC, constants.KeyQ:
115115
return m, tea.Quit
116116
case constants.KeyEnter:
117+
// If there's an error, clear it and allow navigation
118+
if m.core.Err != nil {
119+
newModel := m.Clone()
120+
newModel.core.Err = nil
121+
return newModel, nil
122+
}
123+
117124
modelWrapper, cmd := update.HandleEnter(m.core)
118125
if wrapper, ok := modelWrapper.(update.ModelWrapper); ok {
119126
// Since ModelWrapper embeds *model.Model, we can create a new Model with it
@@ -125,6 +132,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
125132
}
126133
return modelWrapper, cmd
127134
case constants.KeyEsc, constants.KeyAltBack:
135+
// If there's an error, clear it and navigate back
136+
if m.core.Err != nil {
137+
newCore := update.NavigateBack(m.core)
138+
newCore.Err = nil // Clear the error
139+
view.UpdateTableForView(newCore)
140+
return Model{core: newCore}, nil
141+
}
142+
128143
// Only use '-' for back navigation if not in text input mode
129144
if msg.String() == constants.KeyAltBack && m.core.ManualInput {
130145
// If in text input mode, '-' should be treated as a character

0 commit comments

Comments
 (0)