Skip to content

Conversation

@multiplex55
Copy link
Owner

Motivation

  • Avoid showing autocomplete suggestions when the dashboard should be displayed to prevent stale or confusing UI state.
  • Keep dashboard visibility logic consistent by reusing should_show_dashboard across suggestion updates and rendering.
  • Ensure suggestions are cleared on empty query or when entering dashboard mode so stale entries do not persist.
  • Prevent rendering suggestions underneath the dashboard UI.

Description

  • Updated update_suggestions() to return early if !self.query_autocomplete, self.query.is_empty(), or self.should_show_dashboard(self.query.as_str()).
  • In the main UI rendering path compute use_dashboard = self.should_show_dashboard(trimmed.as_str()) and use it to skip drawing suggestions (self.query_autocomplete && !use_dashboard && !self.suggestions.is_empty()).
  • Clear self.suggestions and reset self.autocomplete_index when entering the empty-query case and when switching into dashboard mode.
  • Changes are localized to src/gui/mod.rs and reuse the existing should_show_dashboard helper for consistent behavior.

Testing

  • No automated tests were run.

Codex Task

@multiplex55 multiplex55 merged commit 6f705e9 into master Jan 8, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/update-suggestion-handling-with-dashboard-check branch January 9, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants