Skip to content

fix(qa): restore styles in example and docs apps#52

Merged
jonmatum merged 2 commits intomainfrom
claude/fix-example-app-styles
Apr 17, 2026
Merged

fix(qa): restore styles in example and docs apps#52
jonmatum merged 2 commits intomainfrom
claude/fix-example-app-styles

Conversation

@jonmatum
Copy link
Copy Markdown
Owner

Summary

Closes three distinct style breakages in the example and docs apps.

  • No Tailwind utility classes generated@import 'tailwindcss' is just a CSS file import; the @tailwindcss/postcss plugin is required to scan sources and emit utilities. Added postcss.config.mjs + @tailwindcss/postcss devDep to both apps.
  • Wrong @source path../../node_modules/… from apps/*/app/globals.css resolved to apps/ (two levels up), completely missing the library. Fixed to ../../../packages/next-shell/src/**/*.{ts,tsx} — PostCSS scans TS source as plain text, no build needed.
  • Sidebar had no <Sidebar> wrapper — the example ShellSidebar passed <SidebarNav> directly into AppShell's sidebar slot. The <Sidebar> component provides the fixed-position panel, gap element, and bg-sidebar surface. Added the full <Sidebar> + <SidebarHeader> + <SidebarContent> shell.

Also: docs-app font wiring (Inter, JetBrains Mono, BigBlue Terminal), dark <html> class, viewport metadata, and next-env.d.ts added to docs .gitignore.

Verification

  • /dashboard — sidebar panel, topbar, 4-column stat cards, loading/empty states all render with full token-driven styles
  • /data — paginated table, status badges, filter input all styled correctly
  • /settings — profile form cards with proper surfaces
  • /admin — role/session/adapter cards render

Checklist

  • No raw color literals
  • Light theme verified via screenshots
  • Pre-commit hooks passed (lint-staged + ESLint)

Refs #13

🤖 Generated with Claude Code

Three root causes fixed:

1. **Tailwind v4 no utility classes** — `@import 'tailwindcss'` alone is
   just a CSS file; it requires the `@tailwindcss/postcss` plugin to scan
   sources and emit utility classes. Added `postcss.config.mjs` +
   `@tailwindcss/postcss` devDep to both apps.

2. **Wrong `@source` glob path** — the old path `../../node_modules/…`
   from `apps/*/app/globals.css` resolved two levels up to `apps/`,
   missing the library entirely. Corrected to
   `../../../packages/next-shell/src/**/*.{ts,tsx}` so Tailwind scans the
   TypeScript source directly (PostCSS reads files as text for class
   names, no compile step needed).

3. **Sidebar missing `<Sidebar>` wrapper** — `ShellSidebar` in the
   example `(shell)/layout.tsx` was rendering `<SidebarNav>` directly
   inside `AppShell`'s sidebar slot without the `<Sidebar>` +
   `<SidebarContent>` shell. The `<Sidebar>` component provides the fixed
   positioning, gap element, and `bg-sidebar` surface; without it the nav
   items floated in the flex flow with no panel behind them.

Also carries docs-app improvements from an earlier session: local
BigBlue Terminal font, dark `<html>` class wired to Inter/JetBrains
font CSS variables, and `viewport` metadata. Added `next-env.d.ts` to
docs `.gitignore` (auto-generated, was triggering ESLint ignore-pattern
warning in lint-staged).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jonmatumdev
jonmatumdev previously approved these changes Apr 17, 2026
Copy link
Copy Markdown
Collaborator

@jonmatumdev jonmatumdev left a comment

Choose a reason for hiding this comment

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

All checks passed. AI review found no issues. Auto-approved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@jonmatumdev jonmatumdev left a comment

Choose a reason for hiding this comment

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

All checks passed. AI review found no issues. Auto-approved.

Copy link
Copy Markdown
Collaborator

@jonmatumdev jonmatumdev left a comment

Choose a reason for hiding this comment

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

All checks passed. AI review found no issues. Auto-approved.

@jonmatum jonmatum marked this pull request as ready for review April 17, 2026 03:09
@jonmatum jonmatum merged commit c857dc7 into main Apr 17, 2026
1 check passed
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