Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/ui/field-grouping-and-order.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Keeping grouping off the field (beyond an optional semantic hint) is what lets *
## Runnable example

- [`examples/app-showcase/src/data/objects/contact.object.ts`](https://github.com/objectstack-ai/objectstack/blob/main/examples/app-showcase/src/data/objects/contact.object.ts) — four declared `fieldGroups`, and the fields tagged with the matching `group`.
- [`examples/app-showcase/src/ui/views/contact.view.ts`](https://github.com/objectstack-ai/objectstack/blob/main/examples/app-showcase/src/ui/views/contact.view.ts) — sections that materialise those groups.
- [`examples/app-showcase/src/ui/views/contact.view.ts`](https://github.com/objectstack-ai/objectstack/blob/main/examples/app-showcase/src/ui/views/contact.view.ts) — the contact list, and no form: the create and edit forms are those four groups.

## Anti-patterns

Expand Down
14 changes: 10 additions & 4 deletions docs/qa/platform-checklist/areas/access-security.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@
"title": "Field-level security: editable:false strips/denies writes API-side and renders read-only in the UI; masked-read half needs an authored readable:false grant",
"since": "v15",
"status": "active",
"revision": 8,
"revision": 9,
"priority": "P1",
"surface": "mixed",
"personas": [
Expand All @@ -876,7 +876,7 @@
"as contributor over the API: PATCH /api/v1/data/showcase_project/<id> {\"name\": \"<name> (edited)\"} — an editable field, then PATCH {\"budget\": 999999999} — the FLS-locked field",
"re-read the project system-side; compare budget before/after",
"as admin: PATCH the same budget field to a new value and re-read (the entitled side)",
"in the console as the contributor: open the project's detail/edit form; screenshot; inspect the state of the budget and spent controls — the two budget figures the edit form renders (project.view.ts form section 'Budget & Schedule': budget, spent, start_date, end_date). budget_remaining is a formula field and is not on the edit form at all",
"in the console as the contributor: open the project's detail/edit form; screenshot; inspect the state of the budget and spent controls — the two budget figures the edit form renders as inputs (showcase_project's 'Budget & Schedule' field group, examples/app-showcase/src/data/objects/project.object.ts: budget, spent, start_date, end_date). budget_remaining is a formula field: the edit form draws it disabled in its trailing untitled section for every caller, so it says nothing about the lock",
"read-mask half (see knownGaps): grant the STOCK showcase_client_liaison set (fixtures.requires[2] — the readable:false grant on budget, spent and budget_remaining; no scratch set is needed) to a fresh member who holds no showcase_contributor, then GET the project as that member and inspect that the three fields' KEYS are absent from the API body — a readable:false grant deletes the key (the strip mechanism, knownGaps[2]), and a key present with a null or placeholder value is not that shape — AND blank in the UI render",
"as admin GET the same row — the unmasked contrast"
],
Expand All @@ -900,9 +900,9 @@
"evidence": "trace + re-read"
},
{
"clause": "the UI renders the FLS state faithfully for the contributor: the budget figures the edit form carries (budget and spent) are visible (readable:true) but not editable — input disabled/read-only on the edit form. budget_remaining is a formula: it is never on the edit form and never editable for anyone, so it cannot discriminate the FLS lock and is not scored here",
"clause": "the UI renders the FLS state faithfully for the contributor: the budget figures the edit form carries (budget and spent) are visible (readable:true) but not editable — input disabled/read-only on the edit form. budget_remaining is a formula: it is never editable for anyone (the edit form draws it disabled in its trailing untitled section, whoever opens it), so it cannot discriminate the FLS lock and is not scored here",
"oracle": "dom",
"verify": "after a screenshot confirms the form rendered, assert the disabled/read-only state of the budget and spent controls (the form section names exactly those two of the three figures, examples/app-showcase/src/ui/views/project.view.ts); an EDITABLE budget or spent input for the contributor is the fail",
"verify": "after a screenshot confirms the form rendered, assert the disabled/read-only state of the budget and spent controls (the 'Budget & Schedule' field group names exactly those two of the three figures, examples/app-showcase/src/data/objects/project.object.ts); an EDITABLE budget or spent input for the contributor is the fail",
"evidence": "screenshot + DOM read"
},
{
Expand Down Expand Up @@ -977,6 +977,12 @@
"date": "2026-10-31",
"change": "acceptance[4] (clause, verify) and steps[5] are made precise. The clause still said 'given the scratch readable:false grant' and 'absent or nulled'; since #9308 fixture 4 the stock showcase_client_liaison set is that grant (fixtures.requires[2], which already said so), and QA run #27409 measured the wire shape: the keys are absent. Source agrees: plugin-security field-masker.ts deletes a non-readable field from the result (the strip), and showcase-client-liaison-fixtures.dogfood.test.ts asserts key absence for all three budget figures. So the clause names the stock grant and all three fields, and a key present with null or a placeholder is a FAIL, never a pass: stronger, not weaker. The UI half is unchanged. Read from source at base efdddc9060. Wave anchor #27377, wave-3 accuracy slice S3; finding parked in anchor comment 6488948228",
"ref": "#27409"
},
{
"revision": 9,
"date": "2026-11-27",
"change": "steps[4] and acceptance[3] re-anchored. Revision 4 read the two budget inputs off project.view.ts's default form, which the Console stopped loading with the internal-form retirement (#36425) and which #36553 deletes: the create and edit forms now lay a project out by showcase_project's fieldGroups, whose 'Budget & Schedule' group lists budget, spent, start_date and end_date. budget_remaining is no longer absent from the edit form: as an ungrouped formula field it is drawn disabled in the trailing untitled section, for every caller, so it still cannot discriminate the lock and is still not scored. Revision 4's text stays as the record of what was true at its base. No clause's assertion changed",
"ref": "#36553"
}
]
},
Expand Down
12 changes: 9 additions & 3 deletions docs/qa/platform-checklist/areas/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"title": "Every translatable surface localizes on a zh-CN session — one pass over the full translation-group vocabulary, plus the runtime i18n routes it resolves through",
"since": "v15",
"status": "active",
"revision": 16,
"revision": 17,
"priority": "P1",
"surface": "browser",
"personas": ["admin on a zh-CN session"],
Expand All @@ -198,7 +198,7 @@
"knownGaps": [
"the showcase's declared surface carries FROZEN untranslated debt, ratcheted by scripts/check-i18n-coverage.mjs + i18n-coverage-baseline.json — expect some declared strings to legitimately fall back to en; the per-surface check is 'translated keys render translated, untranslated keys render the SOURCE label (never a raw dotted key)', not 100% coverage",
"objects._views.<view>.emptyState WAS unafforded and no longer is: the #7714 specimen has landed. examples/app-showcase/src/ui/views/task.view.ts authors an emptyState on the `urgent` view (its comment block cites #7714) and src/system/translations/index.ts carries the zh-CN half under objects.showcase_task._views.urgent.emptyState.{title,message}. The variant is runnable; the only setup it needs is an empty `urgent` view (demote the two urgent seed rows)",
"objects._sections is addressable ONLY on sections that declare a `name` (packages/spec/src/ui/component.zod.ts: a nameless section renders its authored label in every locale; packages/lint's translation-section-name-missing rule nudges authors toward the name). On the stock showcase every surface this item reads declares one: showcase_task's DEFAULT form (the New/Edit form, section `task`), the task record page — examples/app-showcase/src/ui/pages/task-detail.page.ts's record:details block names its sections overview / schedule / details since #22036, reusing objects.showcase_task._sections — and showcase_contact's default form. QA run #23163 read all three in zh under zh-CN, so the old reading (the record page renders EN in every locale) is stale. ⚠ The named formViews tabbed / wizard / split are reachable from NO console door: `…/showcase_task/view/tabbed` is a LIST-view route and renders the grid (records-forms.form-view-gallery says why), so do not read _sections there",
"objects._sections is addressable ONLY on sections that declare a `name` (packages/spec/src/ui/component.zod.ts: a nameless section renders its authored label in every locale; packages/lint's translation-section-name-missing rule nudges authors toward the name). On the stock showcase every surface this item reads declares one: showcase_task's DEFAULT form (the New/Edit form, section `task`), the task record page — examples/app-showcase/src/ui/pages/task-detail.page.ts's record:details block names its sections overview / schedule / details since #22036, reusing objects.showcase_task._sections — and showcase_contact's create and edit forms, whose sections are its four fieldGroups (#36553). QA run #23163 read all three in zh under zh-CN, so the old reading (the record page renders EN in every locale) is stale. ⚠ The named formViews tabbed / wizard / split are reachable from NO console door: `…/showcase_task/view/tabbed` is a LIST-view route and renders the grid (records-forms.form-view-gallery says why), so do not read _sections there",
"acceptance[5]'s CONFIRM half HAS a stock specimen, so it is no longer pin-only (the old reading, QA run #21782's blocked(fixture) 'no zh confirmText', parked on #22017 row 8, is stale): sys_session's revoke_my_other_sessions, a list_toolbar action on the sys_session list (packages/platform-objects/src/identity/sys-session.object.ts; confirmText 'Sign out of every other device where you're currently logged in? Your current session will remain active.'), whose zh-CN entry in platform-objects' bundle (packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts) reads 要退出你当前已登录的其他所有设备吗?当前会话将保持活跃。 with successMessage 其他所有会话已撤销. Read from source at base f68b47ca and since driven live (QA run #33853: as the zh-CN admin with a second session open, the 退出其他设备 toolbar action on /_console/apps/setup/sys_session showed the zh confirm and the zh toast): drive it the same way, capture the confirm and the toast, and record it. No showcase action declares a `confirmText` still, so the showcase's live row is the toast half (e.g. showcase_recalc_estimate's zh successMessage); the unit pins `automated` names stay the copy's pin"
]
},
Expand All @@ -210,7 +210,7 @@
"form labels + placeholders on a task edit form (fields group), and select options in the form and list filters (fields.<field>.options)",
"an action dialog — trigger an object action with confirmText/successMessage and capture the confirm prompt and the success toast (_actions group: label/confirmText/successMessage)",
"a view empty state (_views.<view>.emptyState) — RUNNABLE on the stock fixture since the #7714 specimen landed: examples/app-showcase/src/ui/views/task.view.ts authors an emptyState on the filtered `urgent` view, and the zh-CN bundle carries objects.showcase_task._views.urgent.emptyState.{title,message}. Demote the two urgent seed rows (or filter them away) so the view renders empty, then read the copy — it resolves to 暂无紧急任务 / 当前没有需要立即处理的事项。任务优先级调整为「紧急」后会出现在这里。 ⛔ Still do not manufacture coverage from the console's built-in zero-row placeholder, which is console chrome and not an objects._views.<view>.emptyState resolution",
"section labels (_sections group) — read them off a NAMED-section surface the console actually renders: showcase_task's New form (its default form's `task` section), a task record page (task-detail.page.ts names overview / schedule / details since #22036) and showcase_contact's default form, which renders on the contact record's EDIT (ui/views/contact.view.ts `form`: contact / work / status / notes). ⛔ Not the contact's New dialog for those four: it renders the create formView (formViews.create), whose one section is `who_is_this`, shown as 这是谁. That is a correct fifth named specimen, not a miss of the four. Each declares a stable `name` per section, which is the only thing that makes objects.<object>._sections.<name>.label resolvable — the showcase bundle carries 概览/排期/详细信息 and 联系方式/工作信息/状态/备注 for exactly those names. ⛔ Not `…/view/tabbed`: the named formViews are reachable from no console door, and that URL renders the grid (see the knownGap below)",
"section labels (_sections group) — read them off a NAMED-section surface the console actually renders: showcase_task's New form (its default form's `task` section), a task record page (task-detail.page.ts names overview / schedule / details since #22036) and showcase_contact's create and edit forms, both laid out by the object's four fieldGroups (examples/app-showcase/src/data/objects/contact.object.ts: contact / work / status / notes); the New dialog shows the same four headings, less the fields marked showOnCreate false (since #36553 the contact declares no form view, so there is no `who_is_this` / 这是谁 heading any more). Each declares a stable `name` per section (a field group: its `key`), which is the only thing that makes objects.<object>._sections.<name>.label resolvable — the showcase bundle carries 概览/排期/详细信息 and 联系方式/工作信息/状态/备注 for exactly those names. ⛔ Not `…/view/tabbed`: the named formViews are reachable from no console door, and that URL renders the grid (see the knownGap below)",
"a dashboard — Chart Gallery's title and widget titles (dashboards.<name>.label / widgets.<id>.title). The showcase bundle translates one widget title: dashboards.showcase_chart_gallery.widgets.combo_count_vs_progress.title → 任务数与平均进度 on the runtime dashboard; read that widget",
"a page — a page header's title/subtitle (pages.<name> group). No showcase page carries a translated title or subtitle (QA run #23951 fixture gap), so read a PLATFORM page: pages.connect_agent (label 连接智能体 and its zh subtitle, platform-objects' bundle), and the showcase_command_center page's translated component titles (pages.showcase_command_center.components.*)",
"a Settings namespace — title, group titles, key labels, and the source badges (settings.<namespace> + settingsCommon.sourceLabels)",
Expand Down Expand Up @@ -374,6 +374,12 @@
"date": "2026-11-17",
"change": "acceptance[7].clause and the appTranslationDataShape source line: count-and-list correction, no change of the clause's meaning. The clause still scores every served key against the declared vocabulary; that vocabulary gained the `mappings` group (a named import mapping's label, mappings.NAME.label), so the served platform face is eighteen groups, the per-app face seventeen, and the scored set seventeen with mappings named. The source line also named fifteen groups without hooks, stale before this change; it now names all seventeen. The showcase bundle serves mappings.showcase_inquiry_feed, which the old list would have scored as outside the vocabulary. Read from source at base 0465f4aa",
"ref": "#34939"
},
{
"revision": 17,
"date": "2026-11-27",
"change": "steps[7] and fixtures.knownGaps[2] re-anchored on the contact's field groups. They read the contact's four section headings off ui/views/contact.view.ts's default form and its one create heading (who_is_this, 这是谁) off formViews.create. The internal-form retirement (#36425) stopped the Console loading both, and #36553 deletes them: the contact's create and edit forms are laid out by the object's four fieldGroups (contact / work / status / notes), the create leaving out the fields marked showOnCreate false, and the bundle no longer carries _sections.who_is_this. Revision 13's text stays as the record of what was true at its base. No clause's assertion changed",
"ref": "#36553"
}
]
},
Expand Down
13 changes: 13 additions & 0 deletions examples/app-crm/src/objects/activity.object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ export const Activity = ObjectSchema.create({
// already shows it as the status tag beside the name.
highlightFields: ['type', 'due_date', 'contact', 'account'],

// [ADR-0085 §5] The record's sections: the create and edit forms, the
// drawer and the record page lay an activity out by these groups, each
// listing its members in display order.
fieldGroups: [
{
key: 'activity_details',
label: 'Activity Details',
fields: ['subject', 'type', 'status', 'due_date', 'duration_minutes'],
},
{ key: 'related_records', label: 'Related Records', fields: ['contact', 'account', 'opportunity'] },
{ key: 'notes', label: 'Notes', fields: ['description', 'outcome'] },
],

fields: {
subject: Field.text({
label: 'Subject',
Expand Down
16 changes: 16 additions & 0 deletions examples/app-crm/src/objects/lead.object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ export const Lead = ObjectSchema.create({
// record page show it.
enable: { trackHistory: true },

// [ADR-0085 §5] The record's sections: the create and edit forms, the
// drawer and the record page lay a lead out by these groups, each listing
// its members in display order (so `company` comes second here, wherever
// it sits among the fields). The public Web-to-Lead form keeps its own
// section: it is a named, shared form (views/lead.view.ts).
fieldGroups: [
{
key: 'lead_information',
label: 'Lead Information',
fields: ['name', 'company', 'email', 'phone', 'title', 'source'],
},
{ key: 'qualification', label: 'Qualification', fields: ['status', 'lead_score', 'assigned_to', 'account'] },
{ key: 'conversion', label: 'Conversion', fields: ['converted_opportunity', 'is_closed'] },
{ key: 'notes', label: 'Notes', fields: ['notes'] },
],

fields: {
name: Field.text({
label: 'Lead Name',
Expand Down
41 changes: 2 additions & 39 deletions examples/app-crm/src/views/activity.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,6 @@ export const ActivityViews = defineView({
},
},
},
// The default form. Since #36425 the Console's create and edit surfaces lay
// the record out by the object's fieldGroups and no longer load it, so it is
// inert there (lint: form-view-internal-not-loaded).
form: {
type: 'simple',
sections: [
{
name: 'activity_details',
label: 'Activity Details',
columns: 2,
fields: [
{ field: 'subject', required: true },
{ field: 'type', required: true },
{ field: 'status', required: true },
{ field: 'due_date' },
{ field: 'duration_minutes' },
],
},
{
name: 'related_records',
label: 'Related Records',
columns: 2,
fields: [
{ field: 'contact' },
{ field: 'account' },
{ field: 'opportunity' },
],
},
{
name: 'notes',
label: 'Notes',
columns: 1,
fields: [
{ field: 'description' },
{ field: 'outcome' },
],
},
],
},
// No form here: the create and edit forms lay an activity out by the
// object's `fieldGroups` (objects/activity.object.ts).
});
Loading
Loading