fix: critical navigation bug - users trapped in detail and restore screens
Changed return value from 'return s, nil' to 'return nil, nil' in: - detail.go (line 116): Back navigation from client details - restore.go (line 101): Back navigation from restore screen Root cause: Main model's navigation logic checks if newScreen == nil. When screens returned (s, nil), the check failed and screen never changed. Now properly returns (nil, nil) to signal screen change to parent. Fixes: wg-admin-rfo
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -113,7 +113,7 @@ func (s *DetailScreen) Update(msg tea.Msg) (Screen, tea.Cmd) {
|
|||||||
switch msg.String() {
|
switch msg.String() {
|
||||||
case "b", "esc":
|
case "b", "esc":
|
||||||
// Return to list screen - signal parent to switch screens
|
// Return to list screen - signal parent to switch screens
|
||||||
return s, nil
|
return nil, nil
|
||||||
case "d":
|
case "d":
|
||||||
// Show delete confirmation
|
// Show delete confirmation
|
||||||
s.confirmModal = components.NewDeleteConfirm(
|
s.confirmModal = components.NewDeleteConfirm(
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ func (s *RestoreScreen) Update(msg tea.Msg) (Screen, tea.Cmd) {
|
|||||||
switch msg.String() {
|
switch msg.String() {
|
||||||
case "q", "esc":
|
case "q", "esc":
|
||||||
// Return to list screen - signal parent to switch screens
|
// Return to list screen - signal parent to switch screens
|
||||||
return s, nil
|
return nil, nil
|
||||||
case "enter":
|
case "enter":
|
||||||
// Show confirmation for selected backup
|
// Show confirmation for selected backup
|
||||||
if len(s.table.Rows()) > 0 {
|
if len(s.table.Rows()) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user