Skip to content

Commit e2e9093

Browse files
committed
fix(knowledge): show the filters while a custom window waits for its days
1 parent c0761e9 commit e2e9093

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/sim/app/workspace/[workspaceId]/home/components/knowledge-search-results/knowledge-search-results.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ describe('result paging and the custom window', () => {
257257
await render(undefined, '?updated=custom')
258258
expect(mocks.search.mock.calls.at(-1)![1]).toBe('')
259259
expect(container.textContent).toContain('Choose the days to search.')
260+
/** The filters, and the picker among them, are shown so the days can be chosen. */
261+
expect(container.textContent).toContain('Updated between')
260262
/** One day alone is not a window either; a deep link with only `from` waits for `to`. */
261263
await render(undefined, '?updated=custom&from=2026-09-01')
262264
expect(mocks.search.mock.calls.at(-1)![1]).toBe('')

‎apps/sim/app/workspace/[workspaceId]/home/components/knowledge-search-results/knowledge-search-results.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,12 @@ function SearchResults({ scope, query, onSummarize }: SearchResultsProps) {
214214
: null
215215

216216
const showResults = !noSources && !failed && !basesPending && documents.length > 0
217+
/** A custom window waiting for its days must show the filters, or the picker is unreachable. */
217218
const showFilters =
218-
hasShownFilters || showResults || (!noSources && !pending && !failed && !!search && !partial)
219+
hasShownFilters ||
220+
showResults ||
221+
awaitingRange ||
222+
(!noSources && !pending && !failed && !!search && !partial)
219223
if (showFilters && !hasShownFilters) setHasShownFilters(true)
220224

221225
return noSources ? (

0 commit comments

Comments
 (0)