Repository navigation
feat: add instant latest tab to semantic search - #1452
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟡 Changes recommended
Vote responses remain only in local component state, so switching search tabs loses the saved results and leaves the other tab stale.
1 open issue
What changed in this PR
Adds an instant Latest view to semantic search using already-loaded matches, while keeping Most relevant as the default and avoiding additional requests.
Changes:
- Adds a non-mutating, newest-first view limited to the past seven days.
- Introduces accessible result tabs with separate headings and empty-state guidance.
- Adds date-filtering tests and documents the limited-result-set behavior.
| File | Description |
|---|---|
tests/Unit/CommitSearchResults.test.ts |
Tests ordering, seven-day boundary, timezone offsets, empty results, and relevance preservation. |
resources/js/pages/search/index.tsx |
Derives both result views and adds local tabs that reset for new queries. |
resources/js/lib/commit-search-results.ts |
Implements the non-mutating latest-results filter and sort. |
KNOWLEDGE_BASE.md |
Documents tab behavior and the scope of Latest results. |
Review effort: Balanced
| <TabPanels> | ||
| <TabPanel> |

Summary
Add Most relevant and Latest tabs to semantic search results, with Most relevant selected by default. Latest shows the already-returned matches from the past seven days, newest first. Switching tabs never fetches results again or loads another page.
Changes
CommitSearchResults.latest()as a non-mutating, week-limited view of the loaded result set.Validation
composer test:lint— passed (existing JavaScript floating-promise warnings remain).composer test:types— passed, including PHPStan and both TypeScript projects.composer test:type-coverage— passed, 100%.bun run test:unit— 233 passed.php -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1'"— 5,585 passed, 30,248 assertions, 100% coverage.bun run build— passed.pointer: coarseverified. Fresh load, tap both tabs, client-side search submission, and scrolling beyond the first screen passed; no horizontal overflow. This is browser emulation, not hardware or an Android simulator. OS keyboard, browser chrome, and native safe areas were not verified.Independent review
An independent read-only agent reviewer returned CODE: PASS and VISUAL: PASS, with no unresolved blockers, for base
9c74e97d531404e0dffdddc692e6e4edd0d29000and headf523d63928598f69c780b6be909c22a156471fc5. The reviewer inspected the complete four-file diff, test/build logs, before/after screenshot sheets, browser assertions/results, touch-emulation results, and the corrected pointer-interaction recording contact sheet. The reviewer did not rerun the full suites. Keyboard and network claims rely on executed assertions rather than the recording. No inspection media is included in this text-only PR.Limitations
Latest is a filtered view of the existing limited semantic result set, not an exhaustive search for recent commits. It intentionally does not request additional matches. The seven-day window is fixed when that search response arrives. No physical mobile device or native on-screen keyboard was available for verification.
Summary by CodeRabbit