Skip to content

Commit a9b8212

Browse files
committed
feat(tui): add "yet to be implemented" notifications for incomplete features
- Add notification system to SelectedCollectionView with footer display - Add "a" key handler showing "Adding endpoints is not yet implemented" - Add "r" key handler showing "Sending requests is not yet implemented" - Auto-clear notifications on any keypress - Remove TODO comment for request sending
1 parent 5ba0fc3 commit a9b8212

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

internal/tui/views/selected_collection.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type SelectedCollectionView struct {
2828
activeMainTab MainTab
2929
width int
3030
height int
31+
notification string
3132
}
3233

3334
func NewSelectedCollectionView(endpointsManager *endpoints.EndpointsManager, httpManager *http.HTTPManager, collection collections.CollectionEntity) SelectedCollectionView {
@@ -102,6 +103,9 @@ func (v SelectedCollectionView) Update(msg tea.Msg) (SelectedCollectionView, tea
102103
v.requestBuilder.SetSize(innerWidth-sidebarWidth-1, innerHeight)
103104

104105
case tea.KeyMsg:
106+
// Clear notification on any keypress
107+
v.notification = ""
108+
105109
// If request builder is in component editing mode, only handle esc - forward everything else
106110
if v.activeMainTab == RequestBuilderMainTab && v.requestBuilder.IsEditingComponent() {
107111
if msg.String() == "esc" {
@@ -126,16 +130,12 @@ func (v SelectedCollectionView) Update(msg tea.Msg) (SelectedCollectionView, tea
126130
case "2":
127131
v.activeMainTab = ResponseViewerMainTab
128132
v.requestBuilder.Blur()
129-
// case "enter":
130-
// // If request builder is active, let it handle Enter first
131-
// if v.activeMainTab == RequestBuilderMainTab && v.requestBuilder.Focused() {
132-
// var builderCmd tea.Cmd
133-
// v.requestBuilder, builderCmd = v.requestBuilder.Update(msg)
134-
// if builderCmd != nil {
135-
// return v, builderCmd
136-
// }
137-
// }
138-
// If not handled by request builder, fall through to normal forwarding
133+
case "a":
134+
v.notification = "Adding endpoints is not yet implemented"
135+
return v, nil
136+
case "r":
137+
v.notification = "Sending requests is not yet implemented"
138+
return v, nil
139139
}
140140

141141
case EndpointSelectedMsg:
@@ -145,7 +145,6 @@ func (v SelectedCollectionView) Update(msg tea.Msg) (SelectedCollectionView, tea
145145
v.requestBuilder.Focus()
146146

147147
case RequestSendMsg:
148-
// TODO: Handle request sending
149148
return v, nil
150149
}
151150

@@ -219,6 +218,9 @@ func (v SelectedCollectionView) View() string {
219218
)
220219

221220
instructions := "↑↓: navigate endpoints • 1: request • 2: response • enter: edit • esc: stop editing • r: send • esc/q: back"
221+
if v.notification != "" {
222+
instructions = v.notification
223+
}
222224

223225
return v.layout.FullView(
224226
title,

0 commit comments

Comments
 (0)