From b35848ef7f6125137e38163b21e59e7d3e22f70a Mon Sep 17 00:00:00 2001 From: Dylan Trotter Date: Tue, 27 Oct 2026 15:43:50 +0000 Subject: [PATCH] stewards: show the full thread title on hover in the sidebar (BB-84) --- plugins/stewards/app.tsx | 2 ++ plugins/stewards/sidebar-app.test.tsx | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/plugins/stewards/app.tsx b/plugins/stewards/app.tsx index 955e5de7..e88e88be 100644 --- a/plugins/stewards/app.tsx +++ b/plugins/stewards/app.tsx @@ -1174,6 +1174,7 @@ function SidebarThreadRow({ { e.preventDefault(); navigate.toThread(thread.id); @@ -1319,6 +1320,7 @@ function SidebarEffortRow({ { e.preventDefault(); navigate.toThread(root.id); diff --git a/plugins/stewards/sidebar-app.test.tsx b/plugins/stewards/sidebar-app.test.tsx index a1f3a903..3f9d47b9 100644 --- a/plugins/stewards/sidebar-app.test.tsx +++ b/plugins/stewards/sidebar-app.test.tsx @@ -179,6 +179,27 @@ describe("the stewards sidebar list (BB-44)", () => { slot.lifecycle.unmount(); }); + // BB-84: a truncated title is still readable on hover, through the native + // `title` tooltip on the row's title anchor. + it("puts the thread's full display title on the row's title anchor as a tooltip", async () => { + const plainTitle = "A one-off thread whose long title the sidebar truncates"; + const slot = await renderSidebar({ + sidebarThreads: { + projects, + threads: [thread({ id: "thr_steward", displayTitle: "ENG-1: Fix login" }), thread({ id: "thr_oneoff", displayTitle: plainTitle })], + }, + rpc: { stewardsSidebar: () => sidebarData({ bindings: [binding()] }) } as never, + }); + // The effort row's own title anchor carries the full title. + const effortAnchor = (await waitFor(() => slot.getByText("Fix login"))).closest("a")!; + expect(effortAnchor.getAttribute("title")).toBe("ENG-1: Fix login"); + // So does a plain thread row's title anchor. + fireEvent.click(slot.getByRole("button", { name: /Threads/u })); + const plainAnchor = (await waitFor(() => slot.getByText(plainTitle))).closest("a")!; + expect(plainAnchor.getAttribute("title")).toBe(plainTitle); + slot.lifecycle.unmount(); + }); + it("shortens a pull-request key to #N and spells out the kind", async () => { const slot = await renderSidebar({ sidebarThreads: { projects, threads: [thread({ id: "thr_steward", displayTitle: "acme/web#612: Read dashboard metrics" })] },