From bb6ce5708719a106b56e05943f5a383ba0fc9aae Mon Sep 17 00:00:00 2001 From: Thomas Petersen Date: Tue, 11 Aug 2026 10:51:03 -0400 Subject: [PATCH] desktop: project lists show the activity bar without count labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Project cards and rows drop the textual commit/PR/issue stats and keep only the segmented activity bar — the exact counts remain in the bar's hover tooltips. Repository lists keep the text stats next to the bar. Signed-off-by: Thomas Petersen --- .../src/features/projects/ui/ProjectCards.tsx | 23 +++++++++-------- .../tests/e2e/project-commit-detail.spec.ts | 25 ++++++++++++------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/desktop/src/features/projects/ui/ProjectCards.tsx b/desktop/src/features/projects/ui/ProjectCards.tsx index c46a800d3..4c387b60c 100644 --- a/desktop/src/features/projects/ui/ProjectCards.tsx +++ b/desktop/src/features/projects/ui/ProjectCards.tsx @@ -171,6 +171,10 @@ const PROJECT_STAT_ITEMS = [ }, ] as const; +/** + * Textual commit/PR/issue counts. Repository lists show these next to the + * activity bar; project lists show the bar alone (counts via its tooltips). + */ export function ProjectStatsRow({ summary, fixedColumns = false, @@ -226,7 +230,10 @@ export function ProjectActivityBar({ // z-10 lifts the bar above the card's full-surface open button so it // can receive hover events. Fixed h-2 wrapper keeps layout stable // while the inner bar grows on hover. -
+
{total > 0 ? items @@ -547,13 +554,8 @@ export function ProjectGridCard({ />
-
-
- -
-
- -
+
+
@@ -618,11 +620,10 @@ export function ProjectListRow({ />
- -
+
diff --git a/desktop/tests/e2e/project-commit-detail.spec.ts b/desktop/tests/e2e/project-commit-detail.spec.ts index 4b386f57e..95e09b505 100644 --- a/desktop/tests/e2e/project-commit-detail.spec.ts +++ b/desktop/tests/e2e/project-commit-detail.spec.ts @@ -73,10 +73,19 @@ test("top-level project lists align dates and overflow actions", async ({ ).toBeVisible(); await expect(page.getByRole("menuitem", { name: "Local" })).toBeVisible(); await page.keyboard.press("Escape"); - const projectPositions = await trailingPositions( - page.locator('[data-testid^="project-row-"]').first(), - { summaryTestId: "projects-row-summary" }, - ); + const projectRow = page.locator('[data-testid^="project-row-"]').first(); + const projectPositions = await trailingPositions(projectRow, { + summaryTestId: "projects-row-summary", + }); + // Project rows show the activity bar alone — counts stay in its tooltips. + await expect( + projectRow + .getByTestId("projects-row-summary") + .getByTestId("project-activity-bar"), + ).toBeVisible(); + await expect( + projectRow.getByTestId("projects-row-summary"), + ).not.toContainText("commits"); await page.getByTestId("projects-section-repositories").click(); await page.getByRole("button", { name: "Filter repositories" }).click(); @@ -100,11 +109,9 @@ test("top-level project lists align dates and overflow actions", async ({ dateTestId: "repositories-row-date", summaryTestId: "repositories-row-summary", }); - expect( - Math.abs( - (repositoryPositions.summaryX ?? 0) - (projectPositions.summaryX ?? 0), - ), - ).toBeLessThanOrEqual(ALIGNMENT_TOLERANCE_PX); + // No summaryX comparison: repository rows carry text stats next to the bar + // while project rows show the bar alone, so the columns differ in width by + // design. The right-anchored date and menu still align across the lists. expect( Math.abs(repositoryPositions.rowHeight - projectPositions.rowHeight), ).toBeLessThanOrEqual(ALIGNMENT_TOLERANCE_PX);