From b9308f9828e30785dbc119e810bdad20e5c26fee Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Thu, 12 Nov 2026 22:15:04 -0600 Subject: [PATCH] fix(ui): keep long agent names inside task columns (#21155) ## Thinking Path > - Paperclip helps people manage AI agents and their work. > - Task views show the assignee and creator in fixed-width columns. > - Long names can extend past those columns and cover adjacent values. > - The identity labels already support text truncation but need a width limit. > - This pull request limits each identity to its task column. > - Names stay on one line, avatars keep their size, and adjacent values stay readable. ## Linked Issues or Issue Description **What happened?** Long agent and human names extend outside the Responsible and Kicked off by columns in task views. **Expected behavior** Names fit inside each column. Long names show an ellipsis. Avatars remain visible. The title attribute retains the full name. **Steps to reproduce** 1. Open a task view with Responsible and Kicked off by columns visible. 2. Use a long agent name for the assignee and creator. 3. Observe names covering adjacent columns. ## What Changed - Limit agent and human identity width to the containing task column. - Add a production-component Storybook example for long names, names without spaces, and short names. - Add browser layout checks for both identity columns, avatar size, full text, adjacent values, and row height in both themes at 640px and 1200px. ## Verification - The browser regression failed before the fix: an identity reached x=424 while its column ended at x=144. - The focused Chromium suite passes all four cases at 640px and 1200px in light and dark modes. - `pnpm --dir ui exec vitest run src/components/IssueColumns.test.tsx src/components/IssuesList.test.tsx`: 83 tests pass. - `pnpm --filter @paperclipai/ui typecheck`: passes. - `node scripts/check-token-gates.mjs` and `git diff --check`: pass. - `pnpm verify` returned exit 2 because the browser test requires broader CI coverage. The complete PR CI run supplies that coverage. - All tests, typecheck, build, and e2e gates pass on final commit `f73568822add60b4659f2cbdad0196fdfe010d3b`: https://github.com/paperclipai/paperclip/actions/runs/43271777908. - The separate commitperclip review passed: https://github.com/paperclipai/paperclip/actions/runs/43271777344. - Greptile gives this commit 5/5. There are no open findings or review threads. - All 61 checks are complete: 57 success, 1 neutral, and 3 skipped. The Storybook workflow was skipped; the focused browser suite passed locally. ## Risks Low risk. The width limit applies only to identity labels in shared task columns. The full name remains in the DOM and the existing title attribute. No API or stored-data changes. ## Model Used OpenAI Codex, based on GPT-6, with code tools and Chromium browser checks. The runtime does not expose a more specific model ID. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip --- .../task-column-identities.spec.ts | 44 +++++++++++++ ui/src/components/IssueColumns.tsx | 8 +-- .../tasks/task-column-identities.stories.tsx | 62 +++++++++++++++++++ 3 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 tests/storybook-visual/task-column-identities.spec.ts create mode 100644 ui/storybook/stories/tasks/task-column-identities.stories.tsx diff --git a/tests/storybook-visual/task-column-identities.spec.ts b/tests/storybook-visual/task-column-identities.spec.ts new file mode 100644 index 00000000000..30e9a46c8fa --- /dev/null +++ b/tests/storybook-visual/task-column-identities.spec.ts @@ -0,0 +1,44 @@ +import { expect, test } from "@playwright/test"; + +for (const width of [640, 1200]) { + for (const theme of ["light", "dark"]) { + test(`task identities fit their columns at ${width}px in ${theme} mode`, async ({ page }) => { + await page.setViewportSize({ width, height: 800 }); + await page.goto(`/iframe.html?id=task-column-identities--long-names&viewMode=story&globals=theme:${theme}`); + await expect(page.getByTestId("agent-spaces").locator('[data-slot="agent-avatar"]')).toHaveCount(2); + await page.evaluate(() => document.fonts.ready); + + for (const id of ["agent-spaces", "agent-unbroken", "human", "short"]) { + const row = page.getByTestId(id); + const cells = row.locator(":scope > span > span"); + await expect(cells).toHaveCount(4); + for (const index of [0, 1]) { + const cell = cells.nth(index); + const identity = cell.locator("[title]"); + const name = await identity.getAttribute("title"); + const metrics = await identity.evaluate(element => { + const cell = element.parentElement!.getBoundingClientRect(); + const identity = element.getBoundingClientRect(); + const avatar = element.firstElementChild!.getBoundingClientRect(); + const text = element.lastElementChild as HTMLElement; + return { + right: identity.right, cellRight: cell.right, + avatarWidth: avatar.width, avatarLeft: avatar.left, cellLeft: cell.left, + textWidth: text.clientWidth, textContentWidth: text.scrollWidth, + overflow: getComputedStyle(text).textOverflow, + }; + }); + expect(metrics.right, `${id} identity escapes column ${index}`).toBeLessThanOrEqual(metrics.cellRight + 1); + expect(metrics.avatarLeft).toBeGreaterThanOrEqual(metrics.cellLeft); + expect(metrics.avatarWidth).toBe(24); + expect(metrics.textWidth).toBeGreaterThan(0); + expect(metrics.textContentWidth > metrics.textWidth).toBe(id !== "short"); + expect(metrics.overflow).toBe("ellipsis"); + await expect(identity.locator(":scope > span").last()).toHaveText(name!); + } + await expect(cells.nth(2)).toHaveText("Paperclip"); + expect((await row.boundingBox())!.height).toBeLessThanOrEqual((await page.getByTestId("short").boundingBox())!.height); + } + }); + } +} diff --git a/ui/src/components/IssueColumns.tsx b/ui/src/components/IssueColumns.tsx index ce0d244856e..54be14b99f0 100644 --- a/ui/src/components/IssueColumns.tsx +++ b/ui/src/components/IssueColumns.tsx @@ -332,7 +332,7 @@ export function InboxIssueTrailingColumns({ ); @@ -345,7 +345,7 @@ export function InboxIssueTrailingColumns({ name={userLabel} avatarUrl={assigneeUserAvatarUrl} size="sm" - className="min-w-0" + className="min-w-0 max-w-full" /> ); @@ -368,7 +368,7 @@ export function InboxIssueTrailingColumns({ @@ -387,7 +387,7 @@ export function InboxIssueTrailingColumns({ name={creatorUserLabel} avatarUrl={creatorUserAvatarUrl} size="sm" - className="min-w-0" + className="min-w-0 max-w-full" /> diff --git a/ui/storybook/stories/tasks/task-column-identities.stories.tsx b/ui/storybook/stories/tasks/task-column-identities.stories.tsx new file mode 100644 index 00000000000..4cb7ddd66b2 --- /dev/null +++ b/ui/storybook/stories/tasks/task-column-identities.stories.tsx @@ -0,0 +1,62 @@ +import type { Meta, StoryObj } from "@storybook/react-vite"; +import { InboxIssueTrailingColumns } from "@/components/IssueColumns"; +import { storybookIssues } from "../../fixtures/paperclipData"; + +const names = [ + { id: "agent-spaces", name: "Research and Engineering Agent With a Very Long Display Name", human: false }, + { id: "agent-unbroken", name: "ResearchAndEngineeringAgentWithAVeryLongUnbrokenDisplayName", human: false }, + { id: "human", name: "Alexandria Morgan With a Very Long Display Name", human: true }, + { id: "short", name: "Ada", human: false }, +]; + +function TaskColumnIdentities() { + return ( +
+ {names.map(({ id, name, human }) => ( +
+ +
+ ))} +
+ ); +} + +const meta = { + id: "task-column-identities", + title: "Tasks and conversations/Task creation and lifecycle/Column identities", + component: TaskColumnIdentities, + parameters: { + layout: "padded", + paperclip: { + capabilities: ["tasks/organize"], + status: "current", + implementation: "production", + boundary: "fixtures", + notes: "Production task columns with long agent and human names, unbroken names, and a fitting-name control. Verifies layout only; assignment and attribution persistence need live acceptance.", + }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; +export const LongNames: Story = {};