Skip to content

feat(frontend): tailwind v4 + shadcn/ui foundation + credentials migration#95

Merged
Gastonfoncea merged 12 commits into
mainfrom
feature/tailwind
May 17, 2026
Merged

feat(frontend): tailwind v4 + shadcn/ui foundation + credentials migration#95
Gastonfoncea merged 12 commits into
mainfrom
feature/tailwind

Conversation

@Gastonfoncea
Copy link
Copy Markdown
Collaborator

Closes #94

Summary

Introduces Tailwind v4 and shadcn/ui to the frontend/ workspace via a coexistence-first strategy, and migrates the first two product sections (ApiKeysSection, ConnectedAppsSection) as a real-world test.

  • Tailwind v4 (@tailwindcss/postcss) + @theme block mapping brand tokens (accent, bg, surface, text variants, fonts) to utility classes
  • shadcn/ui (new-york style, RSC) with components.json, lib/utils.ts (cn helper), and first primitive: Button
  • Smoke test: "Generate" button in credentials swapped to shadcn Button
  • First real migration: outer card + header of ApiKeysSection and ConnectedAppsSection moved to Tailwind utility classes, using the ! modifier convention discovered during this PR
  • Legacy globals.css untouched

The ! modifier convention (new, documented in spec)

The legacy * { padding: 0; margin: 0 } reset is unlayered → beats Tailwind utilities (which live in @layer utilities). We tried @layer legacy wrappers but every layer ordering either failed to override the reset or broke layouts elsewhere via Preflight winning over legacy.

Convention: properties that fight the universal reset use Tailwind's ! suffix (Tailwind v4 syntax), e.g. p-7!padding: 1.75rem !important. Other properties (gap, flex, bg-*, border-*, text-*) work normally without !.

Full rationale + when to apply: see Migration convention — the ! modifier in the spec.

Spec & plan

  • docs/superpowers/specs/2026-05-17-tailwind-adoption-design.md
  • docs/superpowers/plans/2026-05-17-tailwind-adoption-foundation.md

Test plan

  • pnpm typecheck (workspace-wide) passes
  • pnpm test (workspace-wide) passes — 600+ tests green
  • pnpm --filter frontend build succeeds
  • Landing at / renders unchanged (coexistence: legacy CSS untouched)
  • /app/credentials renders with: shadcn Button on Generate, Tailwind-styled outer card + header on both API Keys and Connected Apps sections, list items + modals still use legacy styles intentionally
  • Padding bug confirmed fixed: padding: 1.75rem resolves on the <section> (was 0 before this PR due to the cascade issue)
  • /oauth/authorize — needs test client; not blocking

Out of scope (follow-up issues exist or will)

  • Card primitive, Input/Label, Dialog, Badge, Tabs, Toast — added on demand
  • Migration of the rest of /app/* screens
  • Migration of /oauth/authorize consent screen
  • Landing refactor — deferred indefinitely

🤖 Generated with Claude Code

Gastonfoncea and others added 12 commits May 17, 2026 15:53
Diseño aprobado en brainstorming: instalar Tailwind v4 mapeando tokens
de marca a @theme, aislar el legacy landing CSS al route group
(landing), e iniciar shadcn/ui con Button como smoke-test en
credentials. Migración componente por componente bajo demanda;
refactor full de la landing diferido.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Audit durante planning reveló que globals.css no es CSS de landing
sino el design system de toda la app (clases .dash, .btn, .modal,
.field, etc usadas por /app/* y /oauth/*). El plan original de mover
a (landing) route group habría roto rutas autenticadas.

Estrategia revisada: globals.css se queda en su lugar, se prepende
Tailwind import + @theme. Migración gradual erosiona el legacy a
medida que cada pantalla se mueve a shadcn.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 tareas en 5 fases: install Tailwind v4 → init shadcn → smoke-test
Button en credentials → verificación workspace-wide → PR. Estrategia
coexistencia: globals.css legacy untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Foundation for tailwind adoption (feature/tailwind branch). No styles
change yet — wiring only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tailwindcss/postcss plugin wires Tailwind into Next.js 16's build per
Next docs: node_modules/next/dist/docs/01-app/01-getting-started/11-css.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@import "tailwindcss" at top of globals.css; @theme block exposes
brand colors (accent, bg, surface, text variants) and font slots as
Tailwind utility classes (text-accent, bg-surface, font-display, ...).

Legacy CSS untouched — coexistence strategy per spec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
clsx + tailwind-merge for cn() helper; class-variance-authority for
component variants; lucide-react for icons.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
clsx + tailwind-merge composition used by every shadcn component to
compose className with conflict-aware merging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
new-york style, RSC enabled, aliases match tsconfig paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Smoke-test component for the Tailwind/shadcn foundation. Consumed by
credentials in next commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Smoke-test of the Tailwind + shadcn foundation. Proves end-to-end:
@theme tokens -> @/components/ui/button -> consumed by feature code.
Visual will be tuned to match brand in a follow-up PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… convention

ApiKeysSection and ConnectedAppsSection: outer <section> + header migrated
to Tailwind utility classes. `p-7!` suffix is used so the padding wins
against the legacy unlayered `* { padding: 0; margin: 0 }` reset, which
otherwise beats any `@layer utilities` rule per CSS Cascade L5.

Spec updated with a "Migration convention" section documenting:
 - Why the universal reset was beating utility classes
 - The @layer experiments that broke the rest of the app and were
   reverted
 - The `!` modifier convention for properties that fight the reset
   (padding, margin) during the legacy/Tailwind coexistence period
 - When `!` can be removed (once legacy is fully eradicated)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Gastonfoncea Gastonfoncea requested a review from tomazzi14 as a code owner May 17, 2026 19:53
@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

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

Project Deployment Actions Updated (UTC)
gh-bounty-frontend Ready Ready Preview, Comment May 17, 2026 7:55pm
ghbounty-mcp Ready Ready Preview, Comment May 17, 2026 7:55pm

@Gastonfoncea Gastonfoncea merged commit 747efe3 into main May 17, 2026
5 checks passed
@Gastonfoncea Gastonfoncea deleted the feature/tailwind branch May 17, 2026 19:57
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.

Tailwind v4 + shadcn/ui foundation in frontend

1 participant