fix(ui): drop top margin and border on first contextual sidebar section (#17412)

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.

<!-- Write all pull request text in Simplified Technical English
(ASD-STE100): short sentences, one instruction per sentence, simple
approved vocabulary, and the active voice. -->

## 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: 
<img width="585" height="410" alt="Screenshot 2026-10-24 at 10 14 36 AM"
src="https://github.com/user-attachments/assets/12c35f5f-7993-4fdb-89b2-df3394859bf8"
/>
After:
<img width="560" height="377" alt="Screenshot 2026-10-24 at 10 14 24 AM"
src="https://github.com/user-attachments/assets/92e1f7ab-f4c0-48ac-832a-a3726770deac"
/>


## 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 <noreply@anthropic.com>
This commit is contained in:
SudheerandClaude Opus 5.5 authored and GitHub committed 2026-10-27 20:42:28 -07:00
1 parent c9213d1be4
commit 70c8646337
2 files changed
+17 -1

No files matched your search

@@ -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");
});
});
@@ -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: