Skip to content

Commit 5c2fb7d

Browse files
committed
docs(skills): the objectstack-ui dashboards rule teaches report chart seriesBy; changeset for the fold
The report example splits its bar chart by `close_date`, and the note says `seriesBy` must name a declared dataset dimension other than `xAxis` and is refused on the single-series chart types. Paid for by dropping two notes that described the engine and the Studio rather than anything an author writes. The changeset covers the six teaching edits of this fold. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibz4G9FrLR4TRExx6gn
1 parent 4c44bdf commit 5c2fb7d

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-ui and objectstack-i18n teach six keys the platform already draws — `pressed`, the `{{ }}` copy slots `description` / `helpText` / `outcomeMessages`, the param dialog's `submitText` and its translation slot, the form thank-you translation keys, `kanban.lanes` and report chart `seriesBy`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** Each key shipped in the spec and the console drew it, but no published skill taught it: an agent authoring from the skills wrote a toggle header action with no `pressed`, spelled the dialog line, a param hint or a per-outcome toast with `${…}` holes that `os validate` refuses, left the param dialog's button at "Confirm", translated no thank-you panel, could neither order kanban lanes nor drop an always-empty one, and split a chart by a second dimension with a `matrix` workaround.
11+
- **Now.** `objectstack-ui/rules/actions.md` teaches `pressed` (display-only reader state over an `attachedOnRead` block; a boolean literal is refused), names all five `{{ }}` copy slots with one example each, and teaches `submitText` beside `params` (with the `confirmText` contrast and the refused spellings); its `ReassignLeadAction` example sets `submitText`, and eval 11 asks for a param dialog whose button reads the verb. `rules/list-views.md` shows `kanban.lanes` in the kanban example — a choice of lanes and their order, not a record filter. `rules/dashboards.md` sets `seriesBy` on the report chart example and says where it is refused (an undeclared dimension, the `xAxis` dimension, a single-series type). `objectstack-i18n/SKILL.md` lists `_views.{view}.submitBehavior.title` / `.message` and `_actions.{action}.submitText`.
12+
- Every file stays at or under its token ceiling: the actions, list-views and dashboards additions are paid for by condensing text in the same file (the `ctx` section's blessed-name code block, which restates the objectstack-data hooks reference; two ADR-0047 renderer notes folded into the code comments they repeat; two engine- and Studio-facing notes that told an author nothing to write). No ceiling moves, no frontmatter changes, no schema, key or behaviour changes.

‎skills/objectstack-ui/rules/dashboards.md‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ dataset, so Level B only surfaces in Studio previews and hand-coded react-page
133133
`logarithmic`, `title`); a second `yAxis` entry plus `series[].yAxis: 'right'`
134134
gives a dual axis; `series[].stack` groups a stacked bar; `annotations` draw
135135
reference lines/bands.
136-
- Studio's Dashboard Widget Inspector can author per-widget `dataset`,
137-
`dimensions`, and `values`; curated metadata-admin forms merge
138-
server-only fields back into the payload, so saving through Studio should
139-
not drop newer schema fields.
140136
- The analytics runtime applies SecurityPlugin read scope via
141137
`security.getReadFilter`, so dashboard/report datasets remain RLS-aware.
142138

@@ -321,9 +317,6 @@ const signedByMonth: DashboardWidget = { id: 'signed_by_month', type: 'line',
321317
| `'quarter'` | `YYYY-Qn` |
322318
| `'year'` | `YYYY` |
323319

324-
* **Engine support** — drivers emit the bucket as a label (`2026-01`), not
325-
an instant: Postgres `to_char`, MySQL `date_format`, SQLite `strftime`,
326-
MongoDB `$dateToString`, in-memory `bucketDateKey`.
327320
* **Human labels are automatic** — the analytics layer formats the bucket value
328321
to the label above, and resolves `select`/`lookup` dimension values to their
329322
option label / related-record name. Measures carry their `label` + `format`
@@ -404,7 +397,8 @@ export const PipelineCoverageReport = defineReport({
404397
dateRange: { dimension: 'close_date', defaultRange: 'this_year' },
405398
exportOptions: { formats: ['csv', 'xlsx'] }, // the download; optional `includeHeaders`, `fileNamePrefix`
406399
order: [{ by: 'amount_sum', direction: 'desc' }], // by measure; dates default to chronological
407-
chart: { type: 'bar', xAxis: 'forecast_category', yAxis: 'amount_sum' },
400+
// `seriesBy`: one bar per quarter inside each category.
401+
chart: { type: 'bar', xAxis: 'forecast_category', yAxis: 'amount_sum', seriesBy: 'close_date' },
408402
});
409403
```
410404

@@ -423,6 +417,11 @@ export const PipelineCoverageReport = defineReport({
423417
> **`exportOptions`** declares the download, never who may download — that is the
424418
> base object's permission-set `allowExport`; a `joined` report takes neither
425419
> `dateRange` nor `exportOptions`.
420+
> **`seriesBy`** splits the one `yAxis` measure into a series per value of a second
421+
> dataset dimension — not a `matrix` workaround. It must name a declared dimension
422+
> (publish refuses an unknown name) other than `xAxis`, and is refused on the
423+
> single-series types `pie` / `donut` / `funnel` / `treemap` / `sankey`; with it,
424+
> `series[].name` names one of its values.
426425
427426
---
428427

0 commit comments

Comments
 (0)