From 4266fbe97fc691ed4c286b20178f3bba0d36f709 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 01:22:54 +0000 Subject: [PATCH 1/2] docs(getting-started): drop the tutorial's internal create/edit form for field groups The Build with Claude Code page's ticket view declared an internal create/edit form, which the platform no longer loads (os validate: form-view-internal-not-loaded). The ticket object now places its fields with fieldGroups, the paragraph says how create and edit lay a ticket out, and the tutorial's e2e pin asserts both advisories absent. Claude-Session: https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B Co-authored-by: Claude --- .../build-with-claude-code.mdx | 37 ++++++++++--------- ...started-build-with-claude-code.e2e.test.ts | 17 ++++++++- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/content/docs/getting-started/build-with-claude-code.mdx b/content/docs/getting-started/build-with-claude-code.mdx index 037499486b3..2b615eb6a04 100644 --- a/content/docs/getting-started/build-with-claude-code.mdx +++ b/content/docs/getting-started/build-with-claude-code.mdx @@ -132,12 +132,13 @@ export const Ticket = ObjectSchema.create({ description: 'A customer support request.', fields: { - subject: Field.text({ label: 'Subject', required: true, searchable: true, maxLength: 200 }), - description: Field.textarea({ label: 'Description' }), + subject: Field.text({ label: 'Subject', required: true, searchable: true, maxLength: 200, group: 'ticket' }), + description: Field.textarea({ label: 'Description', group: 'ticket' }), priority: Field.select({ label: 'Priority', required: true, + group: 'ticket', options: [ { label: 'Low', value: 'low', default: true }, { label: 'Normal', value: 'normal' }, @@ -149,6 +150,7 @@ export const Ticket = ObjectSchema.create({ status: Field.select({ label: 'Status', required: true, + group: 'ticket', options: [ { label: 'Open', value: 'open', color: '#3B82F6', default: true }, { label: 'Pending', value: 'pending', color: '#F59E0B' }, @@ -158,6 +160,11 @@ export const Ticket = ObjectSchema.create({ }), }, + // The create and edit forms lay a ticket out by these groups: one section, + // its fields in declaration order. No field is marked `showOnCreate: false`, + // so the create form asks for all four. + fieldGroups: [{ key: 'ticket', label: 'Ticket' }], + sharingModel: 'private', // org-wide default (OWD) — required by the security gate enable: { apiEnabled: true, searchable: true }, }); @@ -212,17 +219,6 @@ export const TicketViews = defineView({ sort: [{ field: 'priority', order: 'desc' }], }, }, - form: { - type: 'simple', - data, - sections: [ - { - name: 'ticket', - label: 'Ticket', - fields: [{ field: 'subject' }, { field: 'description' }, { field: 'priority' }, { field: 'status' }], - }, - ], - }, }); ``` @@ -306,11 +302,16 @@ passes an unregistered one, the `os dev` boot log warns fails when clicked (the [two paths](/docs/ui/actions#give-it-server-behavior--two-paths) a handler takes). -The view file also declares the create and edit **form**, and the form is where the -long-text `description` is entered and shown. The list columns leave it out, so the -form is the only metadata that names it. A field that no consumer names (a view, a form, a -flow, a formula or an action, among the others the rule counts) gets an advisory -`field-no-consumers` warning from `os validate`. +The view file declares lists only: no file declares a create or edit **form**. +Both forms lay a ticket out by the object's `fieldGroups`, so each field's +`group: 'ticket'` puts it in the one **Ticket** section, in the order the +fields are declared. No field is marked `showOnCreate: false`, so the create +form asks for all four, the long-text `description` among them. The list +columns leave `description` out, so its group is the only metadata that names +it, and that placement counts as a consumer: a field that no consumer names (a +view column, a field group, a flow, a formula or an action, among the others +the rule counts) gets an advisory `field-no-consumers` warning from +`os validate`, and the run below prints none for `description`. The agent also **exports each new file from its directory's barrel**: one line at the end of each of the three `index.ts` files, beside the lines the starter diff --git a/packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts b/packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts index d12fe33dbae..51be08a893b 100644 --- a/packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts +++ b/packages/cli/test/getting-started-build-with-claude-code.e2e.test.ts @@ -33,7 +33,11 @@ * Asserted beside the run: every new file is exported by a barrel line the page * shows, in its own directory's `index.ts` (the page's rule that metadata * exists only if its barrel exports it). Exit statuses and count lines are - * asserted; prose is not pinned. + * asserted; prose is not pinned. Two advisories are asserted absent, by rule + * id: `form-view-internal-not-loaded` (the page's files declare no internal + * create/edit form, which the platform does not load) and `field-no-consumers` + * on the ticket's `description` (the page says its field group is the + * consumer that names it). * * The `Runtime:` line is not compared. The project here is not installed (it * lives under this package's `node_modules`, so its imports resolve to @@ -221,4 +225,15 @@ describe('the page, followed verbatim in a fresh `blank` scaffold', () => { const printed = validate.stdout.split('\n').filter((l) => COUNT_LINE.test(l)).map(fold); for (const line of countLines) expect(printed, out(validate)).toContain(line); }); + + it('prints no `form-view-internal-not-loaded`: the page declares no internal create/edit form', () => { + expect(out(validate)).not.toContain('form-view-internal-not-loaded'); + }); + + it("prints no `field-no-consumers` for the ticket's `description`: its field group names it", () => { + const advisories = out(validate) + .split('\n') + .filter((l) => l.includes('field "description"') && l.includes('support_desk_ticket')); + expect(advisories, out(validate)).toEqual([]); + }); }); From 7fc986b211d1a0e1035c1f6a0ab319f96065a2f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 02:36:53 +0000 Subject: [PATCH 2/2] docs(getting-started): list the ticket's fields on its field group The blank scaffold's objects place fields with fieldGroups[].fields, the spelling the spec names for new metadata; Field.group is the older one. Claude-Session: https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B Co-authored-by: Claude --- .../build-with-claude-code.mdx | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/content/docs/getting-started/build-with-claude-code.mdx b/content/docs/getting-started/build-with-claude-code.mdx index 2b615eb6a04..061957318f5 100644 --- a/content/docs/getting-started/build-with-claude-code.mdx +++ b/content/docs/getting-started/build-with-claude-code.mdx @@ -132,13 +132,12 @@ export const Ticket = ObjectSchema.create({ description: 'A customer support request.', fields: { - subject: Field.text({ label: 'Subject', required: true, searchable: true, maxLength: 200, group: 'ticket' }), - description: Field.textarea({ label: 'Description', group: 'ticket' }), + subject: Field.text({ label: 'Subject', required: true, searchable: true, maxLength: 200 }), + description: Field.textarea({ label: 'Description' }), priority: Field.select({ label: 'Priority', required: true, - group: 'ticket', options: [ { label: 'Low', value: 'low', default: true }, { label: 'Normal', value: 'normal' }, @@ -150,7 +149,6 @@ export const Ticket = ObjectSchema.create({ status: Field.select({ label: 'Status', required: true, - group: 'ticket', options: [ { label: 'Open', value: 'open', color: '#3B82F6', default: true }, { label: 'Pending', value: 'pending', color: '#F59E0B' }, @@ -161,9 +159,11 @@ export const Ticket = ObjectSchema.create({ }, // The create and edit forms lay a ticket out by these groups: one section, - // its fields in declaration order. No field is marked `showOnCreate: false`, - // so the create form asks for all four. - fieldGroups: [{ key: 'ticket', label: 'Ticket' }], + // its fields in the order its `fields` list gives. No field is marked + // `showOnCreate: false`, so the create form asks for all four. + fieldGroups: [ + { key: 'ticket', label: 'Ticket', fields: ['subject', 'description', 'priority', 'status'] }, + ], sharingModel: 'private', // org-wide default (OWD) — required by the security gate enable: { apiEnabled: true, searchable: true }, @@ -303,15 +303,16 @@ fails when clicked (the [two paths](/docs/ui/actions#give-it-server-behavior--two-paths) a handler takes). The view file declares lists only: no file declares a create or edit **form**. -Both forms lay a ticket out by the object's `fieldGroups`, so each field's -`group: 'ticket'` puts it in the one **Ticket** section, in the order the -fields are declared. No field is marked `showOnCreate: false`, so the create -form asks for all four, the long-text `description` among them. The list -columns leave `description` out, so its group is the only metadata that names -it, and that placement counts as a consumer: a field that no consumer names (a -view column, a field group, a flow, a formula or an action, among the others -the rule counts) gets an advisory `field-no-consumers` warning from -`os validate`, and the run below prints none for `description`. +Both forms lay a ticket out by the object's `fieldGroups`: the one **Ticket** +group's `fields` list places the four fields in that section, in the order it +lists them. No field is marked `showOnCreate: false`, so the create form asks +for all four, the long-text `description` among them. The list columns leave +`description` out, so its entry in the group's `fields` list is the only +metadata that names it, and that placement counts as a consumer: a field that +no consumer names (a view column, a field group, a flow, a formula or an +action, among the others the rule counts) gets an advisory +`field-no-consumers` warning from `os validate`, and the run below prints none +for `description`. The agent also **exports each new file from its directory's barrel**: one line at the end of each of the three `index.ts` files, beside the lines the starter