Repository navigation
fix(cli): os g object places its field through the group's fields list, as the starter does - #37595
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
…t, as the starter does The blank template and the platform's Starter app now place every field by naming it in a fieldGroups entry's `fields` list; the object generator still wrote a per-field `group`. It now writes the starter's placement, and the doc comment cites the starter's current files. Stale `note.object.ts` comments in four test files are corrected. Claude-Session: https://claude.ai/code/session_016WV4cyyekQEqLjtrCLLAeV Co-authored-by: Claude <noreply@anthropic.com>
…l scaffolds the note project Claude-Session: https://claude.ai/code/session_016WV4cyyekQEqLjtrCLLAeV Co-authored-by: Claude <noreply@anthropic.com>
…and-contacts starter; changeset Claude-Session: https://claude.ai/code/session_016WV4cyyekQEqLjtrCLLAeV Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 40 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0e4251a8b46781b9b5185edf6b24afdbee105421 && git checkout 0e4251a8b46781b9b5185edf6b24afdbee105421
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6c290d3af7c52d019d1de1c09b6b0306f09700bb 95d0446c0d022b0aa1290f872d5292238e8f4581 && git checkout -B drift-repro 6c290d3af7c52d019d1de1c09b6b0306f09700bb && git merge --no-ff 95d0446c0d022b0aa1290f872d5292238e8f4581
node scripts/docs-audit/affected-docs.mjs --json 6c290d3af7c52d019d1de1c09b6b0306f09700bb
|
Fixes #37503
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
os g objectplaces its field the way the starter does. The object generator now writesfieldGroups: [{ key: 'details', label: 'Details', fields: ['name'] }]after the field map, and thenamefield no longer carriesgroup: 'details'. Measured onorigin/mainc385d3b:examples/app-starter/src/objects/company.object.tsand the blank template'scompany.object.ts/contact.object.tsplace every field through a group'sfieldslist and carry no per-fieldgroup(zerogroup:lines). The spec calls the list "the current spelling" (ObjectFieldGroupSchema.fields: "new metadata lists members here"). The generated comment now tells the author to list each added field in a section, and the doc comment cites the starter's current files instead ofnote.object.ts. Route: the generator follows the starter, as the os generate: generated metadata uses a different authoring style from the scaffold and docs, and four generators trap newcomers #32153 pin promises; the promise is not narrowed.content/docs/deployment/cli.mdx: theos compileandos infotranscripts come from a real run of the current blank template plus the ticket object, view and action from Build with Claude Code (companies, contacts, the starter app, zero rows now printed, no plugins). The callout describing the fixture is rewritten to match. The "Create a project" step no longer says "a sample object".your-first-project.mdxandbuild-with-claude-code.mdxeach get one callout sentence:npm create objectstack@latestinstallscreate-objectstack18.6.0 today, which still scaffolds thenoteproject, and the companies-and-contacts template ships with 19.0. The stale "One object, REST API" template row inyour-first-project.mdxnow carries the template's real description.init-scaffold-file-name-registry-parity.test.ts,platform-object-names.test.ts,blank-template-console-disclosure.test.ts(header) andstarter-comments-self-contained.test.ts.Read first, by risk:
packages/cli/src/commands/generate.ts, the object template string (the only behaviour change).packages/cli/test/generate-scaffold-validates.test.ts, the os generate: generated metadata uses a different authoring style from the scaffold and docs, and four generators trap newcomers #32153 pin's new expectations.content/docs/deployment/cli.mdx, the fixture callout underos info.Tests
All readings on head 95d0446 (
claude/area-o1A-37503), repo objectstack-ai/objectstack.pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2: Test Files 446 passed, Tests 6379 passed.generate-scaffold-validates.test.ts): 26/26 pass. Ablation: withgenerate.tsrestored to c385d3b the pin fails withexpected undefined to deeply equal [ 'name' ]; restored to HEAD, green.OS_TEST_TIERS=nightly,generate-scaffold-gates.e2e.test.ts -t 'fresh os init project': 11 passed (the generated object, thenos validate/os build/os lintwith zero findings, and the updated text assertion).pnpm --filter @objectstack/cli typecheck: exit 0.Real run behind the cli.mdx transcripts
Blank template scaffolded with this branch's
create-objectstackbin, the ticket object, view and action copied verbatim from Build with Claude Code section 3 and renamed tomy_app_:The walkthrough's three
os generatecommands on a copy: all exit 0, summaryData: 4 Objects 19 Fields,UI: 1 Apps 3 Views 2 Actions,Logic: 1 Flows;os validatepasses. The generatedcustomer.object.tscarries{ key: 'details', label: 'Details', fields: ['name'] }and nogroup:line.Acceptance notes
form-view-internal-not-loadedwarning for it, while the page says the form is wheredescriptionis entered. The cli.mdx callout says so and leaves the warning lines out of the transcript. Open PR feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 (form type) edits that page; reported only.os init -t app(packages/cli/src/commands/init.ts) still writes per-fieldgroup: 'details'. Out of this card's file surface; both spellings are valid.deriveFieldGroupLayoutrenders ungrouped fields in a trailing untitled section. Read-only inference, not measured in a browser; the generated comment here does not repeat the claim.content/docs/deployment/validating-metadata.mdxshows a support-desk summary withRuntime: 3 pluginsand no zero rows; not re-run, outside this surface.Verification
Two minutes:
node packages/cli/bin/run-dev.js generate object customerin a scaffolded project, then opensrc/objects/customer.object.ts. Expect{ key: 'details', label: 'Details', fields: ['name'] }afterfields, and nogroup:line onname.Generated by Claude Code