From 603e4ddd7bd589ded1ab6c65b5a1f8cd2e9cf399 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 28 Nov 2025 12:26:16 +0000 Subject: [PATCH] feat(cli): reverse search results order for better terminal UX Display search results from lowest to highest relevance so the most relevant result appears last, closest to the command prompt. This eliminates the need to scroll up to see the top-ranked result. --- src/logsqueak/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logsqueak/cli.py b/src/logsqueak/cli.py index 9732c9e..18abef5 100644 --- a/src/logsqueak/cli.py +++ b/src/logsqueak/cli.py @@ -381,8 +381,8 @@ async def execute_search(): "snippet": hierarchical_context }) - # Display results - _display_search_results(results, graph_path) + # Display results in reverse order (top-ranked result shown last) + _display_search_results(list(reversed(results)), graph_path) except Exception as e: logger.error("search_execution_failed", error=str(e))