Skip to content

fix(showcase): drop Tailwind from kind:'react' pages — inline styles + pre-styled overlays (ADR-0065)#2494

Merged
os-zhuang merged 1 commit into
mainfrom
fix/sdui-pages-no-tailwind
Jun 30, 2026
Merged

fix(showcase): drop Tailwind from kind:'react' pages — inline styles + pre-styled overlays (ADR-0065)#2494
os-zhuang merged 1 commit into
mainfrom
fix/sdui-pages-no-tailwind

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

The bug

A kind:'react'/'html' page's source is runtime metadata, so the console's build-time Tailwind never scans it. Utility classes that don't also appear in the console's own source silently produce no CSS — exactly the ADR-0065 failure: styling that "works only by coincidence."

Caught on the live Task Desk page: the hand-rolled bg-black/50 modal backdrop computed to rgba(0,0,0,0) (transparent), the form floated as unstyled black boxes with invisible labels, and light-theme text-slate-900 headings were near-invisible on the dark theme.

Confirmed in the browser

getComputedStyle probe on the running console: bg-black/50rgba(0,0,0,0) (no CSS), while hsl(var(--card))rgb(24,24,27) ✓. The console's CSS tokens are HSL triplets that must be wrapped hsl(var(--token)).

The fix

All six kind:'react' showcase pages now use ZERO Tailwind:

  • Overlays use the platform's own <ObjectForm formType="drawer"|"modal"> variant — a pre-styled Radix Sheet/Dialog with backdrop + animation, driven by open/onOpenChange — instead of hand-rolled fixed inset-0 overlays.
  • Page chrome (headers, KPI cards, tabs, badges, empty states) uses inline style={{}} with hsl(var(--token)) theme colors — real CSS, theme-aware, always generated regardless of the build's content scan.

Pages: task-desk, crm-workbench, inquiry-triage, account-cockpit, invoice-console, renewals-pipeline.

Verification

Browser-verified on a real objectstack serve --dev console (not a dev preview):

  • Titles now legible (were dark-on-dark).
  • Task Desk drawer + modal render the pre-styled ObjectForm overlay — proper dark backdrop + card + visible labels (vs the previous transparent, unstyled mess).
  • CRM Workbench KPI cards and Inquiry Triage tabs/count-badges all theme-correct.
  • tsc --noEmit green.

Follow-up (same correction, next PRs)

  • command-center-jsx (the kind:'html' page) off Tailwind.
  • Correct the AI guidance — react-blocks contract / objectstack-ui SKILL / three-tier docs / ADR-0080·0081 still say "HTML + Tailwind"; that contradicts ADR-0065 and must point to inline styles + pre-styled components.
  • Extend the styling lint to flag Tailwind className in react/html page source.

🤖 Generated with Claude Code

…+ pre-styled overlays (ADR-0065)

A react/html page's `source` is runtime metadata, so the console's build-time
Tailwind never scans it — utility classes that don't also appear in the console's
own source silently produce NO CSS (exactly the ADR-0065 failure: styling that
"works only by coincidence"). The Task Desk modal proved it: a hand-rolled
`bg-black/50` backdrop rendered transparent, the form floated as unstyled black
boxes, and light-theme `text-slate-900` headings were invisible on the dark theme.

Rewrite all six kind:'react' showcase pages to use ZERO Tailwind:
- Overlays use the platform's own `<ObjectForm formType="drawer"|"modal">`
  variant (pre-styled Sheet/Dialog with backdrop + animation), driven by
  `open`/`onOpenChange` — NOT hand-rolled `fixed inset-0` overlays.
- Page chrome (headers, KPI cards, tabs, badges, empty states) uses inline
  `style={{}}` with `hsl(var(--token))` theme colors — real CSS, theme-aware,
  always generated regardless of the build's content scan.

Pages: task-desk, crm-workbench, inquiry-triage, account-cockpit,
invoice-console, renewals-pipeline.

Browser-verified on a real `objectstack serve` console: titles now legible,
Task Desk drawer/modal render the pre-styled ObjectForm overlay (proper backdrop
+ card), CRM KPI cards and Inquiry tabs/badges all theme-correct.

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

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 30, 2026 3:29pm

Request Review

@os-zhuang
os-zhuang merged commit b136f7c into main Jun 30, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the fix/sdui-pages-no-tailwind branch June 30, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant