Skip to content

epic: agent styling — aurora background, softer radii, popular actions carousel#256

Open
twblack88 wants to merge 10 commits into
mainfrom
epic/agent-styling
Open

epic: agent styling — aurora background, softer radii, popular actions carousel#256
twblack88 wants to merge 10 commits into
mainfrom
epic/agent-styling

Conversation

@twblack88
Copy link
Copy Markdown
Contributor

@twblack88 twblack88 commented May 25, 2026

Summary

Rolls up the epic/agent-styling branch into main. Three big changes are bundled here:

1. Aurora shader background on the empty chat state (#250, SS-5656)

  • Animated WebGPU aurora (via shaders.com) behind the empty chat state on desktop, with a CSS radial-gradient fallback on mobile/no-WebGL.
  • Header and bottom chrome get a bg-background/80 backdrop-blur-md glass treatment when the empty state is visible.
  • Resolved three rendering bugs along the way: missing three dep (added to deps + optimizeDeps), a WebGL context leak from isWebGLAvailable() running every render (cached + released via WEBGL_lose_context), and invalid WGSL identifiers from Math.random()-generated node IDs (fixed by passing explicit id: 'aurora').

2. Softer border radii (#254, SS-5650, closes #242)

  • Global --radius bumped from 0.5rem0.75rem.
  • Composer textarea goes from rounded-lgrounded-2xl for a softer, more modern feel.

3. Popular actions carousel (#255, SS-5653)

  • New PopularActionsCarousel.tsx on the empty-chat state with auto-advance, dot navigation, and pause-on-interaction.
  • POPULAR_ACTIONS order in Chat.tsx reshuffled so the carousel sequence reads more clearly.

Test plan

  • Empty chat state: aurora animates on desktop, gradient fallback shows on mobile / when WebGL is unavailable
  • No WebGL context warnings in console; aurora survives Strict Mode double-mount in dev
  • Sending a message hides the aurora and switches to the normal chat view
  • Composer textarea and other --radius-driven components look correctly rounded across viewports
  • Popular actions carousel auto-advances, pauses on interaction, dot nav works, and the new order reads correctly
  • bun run lint, bun run type-check, bun test all pass

Built with Claude

Summary by CodeRabbit

  • New Features

    • Added Aurora background effect with WebGL rendering and CSS fallback support.
    • Added popular actions carousel for suggested interactions in the chat interface.
  • UI/Style Updates

    • Dashboard header now features a translucent background with blur effect and border.
    • Increased default border radius throughout the app for a more rounded appearance.
    • Input composer styled with more pronounced rounded corners.

Review Change Stack

twblack88 and others added 10 commits May 11, 2026 09:59
Co-authored-by: Cursor <cursoragent@cursor.com>
Uses shaders.com <Shader><Aurora> instead of react-three/fiber — no GLSL,
no render loop, WebGPU-first with WebGL2 fallback built in. ShapeShift
brand palette (purple-500 / green-500 / purple-300) with slow drift.

Gated behind useIsMobile (768px) and a WebGL capability check; falls back
to a CSS radial-gradient on mobile or when WebGL is unavailable. Shader
chunk is lazy-loaded so it doesn't hit the main bundle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ttom

Animation fix: shaders.com IntersectionObserver only calls startAnimation()
on a not-visible → visible transition. Mounting with display:none then
flipping to block on the next animation frame forces that transition.

UI: header, suggestion strip, and composer get bg/80 backdrop-blur-md
so the aurora bleeds through. Header and suggestion strip get a border
to ground them visually against the background.

Built with Claude
The shaders/react Shader component has a StrictMode bug: cleanup doesn't
reset isInitializedRef, so the second (real) mount returns early from
initializeRenderer() and the animation loop never starts.

Switch to createShader() from shaders/js — a plain async function we
call in a useEffect with proper cancel/destroy handling. Lifecycle is
now fully under our control and StrictMode-safe.

Also cranked props: intensity 90, speed 3.5, waviness 70, curtainCount 4.

Built with Claude
…leak, WGSL id

- Add `three` as direct dep so Vite can resolve `three/tsl` (was only in
  bun's internal cache, not on the node_modules resolution path)
- Add `optimizeDeps: { include: ['three'] }` to vite config so Vite
  pre-bundles it before the dynamic `import('shaders/js')` fires
- Cache `isWebGLAvailable()` at module scope and immediately release the
  test context via WEBGL_lose_context — previously leaked one context per
  render, exhausting the browser limit and killing the aurora's context
- Pass explicit `id: 'aurora'` on the shader component so the library
  doesn't auto-generate an ID containing a dot (Math.random()), which
  produced invalid WGSL struct member names and crashed the GPU pipeline
- Add `.nx/` to .gitignore

Built with Claude
Replace static welcome suggestion buttons with a horizontally scrolling popular actions carousel that auto-advances, pauses during hover/focus/touch interaction, and supports mobile swipe navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Observe the canvas's parent container and call shader.resize() explicitly
so the WebGL aurora re-renders to full size after layout changes (e.g.
the sidebar opening/closing). The shader library pins the canvas to fixed
pixels and watches the frozen canvas for resizes, so CSS-driven changes
never reached it.

Also make the mobile CSSFallback more vibrant with layered radial
gradients matching the Aurora palette, instead of a faint two-layer wash.

Built with Claude
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

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

Project Deployment Actions Updated (UTC)
shapeshift-agentic Ready Ready Preview, Comment May 25, 2026 9:03pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

📝 Walkthrough

Walkthrough

This PR delivers an Aurora-enhanced welcome experience for the agentic-chat app. It introduces a WebGL-based animated background with CSS fallback, a carousel of popular actions, integrates both into the empty-state chat UI, softens border radii across the app, and wires in the necessary dependencies and build configuration.

Changes

Aurora-enhanced empty state with action carousel

Layer / File(s) Summary
WebGL Aurora background with CSS fallback
apps/agentic-chat/src/components/AuroraBackground.tsx
WebGL capability detection with context release, CSS radial-gradient fallback, AuroraCanvas with shader initialization, ResizeObserver-driven resize, and error handling that triggers fallback.
PopularActionsCarousel scrollable action buttons
apps/agentic-chat/src/components/PopularActionsCarousel.tsx
Auto-advancing carousel (5s interval) with pause/resume on interaction, requestAnimationFrame scroll tracking to update active index, slide navigation, and dot pagination controls.
Chat empty state with Aurora and PopularActionsCarousel
apps/agentic-chat/src/components/Chat.tsx
Imports AuroraBackground and PopularActionsCarousel, replaces WELCOME_SUGGESTIONS with POPULAR_ACTIONS, renders Aurora background and carousel in empty state, applies translucent composer styling.
Border radii and header styling
apps/agentic-chat/src/styles.css, apps/agentic-chat/src/components/Composer.tsx, apps/agentic-chat/src/app/dashboard/page.tsx
Increases CSS --radius from 0.5rem to 0.75rem, overrides Composer to rounded-2xl, updates Dashboard header with translucent background (bg-background/80), backdrop blur, and bottom border.
Dependencies and Vite optimization
apps/agentic-chat/package.json, apps/agentic-chat/vite.config.mjs, apps/agentic-chat/vite.config.mts
Adds shaders (v^2.5.109) and three dependencies; configures Vite optimizeDeps.include for three pre-bundling.
.gitignore Nx cache entries
.gitignore
Adds .nx/, .nx/cache, and .nx/workspace-data entries to exclude local Nx machine cache.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Chat as Chat Component
  participant Aurora as AuroraBackground
  participant Carousel as PopularActionsCarousel
  participant Shader as Aurora Shader
  
  User->>Chat: Open empty chat
  Chat->>Aurora: Mount with mobile/WebGL check
  Aurora->>Shader: Initialize shader on canvas
  Shader-->>Aurora: Shader ready or init fails
  alt Shader initialized
    Aurora-->>Chat: Render WebGL canvas
  else Init fails or no WebGL
    Aurora-->>Chat: Render CSS fallback gradient
  end
  Chat->>Carousel: Render with POPULAR_ACTIONS
  Carousel-->>Chat: Auto-advance every 5s, pause on hover/touch
  User->>Carousel: Click action button
  Carousel->>Chat: onActionClick callback
  Chat->>User: Submit action, chat begins
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • shapeshift/agentic-chat#250: Implements the same AuroraBackground and Chat integration, plus identical shaders/three and Vite optimizeDeps configuration.

Poem

🌌 Aurora blooms across the screen,
A dancing glow with WebGL sheen,
When chat runs empty, soft and bright,
Carousel guides you through the night! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the three main changes: Aurora background, softer radii, and popular actions carousel, matching the PR's primary objectives.
Linked Issues check ✅ Passed The PR fully implements issue #242 requirements: global --radius bumped from 0.5rem to 0.75rem, Composer textarea changed to rounded-2xl, and styling updates applied to Dashboard and Chat components.
Out of Scope Changes check ✅ Passed All changes are in scope: .gitignore updates support development, Aurora background and PopularActionsCarousel implement the epic styling, package.json/vite configs enable the new shader features, and CSS/component updates align with border-radius and UI objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch epic/agent-styling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/agentic-chat/src/app/dashboard/page.tsx`:
- Line 16: The header's glass styling is always applied; change the JSX in
page.tsx so the <header> element conditionally includes the glass classes
("bg-background/80 backdrop-blur-md") only when the empty-chat state is true
(e.g., use the existing emptyChat / isEmptyChat boolean or selector used to
render the empty state); when not empty, render the header with the normal
non-glass classes (keep border, sizing, and layout classes intact) so the header
appearance matches active chat screens.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a6f2d92-89cb-42cf-9e3f-ba34542218e8

📥 Commits

Reviewing files that changed from the base of the PR and between bdab872 and 71fd57b.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .gitignore
  • apps/agentic-chat/package.json
  • apps/agentic-chat/src/app/dashboard/page.tsx
  • apps/agentic-chat/src/components/AuroraBackground.tsx
  • apps/agentic-chat/src/components/Chat.tsx
  • apps/agentic-chat/src/components/Composer.tsx
  • apps/agentic-chat/src/components/PopularActionsCarousel.tsx
  • apps/agentic-chat/src/styles.css
  • apps/agentic-chat/vite.config.mjs
  • apps/agentic-chat/vite.config.mts

{isSidebarLeftEnabled && <SidebarLeft />}
<SidebarInset className="h-dvh flex flex-col">
<header className="sticky top-0 h-12 flex-shrink-0 flex gap-2 bg-background z-10 px-2 items-center">
<header className="sticky top-0 h-12 flex-shrink-0 flex gap-2 bg-background/80 backdrop-blur-md border-b border-border z-10 px-2 items-center">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Gate glass header styles by empty-chat state.

The new glass treatment is always on. Based on the PR objective, this should only apply when the empty state is visible; otherwise the header styling will be inconsistent during active chats.

Suggested direction
-<header className="sticky top-0 h-12 flex-shrink-0 flex gap-2 bg-background/80 backdrop-blur-md border-b border-border z-10 px-2 items-center">
+<header
+  className={cn(
+    "sticky top-0 h-12 flex-shrink-0 flex gap-2 z-10 px-2 items-center",
+    isEmptyChat
+      ? "bg-background/80 backdrop-blur-md border-b border-border"
+      : "bg-background"
+  )}
+>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/agentic-chat/src/app/dashboard/page.tsx` at line 16, The header's glass
styling is always applied; change the JSX in page.tsx so the <header> element
conditionally includes the glass classes ("bg-background/80 backdrop-blur-md")
only when the empty-chat state is true (e.g., use the existing emptyChat /
isEmptyChat boolean or selector used to render the empty state); when not empty,
render the header with the normal non-glass classes (keep border, sizing, and
layout classes intact) so the header appearance matches active chat screens.

@twblack88 twblack88 requested a review from reallybeard May 26, 2026 17:58
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.

Soften border radii across primary surfaces

1 participant