Skip to content

fix(tui): resolve escape loop and stale input in search flow#16

Merged
Alan-TheGentleman merged 1 commit intoGentleman-Programming:mainfrom
SantiagoBobrik:fix/tui-search-escape-loop
Feb 25, 2026
Merged

fix(tui): resolve escape loop and stale input in search flow#16
Alan-TheGentleman merged 1 commit intoGentleman-Programming:mainfrom
SantiagoBobrik:fix/tui-search-escape-loop

Conversation

@SantiagoBobrik
Copy link
Contributor

@SantiagoBobrik SantiagoBobrik commented Feb 23, 2026

Summary

  • Fix escape key loop when navigating back from search detail/observation views — pressing Esc from search results now correctly resets PrevScreen to ScreenDashboard, so escaping the search input returns to the dashboard instead of bouncing back to results
  • Clear search input when entering search from the dashboard so previous queries don't persist across visits

Test plan

  • All 28 existing TUI tests pass
  • Manual: search a term → enter a result → press Esc back to results → Esc to search input → Esc should return to dashboard (no loop)
  • Manual: search a term → Esc to dashboard → re-enter search → input should be empty

Pressing escape from search results left PrevScreen pointing back to
results, so escaping the search input bounced right back instead of
returning to the dashboard. Reset PrevScreen to ScreenDashboard on
escape. Also clear the search input when entering search from the
dashboard so previous queries don't persist.
@Alan-TheGentleman Alan-TheGentleman merged commit 0351718 into Gentleman-Programming:main Feb 25, 2026
Alan-TheGentleman added a commit that referenced this pull request Feb 25, 2026
Esc from SearchInput and Search view now always returns to Dashboard
instead of using PrevScreen, which could point to SearchResults and
cause an infinite loop. Added PrevScreen reset on SearchResults escape
and search input clear when entering search from dashboard.

Co-authored fixes from PR #16 that were lost during merge conflict.
@SantiagoBobrik SantiagoBobrik deleted the fix/tui-search-escape-loop branch February 25, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants