You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
objectui init scaffolds an app whose component registry is empty: generated src/App.tsx never imports @object-ui/components, so every node renders "Unknown component type" #4061
Out-of-scope finding, measured while implementing #3892 (whose face is the scaffold's version ranges and its dead tailwind.config.js). Filed separately: the fix here is a change to the generated sources, outside #3892's completion scope.
Facts (verified on origin/main = 11c1e71e8)
packages/cli/src/commands/init.ts:568-573 generates the whole of src/App.tsx:
That is the only @object-ui/* import the scaffold generates. Three facts make it insufficient:
Registration is a side effect of importing @object-ui/components, and nothing else performs it. packages/components/src/index.ts:100-105 says so in as many words: // Export an init function to ensure components are registered … // Simply importing this module should register all components.
@object-ui/react does not depend on @object-ui/components. Its dependencies are @object-ui/core, @object-ui/data-objectstack, @object-ui/i18n, @object-ui/types, @objectstack/spec, react-hook-form — so importing SchemaRenderer pulls in no renderers.
The renderer's miss path is visible, not silent.packages/react/src/SchemaRenderer.tsx:401 does const Component = ComponentRegistry.get(evaluatedSchema.type); and line 430 renders Unknown component type: {evaluatedSchema.type}.
So the registry a scaffolded project starts with is empty, and every node of the shipped templates — div, card, button, input, textarea, text — takes the miss path.
The manifest already declares@object-ui/components (init.ts:463-465 before #3892, buildInitPackageJson after it). It is declared and never imported: the exact defect direction #3755 removed from the sibling generator, here in the form where the declaration is the harmless half.
Compare: the temp-app generator does this correctly
utils/app-generator.ts:626+ generates an src/App.tsx that opens with nine imports, not one:
app-generator.test.ts then gates both directions (every import declared, every versioned declaration imported) over that generator's file map. commands/init.ts is the third generator and has never been under those gates — the same gap #3892 records for its version ranges.
Impact
objectui init is the first command an external user runs. npm install && npm run dev on its output renders a page of "Unknown component type" boxes for all three templates (simple, form, dashboard). Not dormant — it is the scaffold's entire visible output. Severity left to triage.
Not prejudging the fix
The undecided cell: whether the scaffold should import only @object-ui/components (matching what its three templates actually use — none of them names a plugin type) or the full nine-import block the temp-app generator writes (matching that generator, at the cost of nine dependencies for templates that use none of the plugins, which is #3755's direction again). The first looks closer to "declared = used"; the second keeps the two generators identical. Whichever is chosen, porting app-generator.test.ts's import/declaration gates onto the init file map is what stops it regressing — #3892 extends that file's anchor table to the init manifest but deliberately does not touch these two gates.
Dedup
Searched open issues in this repo: init scaffold plugin register components (0 hits), in:title init OR scaffold OR unstyled OR "@source" (#3907, #3892, #3884 — none on the generated sources). #3892 (in flight) is the version-range/tailwind.config.js face of the same file and does not touch src/App.tsx; #3852 and #3827 both scope to app-generator.ts.
Triage + release board (objectui seat PM — this repo's board producer): pm:queue + target:v17, class ① — objectui init is the first command an external user runs, and its output currently renders "Unknown component type" for every node of all three templates; combined with #4062 the scaffold does not produce the app the README promises. Same board rationale as #3892 (objectstack#6904 criteria).
Claim: PM loop round 2 (objectui whole-repo seat, v17 board priority) — sweep pair with #4062 (same generated-sources root cause, same file commands/init.ts; one PR, two Fixes lines).
Session: session_017Qqyix2QcnpUC9XeYVDzx3
Branch: claude/issue-4061-init-scaffold-runtime
Worktree: objectui-issue-4061
File surface: packages/cli/src/commands/init.ts (generated src/App.tsx and src/index.css template strings) + packages/cli tests (porting the import/declaration gates onto the init file map). ⛔ Not doctor.ts (in-flight #3891). Stop on breach; explain in the report.
Container & model: M, mode:subagent, model: opus
Serial constraints cleared: #3892 / PR #4063MERGED (0a09793f2) — this dispatch cuts its worktree off post-merge origin/main, so the same-file serial rule vs #3892 is satisfied by ordering; #3891 in flight on doctor.ts only (disjoint, region declared).
ACCEPT (objectui seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3, review of record) — PR #4067, sweep pair with #4062.
What shipped: the generated src/App.tsx gains the side-effect import '@object-ui/components'; (with an in-template comment saying why it is load-bearing) and the generated src/index.css gains @import '@object-ui/components/style.css';. init.ts now exports buildInitFiles() so app-generator.test.ts's two import/declaration gates judge the third generator — closing the structural hole both defects lived in — plus real-bin assertions including a map-equals-disk byte-for-byte pin. Changeset: @object-ui/cli patch.
Review notes: 4 files exactly matching the declared surface (doctor.ts, app-generator.ts, scaffold-dependencies.ts untouched). The refactor's behavior preservation is measured, not argued: all three templates scaffolded via the real bin before/after, 33-file tree diff = exactly the two intended lines. The PM-suggested "components only" route was adopted after measurement (all six template node types registered by components' 112 register calls; a test pins the six-type set). fields correctly excluded per #4059's tarball measurement. Reverse verification predicted-red produced 6 red with the gate asymmetry (only the unused-declaration direction can catch this class) stated openly — that asymmetry is exactly how #4061 survived #3892. All 20 checks completed: 18 success / 2 skipped / 0 failures (Lint, Type Check, 4 shards individually verified). Two design divergences flagged for the maintainer, deliberately unchanged (temp-app generator's inline theme tokens vs scaffold's published-sheet import; @tailwindcss/postcss vs quick-start's @tailwindcss/vite).
Landing next: flipping ready and driving to MERGED.
Activity
yinlianghui commentedon Aug 10, 2026
Triage + release board (objectui seat PM — this repo's board producer):
pm:queue+target:v17, class ① —objectui initis the first command an external user runs, and its output currently renders "Unknown component type" for every node of all three templates; combined with #4062 the scaffold does not produce the app the README promises. Same board rationale as #3892 (objectstack#6904 criteria).Claim: PM loop round 2 (objectui whole-repo seat, v17 board priority) — sweep pair with #4062 (same generated-sources root cause, same file
commands/init.ts; one PR, twoFixeslines).Session:
session_017Qqyix2QcnpUC9XeYVDzx3Branch:
claude/issue-4061-init-scaffold-runtimeWorktree:
objectui-issue-4061File surface:
packages/cli/src/commands/init.ts(generatedsrc/App.tsxandsrc/index.csstemplate strings) +packages/clitests (porting the import/declaration gates onto the init file map). ⛔ Notdoctor.ts(in-flight #3891). Stop on breach; explain in the report.Container & model: M,
mode:subagent,model: opusSerial constraints cleared: #3892 / PR #4063 MERGED (
0a09793f2) — this dispatch cuts its worktree off post-mergeorigin/main, so the same-file serial rule vs #3892 is satisfied by ordering; #3891 in flight ondoctor.tsonly (disjoint, region declared).Generated by Claude Code
yinlianghui commentedon Aug 10, 2026
ACCEPT (objectui seat PM, session
session_017Qqyix2QcnpUC9XeYVDzx3, review of record) — PR #4067, sweep pair with #4062.What shipped: the generated
src/App.tsxgains the side-effectimport '@object-ui/components';(with an in-template comment saying why it is load-bearing) and the generatedsrc/index.cssgains@import '@object-ui/components/style.css';.init.tsnow exportsbuildInitFiles()soapp-generator.test.ts's two import/declaration gates judge the third generator — closing the structural hole both defects lived in — plus real-bin assertions including a map-equals-disk byte-for-byte pin. Changeset:@object-ui/clipatch.Review notes: 4 files exactly matching the declared surface (
doctor.ts,app-generator.ts,scaffold-dependencies.tsuntouched). The refactor's behavior preservation is measured, not argued: all three templates scaffolded via the real bin before/after, 33-file tree diff = exactly the two intended lines. The PM-suggested "components only" route was adopted after measurement (all six template node types registered by components' 112 register calls; a test pins the six-type set). fields correctly excluded per #4059's tarball measurement. Reverse verification predicted-red produced 6 red with the gate asymmetry (only the unused-declaration direction can catch this class) stated openly — that asymmetry is exactly how #4061 survived #3892. All 20 checks completed: 18 success / 2 skipped / 0 failures (Lint, Type Check, 4 shards individually verified). Two design divergences flagged for the maintainer, deliberately unchanged (temp-app generator's inline theme tokens vs scaffold's published-sheet import;@tailwindcss/postcssvs quick-start's@tailwindcss/vite).Landing next: flipping ready and driving to MERGED.
Generated by Claude Code
fix(cli): make the `objectui init` scaffold register components and l…