From e0500154b516ff1c84c2618a287bbe89a7c7ade2 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Wed, 1 Jul 2026 00:05:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(showcase):=20command-center=20html=20page?= =?UTF-8?q?=20off=20Tailwind=20=E2=80=94=20structured=20props=20+=20style?= =?UTF-8?q?=20objects=20(ADR-0065)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The last kind:'html' showcase page still used Tailwind className (48 of them), which the new ADR-0065 guardrail flags: page source is runtime metadata the build never scans, so the classes silently no-op (and the light-theme slate/indigo palette was wrong for the dark console anyway). Rewrite with the html tier's real primitives: - layout via the components' own structured props (, ); - color/size via inline JSON `style` objects with hsl(var(--token)) theme colors; - text via native
(the renderer only applies `style` when a className/designer-id is also present — a real html-tier limitation — so styled text uses native passthrough tags instead); - the throughput bars via (a nested bar with flex:1 collapsed to width:0; a grid track gives each bar width). os validate passes (ADR-0080 parse gate + the ADR-0065 guardrail both clean). The /grid/card/color rendering was browser-verified in the html tier; the native-div text + grid bars use the same confirmed style-passthrough path. Co-Authored-By: Claude Opus 4.8 --- .../src/pages/command-center-jsx.page.ts | 111 +++++++++--------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/examples/app-showcase/src/pages/command-center-jsx.page.ts b/examples/app-showcase/src/pages/command-center-jsx.page.ts index a3278078d..cc7c327f7 100644 --- a/examples/app-showcase/src/pages/command-center-jsx.page.ts +++ b/examples/app-showcase/src/pages/command-center-jsx.page.ts @@ -3,15 +3,16 @@ import { definePage } from '@objectstack/spec/ui'; /** - * Command Center — a `kind:'html'` page (ADR-0080; formerly `kind:'jsx'`). - * The entire layout is authored as a constrained JSX/HTML + Tailwind *string*; - * at save time - * `@objectstack/sdui-parser` compiles it (parse, never execute) into the SDUI - * tree, which the normal PageRenderer / SchemaRenderer renders. Every tag is a - * real registered component — `flex`, `grid`, `card`, `text`, `badge`, `stack`. + * Command Center — a `kind:'html'` page (ADR-0080): constrained JSX compiled to + * the SDUI tree, parsed-never-executed. It composes registered components with + * structured layout — the html tier's actual purpose. * - * Demonstrates what the fixed page schema cannot: Tailwind-freeform layout that - * still composes the platform's real components. Browser-verified. + * Styling (ADR-0065): a page's source is runtime metadata the build's Tailwind + * never scans, so utility `className`s silently no-op. So this page uses NO + * Tailwind: layout is the components' own structured props (``, + * ``), and any custom CSS is a JSON `style` object with + * `hsl(var(--token))` theme colors (quoted keys/values — a JS-style object is + * parsed as a deferred expression and won't apply). */ export const CommandCenterJsxPage = definePage({ name: 'showcase_command_center_jsx', @@ -19,59 +20,57 @@ export const CommandCenterJsxPage = definePage({ type: 'home', kind: 'html', source: ` - + - - - - + +
Operations · HTML-source page
+
Command Center
+
Authored as constrained JSX and compiled to the SDUI tree — parsed, never executed. Layout is structured component props; color is an inline style object with theme tokens. No Tailwind.
- - - - - - - - - - - - - - - - - - - - - + + +
Open Tasks
+
128
+
▲ 12% vs last week
+
+ +
In Progress
+
47
+
● 9 due today
+
+ +
Completed
+
1,902
+
▲ 4% this month
+
+ +
Cycle Time
+
2.4d
+
▼ 18% faster
+
- - - - - - - - - - - - - - - - - - - - - - + + +
Weekly Throughput
+ + + + + + + + + +
+ +
Recent Activity
+
Onboarding flow shipped
+
12 tasks moved to Review
+
SLA breach on #4821
+
Sprint 42 planning
+
`, });