From 710ac10fb537ddac27803d12e30ea60059409225 Mon Sep 17 00:00:00 2001 From: richardkeep Date: Wed, 4 Nov 2026 09:37:56 +0300 Subject: [PATCH 1/3] fix: end each hot topic commit with its own dot --- resources/js/components/commit-search-results.tsx | 12 ++++++++++++ resources/js/pages/headline/show.tsx | 1 + 2 files changed, 13 insertions(+) diff --git a/resources/js/components/commit-search-results.tsx b/resources/js/components/commit-search-results.tsx index e653ba29c1..3f4cc9e892 100644 --- a/resources/js/components/commit-search-results.tsx +++ b/resources/js/components/commit-search-results.tsx @@ -12,11 +12,13 @@ export function SearchResults({ isWaiting = false, heading = 'Most relevant commits', empty = 'Try describing the idea in other words, or pick one of the searches below.', + isStandalone = false, }: { results: SearchResultSet | null; isWaiting?: boolean; heading?: string; empty?: ReactNode; + isStandalone?: boolean; }) { if (results === null) { return ( @@ -57,6 +59,16 @@ export function SearchResults({ ) : ( {results.commits.map((commit, index) => { + if (isStandalone) { + return ( + + ); + } + const previous = results.commits[index - 1]; return ( diff --git a/resources/js/pages/headline/show.tsx b/resources/js/pages/headline/show.tsx index fb659c9246..be6415108c 100644 --- a/resources/js/pages/headline/show.tsx +++ b/resources/js/pages/headline/show.tsx @@ -38,6 +38,7 @@ export default function Show({ results={{ term: name, commits }} heading="What nullers have been saying" empty="No matching commits from the past week." + isStandalone /> ); From 0a1826f2130e4822c263839c458e76648524008c Mon Sep 17 00:00:00 2001 From: richardkeep Date: Wed, 4 Nov 2026 09:46:04 +0300 Subject: [PATCH 2/3] fix: end each search result with its own dot --- .../js/components/commit-search-results.tsx | 37 ++++--------------- resources/js/pages/headline/show.tsx | 1 - 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/resources/js/components/commit-search-results.tsx b/resources/js/components/commit-search-results.tsx index 3f4cc9e892..7c0c8723d1 100644 --- a/resources/js/components/commit-search-results.tsx +++ b/resources/js/components/commit-search-results.tsx @@ -2,7 +2,6 @@ import type { ReactNode } from 'react'; import { CommitCard } from '@/components/commit-card'; import { CommitSkeleton, EmptyFeed } from '@/components/commit-feed'; import { GraphCanvas } from '@/components/graph-canvas'; -import { authorLaneColor } from '@/lib/utils'; import type { Commit } from '@/types'; export type SearchResultSet = { term: string; commits: Commit[] }; @@ -12,13 +11,11 @@ export function SearchResults({ isWaiting = false, heading = 'Most relevant commits', empty = 'Try describing the idea in other words, or pick one of the searches below.', - isStandalone = false, }: { results: SearchResultSet | null; isWaiting?: boolean; heading?: string; empty?: ReactNode; - isStandalone?: boolean; }) { if (results === null) { return ( @@ -58,33 +55,13 @@ export function SearchResults({ ) : ( - {results.commits.map((commit, index) => { - if (isStandalone) { - return ( - - ); - } - - const previous = results.commits[index - 1]; - - return ( - - ); - })} + {results.commits.map((commit) => ( + + ))} )} diff --git a/resources/js/pages/headline/show.tsx b/resources/js/pages/headline/show.tsx index be6415108c..fb659c9246 100644 --- a/resources/js/pages/headline/show.tsx +++ b/resources/js/pages/headline/show.tsx @@ -38,7 +38,6 @@ export default function Show({ results={{ term: name, commits }} heading="What nullers have been saying" empty="No matching commits from the past week." - isStandalone /> ); From aa865f4e5b5ef1235e645e0587f0faf273548375 Mon Sep 17 00:00:00 2001 From: richardkeep Date: Wed, 4 Nov 2026 10:16:19 +0300 Subject: [PATCH 3/3] test: expect each search result to end on its own dot --- tests/Unit/StandaloneCommitGraphs.test.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/Unit/StandaloneCommitGraphs.test.tsx b/tests/Unit/StandaloneCommitGraphs.test.tsx index f238cf40fb..86217199e0 100644 --- a/tests/Unit/StandaloneCommitGraphs.test.tsx +++ b/tests/Unit/StandaloneCommitGraphs.test.tsx @@ -158,7 +158,7 @@ test('keeps the graph of each report apart, even when two people report the same assert.equal(html.match(/data-test="graph-canvas"/g)?.length, 2); }); -test('ends the chain of search results on a dot below the last one', async () => { +test('ends each search result on its own dot, as in a feed', async () => { const html = await render(() => ( /> )); - assert.equal(html.match(/data-test="rail-end-dot"/g)?.length, 1); - // In the last card: past everything the second one shows. - assert.ok( - html.indexOf('data-test="rail-end-dot"') > - html.lastIndexOf('Commit two'), - ); + assert.equal(html.match(/data-test="rail-end-dot"/g)?.length, 3); }); test('draws related commits in a canvas of their own, chained one after the other and ending on a dot below the last one', async () => {