Repository navigation
fix: show linked commits for hot topics - #1507
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟡 Changes recommended
The query loads and serializes all visible linked commits for the week instead of capping results at 20, allowing request memory and response size to grow unchecked for busy topics.
1 open issue
What changed in this PR
Hot-topic pages now show explicitly linked commits from the past week instead of semantic matches, making results reflect headline associations without requiring embeddings.
Changes:
- Add a dedicated linked-commit query with newest-first ordering and existing visibility and card-data handling.
- Separate headline browsing from the AI search budget and remove the headline-specific time filter from semantic search.
- Update documentation and regression tests for linked results, time boundaries, and independent search budgets.
| File | Description |
|---|---|
tests/Unit/Queries/CommitSearchQueryTest.php |
Verify ordinary search remains unrestricted by posting time. |
tests/Feature/Controllers/HeadlineControllerTest.php |
Cover linked results, visibility, ordering, and search-budget independence. |
routes/web.php |
Remove search throttling from authenticated headline browsing. |
KNOWLEDGE_BASE.md |
Document linked-only hot-topic results and quota behavior. |
app/Queries/HeadlinePageQuery.php |
Use the dedicated headline-commit query. |
app/Queries/HeadlineCommitsQuery.php |
Retrieve visible linked commits within the rolling seven-day window. |
app/Queries/CommitSearchQuery.php |
Remove the headline-only posting-time filter. |
app/Providers/AppServiceProvider.php |
Simplify search throttling by removing headline exceptions. |
Review effort: Balanced
| ->withContinuationId($viewer) | ||
| ->withCardDataFor($viewer) | ||
| ->newestFirst() | ||
| ->get() |

Summary
Hot-topic pages used semantic search on the headline name, which could include unlinked posts and omit linked posts without embeddings. They now show commits explicitly linked to the selected headline, posted within the past week, newest first.
Changes
HeadlineCommitsQueryusing headline associations and an inclusive rolling seven-day posting-time cutoff, with descending date and ID ordering.Validation
All checks ran locally on the reviewed implementation tree:
php artisan test --compact tests/Feature/Controllers/HeadlineControllerTest.php tests/Unit/Queries/CommitSearchQueryTest.php tests/Feature/DatabaseSeederTest.php— 45 passed, 425 assertions.vendor/bin/pint --dirty --format agent— passed.composer test:lint— passed; existing JavaScript lint warnings remain in unchanged files.composer test:types— passed.composer test:type-coverage— passed, 100%.bun run test:unit— 301 passed.XDEBUG_MODE=coverage php -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1'"— 5,832 passed, 31,509 assertions, 100.0% coverage.git diff --check— passed.No frontend markup, styling, component contracts, or mobile interactions changed. Visual and device verification are inapplicable; HTTP feature tests verify result selection and rate limiting. Hosted CI results are pending.
Independent review
Separate read-only review agent: PASS, with no actionable findings or publication blockers, covering correctness, regressions, architecture, privacy/visibility filtering, and meaningful tests.
git diff --check; the test results above were supplied as evidence, not rerun by the reviewer.Limitations
Production-scale query performance was not benchmarked. No deployment or production data changes are included.
Summary by CodeRabbit