Skip to content

feat: SW-2592 differentiate the assistant panel in AssistantLayout - #216

Open
boramyi-ts wants to merge 1 commit into
mainfrom
SW-2592-assistant-layout-surface
Open

feat: SW-2592 differentiate the assistant panel in AssistantLayout#216
boramyi-ts wants to merge 1 commit into
mainfrom
SW-2592-assistant-layout-surface

Conversation

@boramyi-ts

@boramyi-ts boramyi-ts commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

SW-2592 — differentiate the assistant panel (AI agent layout manager)

AssistantLayout rendered the assistant panel and the content panel with the same bg-card card, so the assistant was indistinguishable from the content next to it.

Unlike DataAppShellRightPanel, the panels here are already raised (bg-card) — so this isn't the "panel = body background" bug. The fix is differentiation, and since consumers pass a self-contained assistant (its own messages + composer), the layout manager now owns an optional accent header cap.

API

  • New props: assistantTitle (+ assistantIcon, assistantHeaderActions, showAssistantClose). When assistantTitle is set, a bg-accent header band renders above the assistant slot; its close button hides the panel via the provider.
  • Backward compatible — no title → no cap → existing behavior.
  • The content panel never gets a cap, so the two read as distinct across all docks (right/left/bottom), light + dark.
  • Dock controls stay in the top bar (AssistantDockControls, untouched).

Before → After

Before, the assistant panel is the same card as the content with only its own plain header. After, an accent header cap brands it and sets it apart; the composer sits in a muted tray.

Before (light) After (light)
before light after light
Before (dark) After (dark)
before dark after dark

Bottom dock (after): bottom

Testing

  • yarn typecheck ✓ · yarn lint ✓ (0 warnings) · Storybook play 4/4, incl. a new assertion in Docked Right: the cap's background ≠ the content panel's, and close hides the panel.

🤖 Generated with Claude Code

Both AssistantLayout panels used the same bg-card card, so the assistant
panel was indistinguishable from the content panel. Add an optional accent
header cap (assistantTitle + icon/actions + close) rendered above the
assistant slot — the content panel never gets one, so the two read as
distinct. Backward compatible: no title → no cap, existing behavior.

- New props: assistantTitle, assistantIcon, assistantHeaderActions,
  showAssistantClose. Close hides the panel via the provider's setVisible.
- Story: MockAssistant drops its own header (now the cap) and puts the
  composer in a muted tray; a play assertion verifies the cap's background
  differs from the content and that close hides the panel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
ts-lib-ui-kit-storybook Ignored Ignored Sep 11, 2026 2:34pm UTC

Request Review

@unblocked unblocked Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues found

About Unblocked

Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.

📖 Documentation — Learn more in our docs.

💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions.

👍 Give feedback — React to comments with 👍 or 👎 to help us improve.

⚙️ Customize — Adjust settings in your preferences.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 96.94% (🎯 83%)
🟰 ±0%
24752 / 25531
🟢 Statements 96.94% (🎯 83%)
🟰 ±0%
24752 / 25531
🟢 Functions 94.62% (🎯 74%)
⬆️ +0.01%
1179 / 1246
🟢 Branches 90.76% (🎯 81%)
⬇️ -0.01%
4982 / 5489
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/composed/AssistantLayout/AssistantLayout.tsx 100%
🟰 ±0%
92.15%
⬇️ -1.72%
100%
🟰 ±0%
100%
🟰 ±0%
Generated in workflow #1238 for commit a97caa9 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant