From 5520363beae1cc981c79c3fd53d1d42e6712aa93 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:18:35 -0700 Subject: [PATCH] fix(kanban-search): derive the too-long badge from the deferred query The badge describes the board, so reading the live query made it flip a frame before the filter it is describing. Co-authored-by: Orca --- .../src/components/sidebar/use-workspace-kanban-search.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/sidebar/use-workspace-kanban-search.ts b/src/renderer/src/components/sidebar/use-workspace-kanban-search.ts index 27fbb75a555..d89c48bd904 100644 --- a/src/renderer/src/components/sidebar/use-workspace-kanban-search.ts +++ b/src/renderer/src/components/sidebar/use-workspace-kanban-search.ts @@ -74,7 +74,9 @@ export function useWorkspaceKanbanSearch(args: { hasQuery: matchingWorktreeIds !== null, // Why: whitespace-only text is also non-filtering, but it is self-evidently // so. A discarded 2KB paste looks identical to a query that matched - // everything, so only that case earns an explanation. - isQueryTooLarge: isWorktreePaletteQueryTooLarge(query) + // everything, so only that case earns an explanation. Read the deferred + // query, not the live one — this describes the board, so it has to change + // on the same frame the board does. + isQueryTooLarge: isWorktreePaletteQueryTooLarge(deferredQuery) } }