@antelopejs/agent-skills 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/dms-external-database/REFERENCE.md +9 -16
- package/skills/dms-external-database/SKILL.md +18 -15
- package/skills/dms-mockup/SKILL.md +2 -2
- package/skills/dms-mockup/SPEC.md +1 -1
- package/skills/dms-mockup-build/SKILL.md +1 -1
- package/skills/dms-page-design/SKILL.md +52 -39
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ integrator gave you:
|
|
|
72
72
|
`connection` records that it holds the tables of `erp`.
|
|
73
73
|
- **Step 3** gives the builder and the `database_*` tools the connection `erp`, the same id for
|
|
74
74
|
both. It configures the module that serves the DMS MCP: `dms`. A project whose builder tools
|
|
75
|
-
still come from `dms-builder` and `dms-
|
|
75
|
+
still come from `dms-builder` and `dms-assistant` takes one such step for each of them instead.
|
|
76
76
|
- **Step 4** keeps the DMS on the project's own database. The DMS module is the one that provides
|
|
77
77
|
`@antelopejs/interface-dms`. Step 2 pins `@antelopejs/interface-database` and uses the DMS, so
|
|
78
78
|
the DMS inherits that pin and would be reached with two bindings. Its `source` is the module
|
|
@@ -253,7 +253,7 @@ erp · postgresql 17.5 · role erp_reader (read only) · 42 relations: 9 TableVi
|
|
|
253
253
|
|
|
254
254
|
### Sales (sales.orders)
|
|
255
255
|
|
|
256
|
-
- Period: ordered_at
|
|
256
|
+
- Period: by ordered_at, default last-90-days vs previous-period; presets last-30-days, last-90-days, ytd, last-year, custom
|
|
257
257
|
- Toolbar: PageToolbar › PeriodSelector
|
|
258
258
|
- KPIs: revenue (sum of total) · orders (count) · units (sum of quantity), each with delta and sparkline
|
|
259
259
|
- ChartCard › ChartArea: revenue per month
|
|
@@ -298,19 +298,9 @@ The proposal's values, without their rules, plus what you changed:
|
|
|
298
298
|
"writable": false,
|
|
299
299
|
"tabs": { "column": "status" },
|
|
300
300
|
"fields": [
|
|
301
|
-
{
|
|
302
|
-
"column": "status",
|
|
303
|
-
"filterable": true,
|
|
304
|
-
"display": {
|
|
305
|
-
"kind": "badge",
|
|
306
|
-
"items": [{ "value": "paid", "label": "Paid", "tone": "success" }]
|
|
307
|
-
}
|
|
308
|
-
},
|
|
301
|
+
{ "column": "status", "filterable": true },
|
|
309
302
|
{ "column": "ordered_at", "sortable": true },
|
|
310
|
-
{
|
|
311
|
-
"column": "total",
|
|
312
|
-
"display": { "kind": "price", "currency": "USD" }
|
|
313
|
-
},
|
|
303
|
+
{ "column": "total", "display": null },
|
|
314
304
|
{
|
|
315
305
|
"column": "customer_code",
|
|
316
306
|
"relation": "sales.customers",
|
|
@@ -337,8 +327,11 @@ The proposal's values, without their rules, plus what you changed:
|
|
|
337
327
|
- `declared` defaults to the column's `accepts[0]`. Set it only to take another accepted
|
|
338
328
|
declaration, and always for a column a `field-type` item asked about: give the answer as its
|
|
339
329
|
`declared`.
|
|
340
|
-
-
|
|
341
|
-
|
|
330
|
+
- Leave `display` out to keep the one the Builder proposes: it reads a badge's items and a
|
|
331
|
+
price's currency from the column at map time, so you send no value. Send a display only to
|
|
332
|
+
change it: a price with a `currency` the schema or the integrator names, a badge only over a
|
|
333
|
+
native enum's labels. A proposed price with no `currency` draws euros: send it a `currency`,
|
|
334
|
+
or `null`. Send `tabs` as a column name (`{ "column": "status" }`). `null` turns either off.
|
|
342
335
|
- Key columns are added for you.
|
|
343
336
|
- A relation column's target must be in the same call, with a `label`, or mapped in the module
|
|
344
337
|
before.
|
|
@@ -113,16 +113,16 @@ profile of the whole database again: the Builder did it.
|
|
|
113
113
|
- **Editable.** Every TableView is proposed read-only. Make one editable only where the integrator
|
|
114
114
|
wants it; show `writes` beside it, so a read-only role in this environment is visible.
|
|
115
115
|
- **Pages people can work with.** Load the `dms-page-design` skill. For every TableView, plan
|
|
116
|
-
from its columns
|
|
117
|
-
title, an icon and a description; the tabs, saved views, display
|
|
118
|
-
KPI cards its
|
|
119
|
-
not support.
|
|
116
|
+
from its columns and their profiles (types, traits, distinct counts), as _Name every page_
|
|
117
|
+
and _Tables_ there say: a title, an icon and a description; the tabs, saved views, display
|
|
118
|
+
modes, footer totals and KPI cards its shape supports. Decide each from that shape, and
|
|
119
|
+
leave out what it does not support. You never read a row's values.
|
|
120
120
|
- **The analytics dashboard,** which the analysis does not make. Every run ends with one,
|
|
121
121
|
first in the menu, even when the integrator only asked for the tables. Plan it from the data:
|
|
122
|
-
1. **Inspect.** For each relation, read from the proposal its
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
1. **Inspect.** For each relation, read from the proposal its row count, its `time-axis`
|
|
123
|
+
columns, its `measure` columns, and its `enum-like` columns with their distinct counts
|
|
124
|
+
and, for a native enum, the labels its schema declares (`database_describe`). That shape
|
|
125
|
+
is all you need.
|
|
126
126
|
2. **Ask.** Write the 4 to 8 questions the owner of this data asks every week: how revenue
|
|
127
127
|
or volume trends, what sells, who buys, where, and how it compares with last year. Each
|
|
128
128
|
question names the relation, the measure (a sum of a `measure` column or a row count)
|
|
@@ -133,8 +133,8 @@ profile of the whole database again: the Builder did it.
|
|
|
133
133
|
Another relation gets its own analytics page only when it has its own time axis and at
|
|
134
134
|
least 100 rows. When no relation has a time axis, the dashboard still exists: KPI cards
|
|
135
135
|
of counts and sums, and breakdowns by the category columns, with no period selector.
|
|
136
|
-
4. **Choose blocks** for each question with `dms-page-design`, and its default period
|
|
137
|
-
|
|
136
|
+
4. **Choose blocks** for each question with `dms-page-design`, and its default period as
|
|
137
|
+
_Period_ there sets it.
|
|
138
138
|
- **The minimum.** Your plan, and the pages you write, meet all of these:
|
|
139
139
|
- one analytics dashboard, first in the connection's menu (`order: 0`), opened by a toolbar
|
|
140
140
|
with a period selector when the data has dates;
|
|
@@ -143,7 +143,7 @@ profile of the whole database again: the Builder did it.
|
|
|
143
143
|
- every table given the tabs, views, display modes, footer totals and KPI cards its data
|
|
144
144
|
supports, as `dms-page-design` _Tables_ decides;
|
|
145
145
|
- at least 3 different chart kinds on it when the data has the shapes for them;
|
|
146
|
-
-
|
|
146
|
+
- the default period `dms-page-design` _Period_ sets;
|
|
147
147
|
- every page built with one `builder_compose_page` call, previewed first, and every block whose
|
|
148
148
|
preview is empty, zero or failed dropped or changed;
|
|
149
149
|
- every page checked as `dms-builder-mcp` _Verify_ says before you report.
|
|
@@ -168,7 +168,8 @@ dashboard and check it, then add KPI rows above tables, then any second analytic
|
|
|
168
168
|
1. `builder_map_resources` in batches of 3 or 4 relations per call, TableViews and stats-only
|
|
169
169
|
relations alike; the relations decided against go in `excluded` on the first call
|
|
170
170
|
(REFERENCE.md _Mapping_). One call with every relation of a large database can abort.
|
|
171
|
-
- Send the proposal's choices as they stand where you changed nothing,
|
|
171
|
+
- Send the proposal's choices as they stand where you changed nothing, except `display`,
|
|
172
|
+
which you leave out (REFERENCE.md _Mapping_), plus per resource
|
|
172
173
|
the `title`, `icon`, `description` and `tableOptions` you planned.
|
|
173
174
|
- On `invalid_config`, fix the choice it names and call again: a refused call writes nothing.
|
|
174
175
|
When the same choice is refused twice, drop it (send the relation without that display or
|
|
@@ -183,8 +184,10 @@ dashboard and check it, then add KPI rows above tables, then any second analytic
|
|
|
183
184
|
says.
|
|
184
185
|
- Queries read the mapped resources by their refs (`<connection>/<schema>/<relation>`).
|
|
185
186
|
3. Per table page that gets KPI cards above its table, one `builder_compose_page` call with
|
|
186
|
-
`placement: { "before": "table" }`, previewed first.
|
|
187
|
-
|
|
187
|
+
`placement: { "before": "table" }`, previewed first. When MapResources answers `page_not_written`
|
|
188
|
+
for a relation's table options, none of them was written: send them all again with
|
|
189
|
+
`builder_configure_table_view`, the refused one fixed or left out. Tabs it dropped stay off:
|
|
190
|
+
say so in your report.
|
|
188
191
|
|
|
189
192
|
To change a relation later, read its current choices with `builder_mapping`, then call
|
|
190
193
|
`builder_map_resources` with that relation alone, its included columns as they are and only your
|
|
@@ -206,7 +209,7 @@ change made: a mapped relation is rewritten from the choices sent, and its page
|
|
|
206
209
|
Then report:
|
|
207
210
|
|
|
208
211
|
- what the builder mapped by its rules, and what you changed;
|
|
209
|
-
- the pages made, with each analytics page's default period
|
|
212
|
+
- the pages made, with each analytics page's default period,
|
|
210
213
|
and per table the features you gave it and why;
|
|
211
214
|
- every block that still shows no data, and why;
|
|
212
215
|
- what was left out and why;
|
|
@@ -27,7 +27,7 @@ Collect the user's **wishes**: each thing a screen must show or let someone do.
|
|
|
27
27
|
- the actions: create, edit, approve, export, …;
|
|
28
28
|
- a reference: a screenshot, a Figma frame, another product. When there is one, frame it once as **dms-best-practices** _Design-fidelity protocol_ step 1 says.
|
|
29
29
|
|
|
30
|
-
When the project already has a database or resources (`builder_list_resources`, `database_connections`), read their names and fields first and ask only what they do not answer. Data pages follow **dms-page-design**: its shapes, layout and naming rules decide the blocks of an analytics or table page.
|
|
30
|
+
When the project already has a database or resources (`builder_list_resources`, `database_connections`), read their names and fields first, never their rows, and ask only what they do not answer. Data pages follow **dms-page-design**: its shapes, layout and naming rules decide the blocks of an analytics or table page.
|
|
31
31
|
|
|
32
32
|
The interview is done when every page has a purpose, its data and its actions, and every wish names the page it lives on.
|
|
33
33
|
|
|
@@ -45,7 +45,7 @@ This step is done when every wish maps to a block, a composition, or a sketch th
|
|
|
45
45
|
Write `mockups/<name>/spec.json` with `mockup_write_spec` or as a file (`<name>` in kebab case, from the app or the area: `crm`, `stock-dashboard`), following [SPEC.md](SPEC.md):
|
|
46
46
|
|
|
47
47
|
- one entry per page, its tree in the order the page reads, every block with a name;
|
|
48
|
-
- **fixtures** for every block that reads data, realistic and coherent across pages (the order total on the list matches the KPI),
|
|
48
|
+
- **fixtures** for every block that reads data, invented and never copied from a database: realistic and coherent across pages (the order total on the list matches the KPI), with a dozen rows, not two, and over existing resources the columns and types they declare;
|
|
49
49
|
- a **sketch** for each custom part the user chose, kept to that element;
|
|
50
50
|
- `source`, on a new spec only: `claude-code` in Claude Code, `codex` in Codex, left out when you cannot tell which harness runs you;
|
|
51
51
|
- texts in the user's language.
|
|
@@ -93,7 +93,7 @@ The formats of `mockups/<name>/spec.json` and `mockups/<name>/annotations.json`,
|
|
|
93
93
|
- `fixtures`: a key (`^[A-Za-z0-9_-]{1,64}$`) to any JSON value, the data the page's blocks read.
|
|
94
94
|
- `tree`: the page's blocks, top to bottom, in the `DmsBlockPreview` tree format below.
|
|
95
95
|
- `livePage` and `liveRoutes` (optional, per page): set by "Edit as mockup" on a page converted from a live page, `livePage: { ref, version }` and `liveRoutes` a fixture key to the live route it stands for. **dms-mockup-build** reads them.
|
|
96
|
-
- `source` (optional):
|
|
96
|
+
- `source` (optional): what created the spec: `claude-code` or `codex` for the harness, or `chat` for the host's chat. The host can override the value the harness sets.
|
|
97
97
|
- `built` (optional): written by **dms-mockup-build** after a build, `{ at, pages }`: `at` an ISO date, `pages` one `{ path, title? }` per page built, `path` its dashboard path.
|
|
98
98
|
|
|
99
99
|
The envelope is strict: a key this page does not list is an issue.
|
|
@@ -113,4 +113,4 @@ Then list every page still failing after the last round, never fewer: its route,
|
|
|
113
113
|
|
|
114
114
|
Then, per page: the blocks built (for a converted page, the blocks configured, moved, removed and added, and the live sketches kept; when `mockup_apply_to_page` wrote the page, read them from its `written`, `added` and `removed`, and the live sketches among its `preserved`), the resources and queries created, and the custom components.
|
|
115
115
|
|
|
116
|
-
Record the build on the spec: `mockup_patch_spec` with `{ "mockup": "<name>", "patch": [{ "op": "add", "path": "/built", "value": { "at": "<ISO date>", "pages": [{ "path": "<dashboard path>", "title": "<title>" }] } }] }`, one entry per page the build wrote, or set `built` in `spec.json` without that tool. Leave `mockups/<name>/` in place: it is the record of what the user approved.
|
|
116
|
+
Record the build on the spec: `mockup_patch_spec` with `{ "mockup": "<name>", "patch": [{ "op": "add", "path": "/built", "value": { "at": "<ISO date>", "pages": [{ "path": "<dashboard path>", "title": "<title>" }] } }] }`, one entry per page the build wrote, or set `built` in `spec.json` without that tool. In the same patch, link each new page to the page it was built into, so the Mockups page marks the mockup Out of sync once that page changes: `{ "op": "add", "path": "/pages/<i>/livePage", "value": { "ref": "<pageRef>", "version": "<version>" } }`, `<i>` the spec page's index, `ref` and `version` as a fresh `builder_page_structure` on the built page answers them. A converted page keeps its stamp of step 3. Without the builder MCP, link nothing. Leave `mockups/<name>/` in place: it is the record of what the user approved.
|
|
@@ -20,9 +20,9 @@ arguments are in `dms-builder-mcp`, the code in `dms-pages`.
|
|
|
20
20
|
- **No builder MCP**: the shapes, layout, period, names and table features below still decide
|
|
21
21
|
the page. Write it with `dms-pages`: a query becomes a route on the page
|
|
22
22
|
(`pageRoutePath`), the period arrives as the request's `from` and `to`, and the table
|
|
23
|
-
features are `TableView` options. There is no preview call: before you write a block,
|
|
24
|
-
its
|
|
25
|
-
|
|
23
|
+
features are `TableView` options. There is no preview call: before you write a block, call
|
|
24
|
+
its route for the default period and check only whether it answers no rows, zeros or an
|
|
25
|
+
error, as _Build a page in one call_ checks a preview's status. Open each page in the browser at the end.
|
|
26
26
|
|
|
27
27
|
## Pick the block from the data's shape
|
|
28
28
|
|
|
@@ -46,8 +46,9 @@ arguments are in `dms-builder-mcp`, the code in `dms-pages`.
|
|
|
46
46
|
of under it.
|
|
47
47
|
- Sum a measure that adds up (a total, a quantity). Count rows for everything else. Never sum
|
|
48
48
|
a unit price or a rate.
|
|
49
|
-
- Format money with `valueFormat: "currency"` and a `currencyCode` only when the
|
|
50
|
-
currency (a
|
|
49
|
+
- Format money with `valueFormat: "currency"` and a `currencyCode` only when the schema names
|
|
50
|
+
its currency (a code in a column's comment or name, such as `total_usd`) or the integrator does. A
|
|
51
|
+
`currency` column says the rows carry a currency, never which one: ask the integrator. Otherwise use `valueFormat: "number"`: the default
|
|
51
52
|
currency is the euro, and a wrong symbol is worse than none.
|
|
52
53
|
- Grouping by a foreign key shows ids. Group by the relation's own columns only; a breakdown by
|
|
53
54
|
a related entity's name goes under _Not possible yet_ in your report.
|
|
@@ -75,26 +76,23 @@ Every card binds the page's period: `periodScope: "page"` on the block, and on i
|
|
|
75
76
|
|
|
76
77
|
## Period
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
You never read the data's dates: the analysis and the profiles give a time axis, never its
|
|
80
|
+
first or last date. Set the selector to fixed presets, counted from today: `defaultPreset`
|
|
81
|
+
`last-90-days`, `defaultComparison` `previous-period`, `presets` `last-30-days`,
|
|
82
|
+
`last-90-days`, `ytd`, `last-year` and `custom`, and `comparisons` `previous-period`,
|
|
83
|
+
`previous-year` and `none`. Leave `all` out of `presets`: it sends no `from` or `to`, and every
|
|
84
|
+
bound query fails without them.
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
before it holds data too, else `none`.
|
|
87
|
-
4. Otherwise bind nothing to a period, leave the selector out, and say so in your report.
|
|
88
|
-
|
|
89
|
-
Set it on the selector: `defaultPreset`, `defaultComparison`, `presets` (the default, any
|
|
90
|
-
other preset whose window holds data, and `custom`) and `comparisons`. Leave `all` out of
|
|
91
|
-
`presets`: it sends no `from` or `to`, and every bound query fails without them.
|
|
86
|
+
When the preview marks every bound block `empty` over the default window, the data may stop
|
|
87
|
+
earlier: preview again with `last-year` as the default, compared with `none`. When that is
|
|
88
|
+
empty too, bind nothing to a period, leave the selector out, and say so in your report. A
|
|
89
|
+
period the user names wins over both.
|
|
92
90
|
|
|
93
91
|
Pick the bucket so the default window holds 8 to 31 points: `day` up to 31 days, `week` up to
|
|
94
92
|
about 7 months (a 90-day window is 13 weeks), `month` beyond. A time chart with fewer than 8 points reads as a curve with no story. An axis
|
|
95
|
-
chart (area, line, column, bar) over time takes `xaxisType: "category"
|
|
96
|
-
|
|
97
|
-
no axis option.
|
|
93
|
+
chart (area, line, column, bar) over time takes `xaxisType: "category"`: a bucketed series
|
|
94
|
+
answers its periods as labels. Use `"datetime"` only for a route you wrote yourself that
|
|
95
|
+
answers timestamps. A donut or pie takes no axis option.
|
|
98
96
|
|
|
99
97
|
## Name every page
|
|
100
98
|
|
|
@@ -122,29 +120,41 @@ Set them with `builder_create_page` on new pages, per resource in `builder_map_r
|
|
|
122
120
|
A table page is a working tool: the reader finds a row, sees its state, and acts. Read the
|
|
123
121
|
relation's columns with `builder_resource_structure` (and the proposal's profiles when there
|
|
124
122
|
is one), then give the table every feature its data supports, and none it does not. Each
|
|
125
|
-
rule below names the shape that earns the feature; decide from the columns
|
|
126
|
-
never from the relation's name.
|
|
123
|
+
rule below names the shape that earns the feature; decide from the columns' types, traits and
|
|
124
|
+
distinct counts, never from the relation's name. You never read a row's values: a value you
|
|
125
|
+
name comes from the schema, as a native enum's label.
|
|
127
126
|
|
|
128
127
|
**Columns.** A primary key gets no display and is never a row's label. A boolean keeps its
|
|
129
128
|
default display (no badge). A column that a view filters on, a tab splits on, or a footer
|
|
130
129
|
`where` reads must be `filterable` in the mapping; one that a view sorts on, `sortable`.
|
|
131
130
|
Keep the Builder's proposed displays unless the column's meaning says otherwise:
|
|
132
131
|
a column with few distinct values (a status, a type, a channel, a priority, under about 12
|
|
133
|
-
values) shows coloured badges
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
values) shows coloured badges. Leave its `display` out: the Builder proposes the badge, its
|
|
133
|
+
items and their tones itself. Send a badge only over a native enum, one item per label the
|
|
134
|
+
schema declares, one tone per label (green for done or good, amber for waiting, red for failed
|
|
135
|
+
or lost, grey for closed or neutral). Free text (a subject, a note, a name) never shows badges,
|
|
136
|
+
even when it has few distinct values: send `"display": null` on it when the Builder proposed
|
|
137
|
+
one. A money column shows a price only in a known currency: a price with no `currency` draws euros.
|
|
138
|
+
Leave its `display` out when the price the Builder proposes carries a `currency`. When it
|
|
139
|
+
carries none, or the Builder left the column plain, send
|
|
140
|
+
`{ "kind": "price", "currency": "<code>" }` with a code the schema or the integrator names;
|
|
141
|
+
with none, send `"display": null`, which leaves it a number. A relation
|
|
136
142
|
column (a `customer_id`, an `order_id`) is titled by its target ("Customer") and shows the
|
|
137
143
|
target's label, never the raw number: map the target relation with a label first, then send
|
|
138
|
-
the relation column as a relation. Raw id columns stay off the list.
|
|
144
|
+
the relation column as a relation. Raw id columns stay off the list. A `display` you do send, and the relation's `tabs`, go in `builder_map_resources`.
|
|
139
145
|
|
|
140
146
|
**Tabs.** A single-choice column with 2 to 6 values that splits the rows into states people
|
|
141
|
-
work through (a status, a stage) gives
|
|
147
|
+
work through (a status, a stage) gives tabs when the column is drawn as a badge, by the
|
|
148
|
+
Builder or over a native enum: send `tabs: { "column": "<column>" }`, and the table draws
|
|
149
|
+
"All", then one tab per item of the column's badge. You name no value. When the mapping answers
|
|
150
|
+
`display_dropped` for that column, the table has no tabs: say so in your report. One tab
|
|
151
|
+
column per table.
|
|
142
152
|
|
|
143
153
|
**Saved views** (`views`). Add 2 to 4 views when a recurring question is a fixed filter on the
|
|
144
|
-
table: rows
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
154
|
+
table: recent rows (a date `greater_than` `{{now-7d}}` or `{{now-30d}}`), rows assigned to the
|
|
155
|
+
reader (an owner column equal to `{{user.id}}`), rows waiting for action (a native enum label
|
|
156
|
+
that means "to do"), and outliers worth a look as a sort, with no threshold (the lowest stock
|
|
157
|
+
first, the highest amount first). Each view has a short label that states the question
|
|
148
158
|
("Awaiting shipment", "This week", "Low stock"), a sort that puts the first row to handle on
|
|
149
159
|
top, and `count: true` when the number itself matters. Keep views and tabs from repeating each
|
|
150
160
|
other: views for questions that cross columns or dates, tabs for the plain split by state.
|
|
@@ -152,7 +162,8 @@ other: views for questions that cross columns or dates, tabs for the plain split
|
|
|
152
162
|
**Display modes.** Offer another display when the data reads better that way, and make it the
|
|
153
163
|
default only when it is the main way to work the table:
|
|
154
164
|
|
|
155
|
-
- **Kanban** (`kanban.groupBy`) when a single-choice status or stage column
|
|
165
|
+
- **Kanban** (`kanban.groupBy`) when a single-choice status or stage column drawn as a badge
|
|
166
|
+
(by the Builder or over a native enum) describes a flow
|
|
156
167
|
rows move through, with 3 to 7 values and rows that are handled one by one (tickets, tasks,
|
|
157
168
|
deliveries, applications). Not for a column that only classifies (a country, a category).
|
|
158
169
|
Kanban works on a read-only table: it shows the flow without moving cards. Leave `draggable`
|
|
@@ -164,18 +175,19 @@ default only when it is the main way to work the table:
|
|
|
164
175
|
the main date column with `by: "day"` or `"week"`.
|
|
165
176
|
|
|
166
177
|
**Footer totals** (`footer.summary`). When the table has an additive money or quantity column,
|
|
167
|
-
show its `sum`, and a `count` of rows; add a `count` with a `where` on a
|
|
168
|
-
number is what the reader checks ("Refunded"). Never sum a unit price, a rate or a score.
|
|
178
|
+
show its `sum`, and a `count` of rows; add a `count` with a `where` on a native enum label when
|
|
179
|
+
that number is what the reader checks ("Refunded"). Never sum a unit price, a rate or a score.
|
|
169
180
|
|
|
170
181
|
**KPI cards above the table.** When the relation has a measure or a state worth tracking (an
|
|
171
|
-
amount, rows waiting, a share of a status), put a `GridRow` of 3 or 4 `KpiCard`s above the
|
|
182
|
+
amount, rows waiting, a share of a status, the last two over a native enum label), put a `GridRow` of 3 or 4 `KpiCard`s above the
|
|
172
183
|
`TableView`, each answering one question the table's reader asks ("Revenue this month",
|
|
173
184
|
"Awaiting shipment", "Refund rate"), with the series and `compare` rules above. A lookup list
|
|
174
185
|
(a reference table, tags, settings) gets none.
|
|
175
186
|
|
|
176
187
|
Set displays, views and footer per resource as `tableOptions` in `builder_map_resources`, or on
|
|
177
|
-
an existing page with `builder_configure_table_view`.
|
|
178
|
-
`invalid_config` with the setting it names: fix that one and
|
|
188
|
+
an existing page with `builder_configure_table_view`. Through `builder_configure_table_view`
|
|
189
|
+
a refused choice comes back as `invalid_config` with the setting it names: fix that one and
|
|
190
|
+
send again. Through `builder_map_resources` it comes back as a `page_not_written` warning.
|
|
179
191
|
|
|
180
192
|
## Build a page in one call, and check it first
|
|
181
193
|
|
|
@@ -185,7 +197,8 @@ inline (same fields as `builder_add_query`). It writes everything at once and ty
|
|
|
185
197
|
Use the single-block tools only for a small fix afterwards.
|
|
186
198
|
|
|
187
199
|
1. Call it first with `"preview": true` and the default period's `from` and `to` as `args`.
|
|
188
|
-
It writes nothing and answers each block's status
|
|
200
|
+
It writes nothing and answers each block's status: decide from that status, never from the
|
|
201
|
+
figures a preview holds. Change or drop every block marked
|
|
189
202
|
`empty`, `zero` or `error` (another measure, the whole history for a card that should not
|
|
190
203
|
follow the period), then preview again. Never write a block over an empty answer.
|
|
191
204
|
2. Call it again without `preview` to write. A refusal lists every refused block by pointer:
|