From 7d7ca6db2425ef185280bf98952ac758a0ce1f37 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 17:35:47 +0000 Subject: [PATCH] docs(skills): objectstack-ui teaches the board's lane statistic and card settings The kanban example writes kanban.summary, showFieldLabels and hideEmptyFields; one note names the six lane statistics and what the aggregates cover. Restating comments in the same file pay for the bytes. Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude --- .changeset/36422-skills-board-settings.md | 10 +++++++ skills/objectstack-ui/rules/list-views.md | 32 ++++++++++++----------- 2 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 .changeset/36422-skills-board-settings.md diff --git a/.changeset/36422-skills-board-settings.md b/.changeset/36422-skills-board-settings.md new file mode 100644 index 00000000000..13c813b2dee --- /dev/null +++ b/.changeset/36422-skills-board-settings.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): objectstack-ui teaches the board's lane statistic and card settings + +Clause-②: no +Metadata-protocol: none + +The kanban example in `rules/list-views.md` now writes `kanban.summary` in place of the older sum-only `summarizeField`, and sets `showFieldLabels` and `hideEmptyFields` with their defaults (both `true`). One note names the six lane statistics (`none`, `count`, `sum`, `avg`, `min`, `max`), says the four aggregates cover every record of the lane and not only the loaded cards, names the known gap (a board over a lookup field or in a grouped view), and says `summary` takes precedence over `summarizeField`. Text only; restating comments and sentences in the same file are cut to pay for it. diff --git a/skills/objectstack-ui/rules/list-views.md b/skills/objectstack-ui/rules/list-views.md index 084af8f3265..11d68a57d57 100644 --- a/skills/objectstack-ui/rules/list-views.md +++ b/skills/objectstack-ui/rules/list-views.md @@ -148,9 +148,7 @@ Rules: `element: 'dropdown'` (value chips) is allowed — `tabs` is page-only** (ADR-0047 amendment): the saved-view switcher already owns the tab bar, so `ObjectUserFiltersSchema` **rejects** `tabs` at parse (not dropped) and the - `validate` list-view-mode lint reports it. The full - `dropdown | tabs | toggle` range applies only to **page lists** / - `interfaceConfig.userFilters`. + `validate` list-view-mode lint reports it. - **Omit `userFilters` when unsure — omission means a clean toolbar.** Nothing is auto-derived. - `userFilters: { element: 'dropdown' }` (no `fields`) is valid shorthand: @@ -168,10 +166,8 @@ import { defineView } from '@objectstack/spec'; const data = { provider: 'object' as const, object: 'support_case' }; export const CaseViews = defineView({ - // No `searchableFields` → the toolbar searches everything the object allows. list: { label: 'All Cases', type: 'grid', data, columns: ['subject', 'status'] }, listViews: { - // This list only: search the reference number and the subject line. triage: { label: 'Triage', type: 'grid', data, columns: ['case_number', 'subject', 'status'], @@ -196,8 +192,7 @@ Modelling side: **objectstack-data → Search Fields**. Query side #### ⛔ One bad entry 400s EVERY search on that list The client sends this list verbatim as the `$searchFields` override and the -ingress gate refuses any entry outside the allowed set before the engine runs — -the whole search box, for every user and every term: no result at all. +ingress gate refuses any entry outside the allowed set before the engine runs. | What you write on the view | `os validate` | Toolbar search at runtime | |:---------------------------|:--------------|:--------------------------| @@ -207,7 +202,7 @@ the whole search box, for every user and every term: no result at all. | a renamed / mistyped column, or a dotted path (`account_id.name`) | `searchable-field-unknown` | `400 INVALID_FIELD` | | a real column outside the allowed set, or a virtual `formula` column | `searchable-field-unsearchable` | `400 INVALID_FIELD` | -Both diagnostics are **errors**, not warnings — `os validate` fails the build. +Both diagnostics are **errors**: `os validate` fails the build. To remove the search box, toggle the affordance instead: @@ -221,7 +216,7 @@ export const AuditViews = defineView({ list: { label: 'Audit Log', type: 'grid', data, columns: ['case_number', 'status'], - userActions: { search: false }, // ← no search box + userActions: { search: false }, }, }); ``` @@ -270,9 +265,11 @@ const board: ListView = { data: { provider: 'object', object: 'project_task' }, columns: ['title', 'owner_id', 'priority'], kanban: { - groupByField: 'status', // a select field — one lane per option + groupByField: 'status', // a select field lanes: ['todo', 'in_progress', 'review'], - summarizeField: 'estimate_hours', // optional — summed at the top of each column + summary: { type: 'sum', field: 'estimate_hours' }, // each lane's foot statistic + showFieldLabels: false, // default true: cards name each field + hideEmptyFields: false, // default true: cards drop an empty field columns: ['title', 'owner_id', 'priority'], // fields shown on each card }, sort: [{ field: 'priority', order: 'desc' }], @@ -284,13 +281,18 @@ const board: ListView = { > off the board. Omit it to draw every option in its own order; a value that is > not one of the field's inline options, or listed twice, fails `os validate`. +> `summary.type`: `none`, `count`, or `sum` / `avg` / `min` / `max` of a `field`, +> computed by the query over every record of the lane, not only the loaded +> cards. Known gap: over a lookup field or in a grouped view, `sum` covers one +> fetched page and the other three show nothing. `summary` overrides the older +> sum-only `summarizeField`. + ### Adding a board, calendar, gallery or gantt beside the list "Add a kanban (calendar / gallery / gantt) view" means a NEW `listViews` entry that coexists with the views the object has — its key encodes the kind or purpose (`status_kanban`, `timeline_gantt`: the key a nav item's `viewName` -names, registered as `OBJECT.status_kanban`), the default `list` and every -other view untouched. Never satisfy an add by retyping `list` (or an existing named +names, registered as `OBJECT.status_kanban`). Never satisfy an add by retyping `list` (or an existing named view) to `type: 'kanban'`: nothing refuses it, the view is converted in place and the original is gone. Change a view's kind in place only when the request says to convert or replace THAT view. @@ -326,8 +328,8 @@ const timeline: ListView = { data: { provider: 'object', object: 'project_task' }, columns: ['name', 'owner_id', 'status'], // left-pane tree columns gantt: { - startDateField: 'start_date', // task bar start - endDateField: 'end_date', // task bar end + startDateField: 'start_date', + endDateField: 'end_date', titleField: 'name', // bar label progressField: 'progress', // 0–100 fill dependenciesField: 'depends_on', // FS dependency arrows