From 70c864633744cd96c0dc7394d631fc7119cd17d2 Mon Sep 17 00:00:00 2001 From: Sudheer Date: Wed, 28 Oct 2026 09:12:28 +0530 Subject: [PATCH] fix(ui): drop top margin and border on first contextual sidebar section (#17412) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first section in the contextual sidebar rendered a leading top margin and divider with nothing above it. Use first: variants so only sections that follow another section get the spacing and border. ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - The board UI has contextual sidebars, such as Skills, Apps, and Agent > - These sidebars share one set of style constants in `contextual-sidebar-styles.ts` > - Each section in the sidebar has a top margin and a top border to separate it from the section above > - The first section has no section above it, but it still shows the margin and the border > - This pull request adds `first:` variants to the section style > - The first section now sits flush at the top, and the other sections keep their divider ## Linked Issues or Issue Description **What existing behavior does this improve?** The section style in the contextual sidebar. It adds a top margin and a top border to every section. **Subsystem affected** UI (`ui/src/components/contextual-sidebar-styles.ts`) **Current behavior** The first section in the sidebar shows a top margin and a divider line. Nothing is above it, so the divider looks wrong and wastes space. **Proposed behavior** The first section has no top margin and no top border. Each later section keeps its margin and divider. **Reason and benefit** The sidebar looks cleaner at the top. The change is small and uses only existing design tokens. **Breaking changes** None. ## What Changed - Added `first:mt-0 first:border-t-0` to `contextualSidebarStyles.section` in `ui/src/components/contextual-sidebar-styles.ts`. Before: Screenshot 2026-10-24 at 10 14 36 AM After: Screenshot 2026-10-24 at 10 14 24 AM ## Verification - Run `pnpm check:token-gates`. It passes. - Open a page that uses a contextual sidebar, such as Skills or Apps. - Check that the first section has no top gap and no divider. - Check that the later sections still show their divider. ## Risks - Low risk. The change affects only the spacing and the top border of the first sectio - Several sidebars share this style, so check each one: Apps, Skills, Agent, and Chat detail. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Provider: Anthropic - Model: Claude Opus 5.5 (`claude-opus-5-5`) made the commit. Claude Sonnet 5.5 (`claude-sonnet-5-5`) helped review the change afterward. - Capabilities: tool use and code execution in Claude Code (CLI). - The one-line style change is human-authored. ## 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 puub.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 - [ ] 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: Claude Opus 5.5 --- .../components/contextual-sidebar-styles.test.ts | 16 ++++++++++++++++ ui/src/components/contextual-sidebar-styles.ts | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ui/src/components/contextual-sidebar-styles.test.ts diff --git a/ui/src/components/contextual-sidebar-styles.test.ts b/ui/src/components/contextual-sidebar-styles.test.ts new file mode 100644 index 00000000000..10c5ddf2c4e --- /dev/null +++ b/ui/src/components/contextual-sidebar-styles.test.ts @@ -0,0 +1,16 @@ +import { describe, expect, it } from "vitest"; +import { contextualSidebarStyles } from "./contextual-sidebar-styles"; + +describe("contextualSidebarStyles.section", () => { + it("separates later sections with a margin and a top border", () => { + const classes = contextualSidebarStyles.section.split(" "); + expect(classes).toContain("mt-4"); + expect(classes).toContain("border-t"); + }); + + it("removes the margin and border from the first section", () => { + const classes = contextualSidebarStyles.section.split(" "); + expect(classes).toContain("first:mt-0"); + expect(classes).toContain("first:border-t-0"); + }); +}); diff --git a/ui/src/components/contextual-sidebar-styles.ts b/ui/src/components/contextual-sidebar-styles.ts index 3b05540f597..a88989b7f6d 100644 --- a/ui/src/components/contextual-sidebar-styles.ts +++ b/ui/src/components/contextual-sidebar-styles.ts @@ -7,7 +7,7 @@ export const contextualSidebarStyles = { nav: "flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-auto-hide px-3 py-2", group: "flex flex-col gap-0.5", - section: "mt-4 border-t border-border pt-3", + section: "mt-4 border-t border-border pt-3 first:mt-0 first:border-t-0", sectionLabel: "px-2 pb-1 text-(length:--text-micro) font-semibold uppercase tracking-wide text-muted-foreground", sectionDescription: