🤔 What's the problem you've observed?
useFilteredTestCases (added in #545) returns only ReadonlyArray<ExpandedTestCase>, but its sibling useFilteredDocuments returns { results, filtered } where filtered indicates whether any search/tag/status criteria are currently active.
Consumers that use useFilteredTestCases such as the Timeline component being built in #524 cannot distinguish between two different empty states:
"No scenarios were executed" (nothing ran)
"No scenarios match your query and/or filters" (something ran but was filtered out)
This forces consumers to either call useSearch directly (breaking the abstraction that #545 was specifically designed to provide) or show an inaccurate message to the user.
✨ Do you have a proposal for making it better?
Change useFilteredTestCases to return a consistent shape matching useFilteredDocuments:
return { results, filtered }
The hook already imports useSearch, so deriving filtered requires no new dependencies. The filtered flag can be computed the same way useFilteredDocuments computes it from whether hideStatuses, tagExpression, or a text search query is active.
This keeps the abstraction intact, makes both hooks consistent with each other and unblocks Timeline from showing accurate empty-state messaging without leaking search internals into the component.
📚 Any additional context?
No response
🤔 What's the problem you've observed?
useFilteredTestCases (added in #545) returns only ReadonlyArray<ExpandedTestCase>, but its sibling useFilteredDocuments returns { results, filtered } where filtered indicates whether any search/tag/status criteria are currently active.
Consumers that use useFilteredTestCases such as the Timeline component being built in #524 cannot distinguish between two different empty states:
"No scenarios were executed" (nothing ran)
"No scenarios match your query and/or filters" (something ran but was filtered out)
This forces consumers to either call useSearch directly (breaking the abstraction that #545 was specifically designed to provide) or show an inaccurate message to the user.
✨ Do you have a proposal for making it better?
Change useFilteredTestCases to return a consistent shape matching useFilteredDocuments:
The hook already imports useSearch, so deriving filtered requires no new dependencies. The filtered flag can be computed the same way useFilteredDocuments computes it from whether hideStatuses, tagExpression, or a text search query is active.
This keeps the abstraction intact, makes both hooks consistent with each other and unblocks Timeline from showing accurate empty-state messaging without leaking search internals into the component.
📚 Any additional context?
No response