Skip to content

fix(ui): refine kanna-inspired menu and chat polish#614

Open
StanGirard wants to merge 2 commits intomainfrom
fix/ui-kanna-polish-pass2
Open

fix(ui): refine kanna-inspired menu and chat polish#614
StanGirard wants to merge 2 commits intomainfrom
fix/ui-kanna-polish-pass2

Conversation

@StanGirard
Copy link
Copy Markdown
Contributor

Summary

  • apply a second polish pass to the Kanna-inspired redesign of sidebar + chat surfaces
  • tighten sidebar density (project headers, session rows, separators) and refine top workspace tabs
  • improve readability/contrast and tone down chat background grain for a cleaner message canvas

Why

  • the first pass was close, but still visually too soft and slightly loose in spacing
  • this pass brings the UI closer to the target aesthetic while keeping existing interaction behavior

Testing

  • cd web && bun run typecheck
  • cd web && bun run test -- src/components/Sidebar.test.tsx src/components/TopBar.test.tsx src/components/ChatView.test.tsx src/components/MessageBubble.test.tsx src/components/MessageFeed.test.tsx src/components/SessionItem.test.tsx src/components/ProjectGroup.test.tsx

Review provenance

  • Implemented by AI agent
  • Human review: no

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 21, 2026

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

Project Deployment Actions Updated (UTC)
companion Ready Ready Preview, Comment Mar 21, 2026 7:44pm

Request Review

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="web/src/index.css">

<violation number="1" location="web/src/index.css:292">
P2: The new `.kanna-panel` base styles override warning `border-*`/`bg-*` utilities, so reconnect/disconnect banners lose their warning tint.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread web/src/index.css Outdated
Comment on lines 292 to 296
.kanna-panel {
border: 1px solid var(--color-cc-border);
border-radius: 14px;
background: color-mix(in srgb, var(--color-cc-card) 94%, var(--color-cc-bg) 6%);
}
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Mar 21, 2026

Choose a reason for hiding this comment

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

P2: The new .kanna-panel base styles override warning border-*/bg-* utilities, so reconnect/disconnect banners lose their warning tint.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/src/index.css, line 292:

<comment>The new `.kanna-panel` base styles override warning `border-*`/`bg-*` utilities, so reconnect/disconnect banners lose their warning tint.</comment>

<file context>
@@ -281,7 +281,18 @@
+  background-size: 18px 18px;
+}
+
+.kanna-panel {
+  border: 1px solid var(--color-cc-border);
+  border-radius: 14px;
</file context>
Suggested change
.kanna-panel {
border: 1px solid var(--color-cc-border);
border-radius: 14px;
background: color-mix(in srgb, var(--color-cc-card) 94%, var(--color-cc-bg) 6%);
}
.kanna-panel {
border-radius: 14px;
}
Fix with Cubic

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 21, 2026

Greptile Summary

This PR applies a second visual polish pass to the Kanna-inspired redesign: it overhauls the colour palette to a cooler blue-grey tone, tightens sidebar density, redesigns the TopBar workspace tabs from a bottom-border indicator to a pill/box style, adds a dot-grain texture to the chat canvas, and bumps the sidebar width from 260 px to 288 px. All changes are UI-only with no backend, WebSocket, or state-management impact.

  • CSS cascade bug (P1): .kanna-panel is defined outside any @layer in index.css. In Tailwind v4 all utilities live inside @layer utilities, so unlayered CSS silently wins the cascade. The border shorthand and background property inside .kanna-panel therefore override the border-cc-warning/20 and bg-cc-warning/5 Tailwind classes applied to the CLI-disconnected and WebSocket-reconnecting banners in ChatView.tsx — stripping them of their warning-state visual distinction. The existing @layer base block for :focus-visible (with the comment "so Tailwind utilities can override it") shows the team already understands this pattern; .kanna-panel should be wrapped in @layer components to match.
  • Inconsistent app name (P2): The Sidebar header was renamed from "The Companion" to "Companion", but LoginPage.tsx, HomePage.tsx, MessageFeed.tsx, and DockerUpdateDialog.tsx still display "The Companion". Users will see two different names depending on which surface they look at.
  • No Playground update: MessageBubble, Composer, MessageFeed, and ChatView were all changed. Per the repository's review rules, Playground.tsx should be updated alongside changes to these components. Since no props or behaviour changed, the existing mocks still render correctly, but a follow-up pass to sync the playground's visual state is recommended.

Confidence Score: 3/5

  • Safe to merge after fixing the kanna-panel CSS cascade issue; all other changes are purely cosmetic with no functional regressions.
  • The P1 cascade bug means that in the production build the CLI-disconnected and WebSocket-reconnecting banners silently lose their warning colour treatment, making an already-problematic state harder for users to notice. That is a real visual regression even though no data or logic is affected. The remaining issues (inconsistent app name, missing playground sync) are P2 follow-ups that don't block merge on their own, but the cascade fix is a targeted, low-risk one-liner that should land in the same PR.
  • web/src/index.css (kanna-panel layer placement) and web/src/components/ChatView.tsx (warning banner classes)

Important Files Changed

Filename Overview
web/src/components/ChatView.tsx Warning banners now use .kanna-panel with Tailwind override classes that the unlayered CSS will silently win, stripping the warning-tinted border and background from both the CLI-disconnected and WebSocket-reconnecting states.
web/src/index.css New .kanna-panel (border + background shorthand) and .chat-grain classes added outside any @layer, causing the former to silently suppress Tailwind utility overrides wherever it is combined with warning/accent colours; .font-sans-ui font stack updated to prefer Avenir Next.
web/src/components/Sidebar.tsx Sidebar width bumped to 288 px (matches App.tsx), density tightened, border/footer styling refined; app name changed to "Companion" but not propagated to other surfaces.
web/src/App.tsx Sidebar breakpoint width updated from 260 px to 288 px, consistent with Sidebar.tsx change.
web/src/components/TopBar.tsx Header height increased to 48 px, workspace tabs restyled from bottom-border to pill/box variant; no behaviour or prop changes.
web/src/components/MessageBubble.tsx User bubble border-radius and max-width tweaked, assistant avatar SVG path updated to a star variant, thinking-block contrast raised; purely cosmetic.
web/src/components/MessageFeed.tsx Feed max-width widened to 860 px, padding and spacing reduced for tighter density; no logic changes.
web/src/components/Composer.tsx Composer container background-opacity adjusted, border-radius reduced to 14 px, action bar gets a top separator, textarea gains leading-relaxed; no behaviour changes.
web/src/components/ProjectGroup.tsx Header and separator spacing tightened, label contrast slightly increased; cosmetic only.
web/src/components/SessionItem.tsx Session rows gain explicit border for active/hover states, codex badge colour updated for both light and dark themes; cosmetic only.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    CSS["index.css\n.kanna-panel (no @layer)\nborder + background shorthand"]
    TW["Tailwind @layer utilities\nborder-cc-warning/20\nbg-cc-warning/5"]
    CASCADE{"CSS Cascade\nunlayered > @layer utilities"}
    BANNER["Warning Banners in ChatView\nCLI-disconnected\nWebSocket-reconnecting"]
    RESULT_BAD["⚠️ Warning colour\noverride silently lost"]
    RESULT_OK["✅ .kanna-panel inside\n@layer components\nTailwind wins"]

    CSS -->|"wins cascade"| CASCADE
    TW -->|"loses cascade"| CASCADE
    CASCADE -->|"current behaviour"| BANNER
    BANNER --> RESULT_BAD

    CSS -.->|"fix: wrap in @layer components"| RESULT_OK
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: web/src/components/ChatView.tsx
Line: 62

Comment:
**`.kanna-panel` CSS cascade overrides warning-state Tailwind utilities**

`.kanna-panel` is defined **outside any `@layer`** in `index.css`, which in Tailwind v4 means it sits in the "unlayered" scope and has higher cascade priority than any Tailwind utility inside `@layer utilities`. This causes two concrete problems on both warning banners (this line and line 102):

1. `kanna-panel`'s `border: 1px solid var(--color-cc-border)` overrides `border-cc-warning/20` — the warning-tinted border colour is never applied.
2. `kanna-panel`'s `background: color-mix(...)` overrides `bg-cc-warning/5` — the warning background tint is never applied.

As a result, the "CLI disconnected" and "WebSocket reconnecting" banners are visually indistinguishable from any other `kanna-panel` card. The comment at line 316 of `index.css` (`"Wrapped in @layer base so Tailwind utilities can override it"`) shows the team is already aware of this pattern — `.kanna-panel` should follow the same approach if you want Tailwind overrides to win.

**Fix option A — define `.kanna-panel` inside `@layer components`** (Tailwind utilities will then override it):
```css
@layer components {
  .kanna-panel {
    border: 1px solid var(--color-cc-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-cc-card) 94%, var(--color-cc-bg) 6%);
  }
}
```

**Fix option B — remove the `border` and `background` properties from `.kanna-panel`** and apply them only via Tailwind classes at each call-site (keeping `border-radius` in the class).

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: web/src/components/Sidebar.tsx
Line: 488

Comment:
**Inconsistent app name across the UI**

The sidebar header was shortened to `"Companion"` but `"The Companion"` is still used in at least four other surfaces:
- `web/src/components/LoginPage.tsx` (h1 text + `HomePage.test.tsx` assertions at lines 345, 1156)
- `web/src/components/HomePage.tsx` (hero text + alt attribute)
- `web/src/components/MessageFeed.tsx` (empty-state copy)
- `web/src/components/DockerUpdateDialog.tsx` (two notification strings)

The existing `LoginPage.test.tsx:50` (`getByText("The Companion")`) and `HomePage.test.tsx:345/1156` will keep passing because they query those other components, but a user navigating between the sidebar and the home/login pages will see two different names. Either update all surfaces or revert this one.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "fix(ui): refine kann..."

{/* CLI disconnected / reconnecting / error banner */}
{showCliBanner && (
<div className="px-4 py-2.5 bg-gradient-to-r from-cc-warning/8 to-cc-warning/4 border-b border-cc-warning/15 flex items-center justify-center gap-3 animate-[fadeSlideIn_0.3s_ease-out]">
<div className="mx-3.5 mt-2.5 px-3.5 py-2 kanna-panel border-cc-warning/20 bg-cc-warning/5 flex items-center justify-center gap-3 animate-[fadeSlideIn_0.3s_ease-out]">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 .kanna-panel CSS cascade overrides warning-state Tailwind utilities

.kanna-panel is defined outside any @layer in index.css, which in Tailwind v4 means it sits in the "unlayered" scope and has higher cascade priority than any Tailwind utility inside @layer utilities. This causes two concrete problems on both warning banners (this line and line 102):

  1. kanna-panel's border: 1px solid var(--color-cc-border) overrides border-cc-warning/20 — the warning-tinted border colour is never applied.
  2. kanna-panel's background: color-mix(...) overrides bg-cc-warning/5 — the warning background tint is never applied.

As a result, the "CLI disconnected" and "WebSocket reconnecting" banners are visually indistinguishable from any other kanna-panel card. The comment at line 316 of index.css ("Wrapped in @layer base so Tailwind utilities can override it") shows the team is already aware of this pattern — .kanna-panel should follow the same approach if you want Tailwind overrides to win.

Fix option A — define .kanna-panel inside @layer components (Tailwind utilities will then override it):

@layer components {
  .kanna-panel {
    border: 1px solid var(--color-cc-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-cc-card) 94%, var(--color-cc-bg) 6%);
  }
}

Fix option B — remove the border and background properties from .kanna-panel and apply them only via Tailwind classes at each call-site (keeping border-radius in the class).

Prompt To Fix With AI
This is a comment left during a code review.
Path: web/src/components/ChatView.tsx
Line: 62

Comment:
**`.kanna-panel` CSS cascade overrides warning-state Tailwind utilities**

`.kanna-panel` is defined **outside any `@layer`** in `index.css`, which in Tailwind v4 means it sits in the "unlayered" scope and has higher cascade priority than any Tailwind utility inside `@layer utilities`. This causes two concrete problems on both warning banners (this line and line 102):

1. `kanna-panel`'s `border: 1px solid var(--color-cc-border)` overrides `border-cc-warning/20` — the warning-tinted border colour is never applied.
2. `kanna-panel`'s `background: color-mix(...)` overrides `bg-cc-warning/5` — the warning background tint is never applied.

As a result, the "CLI disconnected" and "WebSocket reconnecting" banners are visually indistinguishable from any other `kanna-panel` card. The comment at line 316 of `index.css` (`"Wrapped in @layer base so Tailwind utilities can override it"`) shows the team is already aware of this pattern — `.kanna-panel` should follow the same approach if you want Tailwind overrides to win.

**Fix option A — define `.kanna-panel` inside `@layer components`** (Tailwind utilities will then override it):
```css
@layer components {
  .kanna-panel {
    border: 1px solid var(--color-cc-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-cc-card) 94%, var(--color-cc-bg) 6%);
  }
}
```

**Fix option B — remove the `border` and `background` properties from `.kanna-panel`** and apply them only via Tailwind classes at each call-site (keeping `border-radius` in the class).

How can I resolve this? If you propose a fix, please make it concise.

@StanGirard
Copy link
Copy Markdown
Contributor Author

Addressed the review feedback in commit 3aaf392:\n- wrapped .kanna-panel in @layer components so warning utility classes can override correctly\n- restored sidebar title to The Companion for naming consistency\n\n@Greptile please re-review this PR.

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.

2 participants