Skip to content

fix(AgentSidebarHeader): draw the agent window as one shape to kill the header↔body seam#318

Merged
I-am-nothing merged 2 commits into
mainfrom
fix/agent-window-one-shape
Jun 24, 2026
Merged

fix(AgentSidebarHeader): draw the agent window as one shape to kill the header↔body seam#318
I-am-nothing merged 2 commits into
mainfrom
fix/agent-window-one-shape

Conversation

@I-am-nothing

Copy link
Copy Markdown
Contributor

What

The agent sidebar's header tab and message body were two separate cream fills (var(--color-on-background)) meeting edge-to-edge. On fractional-DPI displays (Windows display scaling) that shared edge aliased into a 1px seam — invisible on integer-DPR / retina.

This makes the window one shape. New windowBodyHeight prop on AgentSidebarHeader: when set, the header draws the whole window as a single <Notch notchSide="bottom"> — the rounded body with the active tab notched out of its top edge, filled once — and skips its separate headOnly tab cap. The consumer passes its measured body height and gives the body a transparent background. With no internal edge between header and body, the seam cannot exist on any DPI.

Also realigns the history ("previous conversations") dropdown notch 2px left (left:4→2) after a prior Notch border shift.

Notes

  • Back-compat: without windowBodyHeight, the header draws the original headOnly tab cap unchanged. Shared notch appearance is hoisted into one TAB_NOTCH_BASE object spread by both branches.
  • Patch bump 0.5.13 → 0.5.14 (+ release label).
  • Follow-up considered (not in this PR): longer-term the whole window surface could be owned by a dedicated AgentSidebarWindow wrapper (collapsing this prop + the height round-trip). Deferred — it's a new component + AppShell refactor beyond this seam fix.

Test

  • tsc --noEmit clean; Notch (8) + AgentSidebar (43) tests pass.
  • Verified on the web-landing cinematic across the tab type-out animation (narrow "New Chat" → full title): one continuous shape, no seam.

🤖 Generated with Claude Code

…he header↔body seam

Add a `windowBodyHeight` prop. When set, the header renders the whole
window as a single <Notch notchSide="bottom"> — the rounded body with
the active tab notched out of its top edge, filled once — instead of a
separate headOnly tab cap. The tab and body become one surface, so the
1px header↔body seam that aliased on fractional-DPI (Windows) displays
can no longer exist; it stays invisible on integer-DPR/retina too.

Back-compat: without windowBodyHeight the header draws the original
headOnly tab cap unchanged. Shared notch appearance is hoisted into one
TAB_NOTCH_BASE object spread by both branches.

Also nudge the history (previous-conversations) dropdown 2px left
(left:4→2) to realign its notch after a prior Notch border shift.

Bump 0.5.13 → 0.5.14.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@I-am-nothing I-am-nothing added the release Trigger a version bump on merge label Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Storybook Preview: https://mirrorstack-ai.github.io/web-ui-kit/pr/318/

github-actions Bot added a commit that referenced this pull request Jun 23, 2026
… actually used

AppShell and the AgentSidebar stories assembled the window the old way —
<AgentSidebarHeader> (active-tab cap) above a SEPARATE bg-on-background
body — so they kept the 1px header↔body seam even though the header now
supports windowBodyHeight.

Both now measure the body container's height (ResizeObserver) and pass
windowBodyHeight to the header, and strip the body's bg-on-background +
rounded-2xl so the single Notch window shape shows through. The three
full-window stories (EmptyState, EmptyStateNoLogo, Playground) share one
new WindowFrame helper instead of each hand-rolling the assembly.

Every platform app renders the agent window through AppShell, so this is
what removes the seam everywhere — not just where windowBodyHeight is set
by hand. AgentSidebarInput's root is transparent, so nothing re-covers
the shape at the window bottom.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Jun 23, 2026
@I-am-nothing I-am-nothing merged commit 4ce9b00 into main Jun 24, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in MirrorStack Platform Jun 24, 2026
github-actions Bot added a commit that referenced this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Trigger a version bump on merge

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant