Repository navigation
Commit 25ac5df
docs(getting-started): the Build with Claude Code tutorial lays out its ticket by field groups, not an internal form (#38670)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JeHmqv6CKCkW8ewrPBLekk)_
Fixes #38641
Clause-②: no
Metadata-protocol: none
## 维护者速读
-
照着入门教程搭支持台应用的开发者:工单视图里不再写一张平台早已不加载的内部新建/编辑表单,改由工单对象的字段分组决定新建和编辑页面的布局,校验不再报那条警告。
- 属于入门文档纠错:教程教的机制与平台实际行为不一致,AI 会照抄。
- 出错只影响文档与夜间测试,内容可直接撤回;最坏情况是教程又回到旧写法,夜间测试会转红提示。
- 无
## What changes
- `content/docs/getting-started/build-with-claude-code.mdx`
- `src/views/ticket.view.ts` drops its `form: { type: 'simple', ... }`
block. The platform does not load an internal create/edit form, and `os
validate` warned `form-view-internal-not-loaded` on it.
- `src/objects/ticket.object.ts` declares `fieldGroups: [{ key:
'ticket', label: 'Ticket', fields: ['subject', 'description',
'priority', 'status'] }]`. This is the group-lists-its-members spelling
that the spec names for new metadata (`Field.group` is the older one).
The `blank` template's own objects use it too:
`packages/create-objectstack/src/templates/blank/src/objects/company.object.ts`,
`contact.object.ts` and `article.object.ts`. Its comment says no field
is marked `showOnCreate: false`, so the create form asks for all four.
No new key; validate passes.
- The paragraph that called the form the place where `description` is
entered now says how both forms lay a ticket out. The Ticket group's
`fields` list places the four fields in the order it lists them, and
`showOnCreate` defaults to on. The paragraph also says that
`description`'s entry in that list is the only metadata that names it,
that the `field-no-consumers` rule credits that placement, and that the
run therefore prints no advisory for `description`.
- `packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts`
gets two assertions. The first checks that the run prints no
`form-view-internal-not-loaded`. The second checks that it prints no
advisory on the ticket's `description`. The header comment names both
checks. Count lines did not move (`4 Objects 22 Fields`, `1 Apps 4 Views
1 Actions`).
Read first: (1) the ticket object block in the page, at its
`fieldGroups` hunk; (2) the rewritten paragraph after the Resolve action
paragraph; (3) the two new `it` blocks at the end of the test.
No changeset: the page is not in any package, and the test is outside
`@objectstack/cli`'s `files[]` (`dist`, `README.md`, `CHANGELOG.md`).
## Tests
At head `7fc986b211`:
- `OS_TEST_TIERS=nightly pnpm --filter @objectstack/cli exec vitest run
--maxWorkers=2 test/getting-started-build-with-claude-code.e2e.test.ts`
gave `Test Files 1 passed (1)`, `Tests 7 passed (7)`.
- Ablation: put a `form` back into the page's ticket view and drop
`description` from the group's `fields` list. That gave `Tests 2 failed
| 5 passed (7)`, and the two failures are the new assertions. Restoring
with `git checkout HEAD -- PAGE` brought the blob hash back to HEAD's
(`06195731`), with a clean `git status`.
- `pnpm --filter @objectstack/cli typecheck` exited 0.
<details><summary>os validate on the page's files, before / form removed
only / after</summary>
origin/main 555d699:
```text
⚠ view "support_desk_ticket" · form: ... this internal create/edit form is no longer loaded — create and edit lay the object out by its field groups and follow the rules on its fields
rule: form-view-internal-not-loaded at views[0].form
```
Form removed, no field groups:
```text
⚠ object "support_desk_ticket" · field "description": declared, but nothing in this stack displays or reads it (inert; a consumer of the same name on "support_desk_company" does not count)
rule: field-no-consumers at objects[3].fields.description
```
This branch at 7fc986b: `✓ Validation passed`, with the same count
lines and no advisory at all. Exit 0 in all three runs.
</details>
## Acceptance notes
- Step 2's prompt still asks for "a form for entering tickets". The
agent answers that with field groups, as the rewritten paragraph
explains, so the user-facing prompt is unchanged.
## Verification
Two-minute check: `OS_TEST_TIERS=nightly pnpm --filter @objectstack/cli
exec vitest run test/getting-started-build-with-claude-code.e2e.test.ts`
should print `Tests 7 passed (7)`.
<details><summary>Local gates</summary>
`dispatch-gates --commands` derived 83 commands. 81 exited 0. Two exited
3 with PREREQUISITE NOT MET, because they read the dist of packages
outside this card's build closure, and are left to CI:
`check:skill-examples` and `check:dual-build-cjs-loads`. `dispatch-gates
--ran` printed `83 derived famil(ies) accounted for — 81 run, 2
NOT-MEASURED`.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B
<!-- signed: repo:objectstack#3 · os-steve ·
session_01ADHkmSwS4mQyXWrddL4r6B -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0124851 commit 25ac5df
2 files changed
Lines changed: 34 additions & 17 deletions
File tree
- content/docs/getting-started
- packages/cli/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
| |||
306 | 302 | | |
307 | 303 | | |
308 | 304 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
224 | 239 | | |
0 commit comments