Repository navigation
fix(cli): os init -t app places its item fields through the group's fields list, as os g object does - #38176
Conversation
…ields list The app template's item object wrote a field group with no fields list and `group: 'details'` on each field, while `os g object` and the create-objectstack starter list a group's fields in the group itself, after the field map. The item now does the same, so a new project meets one placement style. Both spellings mean the same placement. A pin renders the template and asserts no per-field `group`, and that the details group lists every declared field. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibypsynz3Cc6Yp3SXFZ
📓 Docs Drift CheckThis PR changes 1 package(s): 18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 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 9482bfb56592117140fd85bb5cfedb8df0315815 && git checkout 9482bfb56592117140fd85bb5cfedb8df0315815
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9dca1097bd8f843c630cd491d2c8af20e1c678cb 1e34fc99a9a85bcc7d7ecd17ff60362813816aaa && git checkout -B drift-repro 9dca1097bd8f843c630cd491d2c8af20e1c678cb && git merge --no-ff 1e34fc99a9a85bcc7d7ecd17ff60362813816aaa
node scripts/docs-audit/affected-docs.mjs --json 9dca1097bd8f843c630cd491d2c8af20e1c678cb
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: ACCEPT at
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-28T06:00Z · zone
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46114686643 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Tesla · project thread
Fixes #37615
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/cli/src/commands/init.ts, theapptemplate'ssrc/objects/__name___item.object.ts: the item's three fields (name,description,status) no longer carrygroup: 'details'. Thedetailsfield group moves after the field map and lists them itself:fieldGroups: [{ key: 'details', label: 'Details', fields: ['name', 'description', 'status'] }]. That is the placementos g objectwrites since PR fix(cli): os g object places its field through the group's fields list, as the starter does #37595 and thenpm create objectstackstarter uses (os generate: generated metadata uses a different authoring style from the scaffold and docs, and four generators trap newcomers #32153). The comment above it now says to list each new field in a section, in the wordsos g object's scaffold uses.export defaultand everything else in the file are unchanged; the template's app and list view still default-import the item.field-no-consumerscredits a field placed either way (since 命令行空白模板改用起步应用的公司、联系人 #36945).patchchangeset for@objectstack/cli.create-objectstack19.x on npm'slatesttag and moved to its own on-hold card, docs:19.0 正式发布后删掉入门页两处「18.6.0 today」提示(从 #37615 拆出) #38159, per the claim.Tests
packages/cli/test/init-item-field-placement.test.ts: renders the template's item object and pins (1) no per-fieldgroup:line, and (2) thedetailsgroup'sfieldslist names exactly the declared fields, in order, and sits after the field map.Readings at 1e34fc9 (base origin/main 581ae76)
git grep -n "group: 'details'" -- packages/cli/src→ 3 hits, allinit.ts(1080, 1084, 1094);generate.ts:353-354already writes thefieldslist.Test Files 1 passed (1),Tests 2 passed (2). Ablation:init.tsrestored to 581ae76 with the pin in place →Tests 2 failed (2), both tests red; fix restored after.@objectstack/cliunit project (vitest run --project unit --maxWorkers=2, under the verify lock):Test Files 447 passed (447),Tests 6419 passed (6419),VERDICT command-exit 0.init.tsbytes):OS_TEST_TIERS=nightlystarter-field-consumers.e2e.test.ts+generate-scaffold-gates.e2e.test.ts→Test Files 2 passed (2),Tests 73 passed (73)(realos init -t app, thenos validate/os lint, with the strip-the-placement control). The rest of the integration layer is CI's.pnpm --filter @objectstack/cli typecheckexit 0 (tsc --noEmit+check:test-typecheckOK).dispatch-gates --ranat 1e34fc9: 70 derived, 70 run, 0 NOT-MEASURED, all exit 0.check-plugin-teardown-shape --self-test,check:dual-build-cjs-loadsandcheck:i18n-coveragefirst answered exit 3 (prerequisite: pinned commit / package builds) and exit 0 once those were in place.overlap-check.mjs:VERDICT clean exit 0, 0 open PR heads touch the changed files.Acceptance notes
group: 'details'sites in the tree (examples/app-showcase/src/data/objects/semantic-zoo.object.ts,packages/metadata-protocoltest fixtures) are not newcomer scaffolds and are left as they are.Verification
Read first (by risk):
init.ts: the item object template, around thefieldGroupsblock afterfields.Two-minute check:
pnpm --filter @objectstack/cli exec vitest run test/init-item-field-placement.test.tspasses; putinit.tsback to 581ae76 and both tests turn red.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibypsynz3Cc6Yp3SXFZ