From 991f773d7f80d79a46899c2a6fc7cf888895f17b Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:22:27 -0600 Subject: [PATCH] fix(ui): align recent task status icons and move fold controls right (#21859) ## Thinking Path > - Paperclip helps people manage AI agents for work. > - The sidebar shows recent tasks and their subtasks. > - A left fold control moves parent tasks away from the status column. > - Status icons must stay in one column so people can scan tasks. > - This pull request moves the fold control to the right. > - The child guide now starts below the parent status icon. ## Linked Issues or Issue Description Follow-up to #21649. Related sidebar alignment work: #20926. Related experimental Recents work: #12314. This change corrects the status column in the shipped subtask group. **What happened?** Parent tasks with subtasks moved 20 pixels to the right. Their status icons did not align with tasks that had no subtasks. **Expected behavior** All top-level task status icons align. The child guide is centered below the parent status icon. The fold control is on the right. **Steps to reproduce** 1. Open a sidebar with a recent parent task and a task that has no subtasks. 2. Compare their status icons. 3. Expand the parent and compare the child guide with its status icon. ## What Changed - Remove the left offset from parent task rows. - Put the fold control in a separate right slot. - Center the child guide below the parent status slot. - Add browser checks for alignment, narrow rows, unread parents, both themes, and separate Classic menu and fold controls. ## Verification - The browser regression failed before the fix: the status icons differed by 20 pixels. - Final browser run: 44 checks passed. It covers 20 states in both themes, folding, paging, unread state, light and dark alignment, and the Classic action menu. - The focused component and request-performance suites passed: 46 tests. - Final source is based on master `29903bed59b1`. UI typecheck and the focused browser-test typecheck passed. The published head is `b8287aec1f55aa182b44622d72b20fe7ed7ce0e6`. Its tree matches the tested local tree `958e8d901ed1fec9ae17c164271eda4d25edca45`. - `pnpm verify --base origin/master` returned exit 2. It requires broad CI because the browser suite changed. Focused checks pass. [CI 43803650911](https://github.com/paperclipai/paperclip/actions/runs/43803650911) passes typecheck, build, all eight E2E shards, policy, Runner checks, all nine serialized server suites, all twelve general server shards, and [final verification](https://github.com/paperclipai/paperclip/actions/runs/43803650911/job/133095032900). All 62 check runs are clean: 57 success, 3 skipped, and 2 neutral. No checks are pending or failed. The legacy Snyk status also passes. - [Greptile review](https://github.com/paperclipai/paperclip/pull/21859#issuecomment-6907272673) is 5/5 on head `b8287aec1f55aa182b44622d72b20fe7ed7ce0e6`. The check passed. There are no review threads or actionable findings. The separate source review also reports 5/5. - Screenshots use production components with HTTP and session fixtures in Chromium on Linux. No deployed-instance or image-baseline comparison is claimed. - No database or API behavior changes. ## Risks Low risk. The change adjusts layout in the shared task group. The fold button remains separate from the task link and the Classic action menu. Exact unread counts and request limits keep their current behavior. ## Model Used OpenAI Codex, GPT-6. Exact deployment model ID was not supplied by the runtime. ## Checklist - [x] I have searched GitHub for duplicate or related PRs and linked them above - [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 (this is a sidebar layout bug fix) - [x] I have linked public issues or described the issue in this PR - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub references) - [x] My branch name describes the change and has no internal task ID - [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 (no command or subsystem behavior change) - [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 --- .../storybook-visual/recent-subtasks.spec.ts | 42 +++++++++++++++++++ ui/src/components/RecentTaskGroup.tsx | 8 ++-- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/tests/storybook-visual/recent-subtasks.spec.ts b/tests/storybook-visual/recent-subtasks.spec.ts index 8d1ba35e44e..84ffb394a42 100644 --- a/tests/storybook-visual/recent-subtasks.spec.ts +++ b/tests/storybook-visual/recent-subtasks.spec.ts @@ -63,3 +63,45 @@ test("fold, keyboard, overflow and parent navigation preserve personal unread st await parent.click(); await expect(group.getByLabel("Unread")).toHaveCount(9); }); + +for (const theme of ["light", "dark"]) test(`parent status icons align with leaves and the child guide, with the fold control on the right in ${theme}`, async ({ page }) => { + for (const state of ["expanded", "collapsed", "narrow", "parent-unread-children-read"]) { + await open(page, state, theme); + const parent = page.getByRole("link", { name: /Ship the project workspace/ }); + const leaf = page.getByRole("link", { name: /Review the company dashboard/ }); + const parentIcon = await parent.locator('[data-slot="sidebar-nav-icon"]').boundingBox(); + const leafIcon = await leaf.locator('[data-slot="sidebar-nav-icon"]').boundingBox(); + const parentBounds = await parent.boundingBox(); + const fold = await page.getByRole("button", { name: /^(Collapse|Expand) subtasks of Ship/ }).boundingBox(); + expect(parentIcon).not.toBeNull(); + expect(leafIcon).not.toBeNull(); + expect(Math.abs(parentIcon!.x - leafIcon!.x)).toBeLessThanOrEqual(0.5); + expect(fold!.x).toBeGreaterThanOrEqual(parentBounds!.x + parentBounds!.width); + if (state !== "collapsed") { + const guide = await page.getByRole("group", { name: "Subtasks of Ship the project workspace", exact: true }).boundingBox(); + expect(Math.abs(guide!.x + 0.5 - (parentIcon!.x + parentIcon!.width / 2))).toBeLessThanOrEqual(0.5); + } + } +}); + +test("Classic parent actions remain separate from the right fold control", async ({ page }) => { + await open(page, "classic"); + const parent = page.getByRole("link", { name: /Ship the project workspace/ }); + const leaf = page.getByRole("link", { name: /Review the company dashboard/ }); + expect((await parent.boundingBox())!.x).toBe((await leaf.boundingBox())!.x); + const fold = page.getByRole("button", { name: "Collapse subtasks of Ship the project workspace", exact: true }); + const menu = page.getByRole("button", { name: "More actions for Ship the project workspace", exact: true }); + await parent.hover(); + await expect(menu).toBeVisible(); + const menuBounds = (await menu.boundingBox())!; + const foldBounds = (await fold.boundingBox())!; + expect(menuBounds.x + menuBounds.width).toBeLessThanOrEqual(foldBounds.x); + const url = page.url(); + await menu.click(); + await expect(page.getByRole("menuitem", { name: "Rename", exact: true })).toBeVisible(); + await page.keyboard.press("Escape"); + await expect(fold).toHaveAttribute("aria-expanded", "true"); + await fold.click(); + await expect(page.getByRole("button", { name: "Expand subtasks of Ship the project workspace", exact: true })).toHaveAttribute("aria-expanded", "false"); + expect(page.url()).toBe(url); +}); diff --git a/ui/src/components/RecentTaskGroup.tsx b/ui/src/components/RecentTaskGroup.tsx index 791aed79b30..ebbc1859a05 100644 --- a/ui/src/components/RecentTaskGroup.tsx +++ b/ui/src/components/RecentTaskGroup.tsx @@ -93,17 +93,17 @@ function ExpandableRecentTaskGroup({ task, userId, selectedChild, children, clas if (!count || rail) return <>{children}; return
-
-
{children}
+
+
{children}
{!expanded ? :
+ :
{(view.kind === "loading" || view.kind === "reconnecting") &&

Loading subtasks…

} {displayed.map(child =>
{childRow({ ...child, recordedAt: 0 })}
)} {pinned && childRow(pinned)}