You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3bc338e
Browse filesBrowse the repository at this point in the historyBrowse files
docs(skills): type-check more objectstack-ui examples with os:check
Ten more self-contained blocks in the objectstack-ui rules files carry the
os:check marker: the new-tab action and html page gain their imports, and
the pricing card, doc nav item, four dashboard widgets and the kanban and
gantt views are typed against @objectstack/spec/ui. Each file pays the
marks inside its own token ceiling by trimming restatements whose rule
survives elsewhere in the same file.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUzyjnwuhUWHpExHXT
docs(skills): more of objectstack-ui's self-contained examples are type-checked by `check:skill-examples`
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
Ten more fenced TypeScript blocks in `skills/objectstack-ui` carry the opt-in check marker, so 25 of its 33 are now compiled against the spec: the new-tab `defineAction` in `rules/actions.md` and the `kind: 'html'` page in `rules/pages.md` gain their import; the styled pricing card and the doc navigation item in `rules/pages.md` are typed as `PageComponent` and `NavigationItem[]`; four widget examples in `rules/dashboards.md` are typed as `DashboardWidget` (or its `options`); and the kanban and gantt examples in `rules/list-views.md` are typed as `ListView`, all from `@objectstack/spec/ui`. No example was wrong. The rest stay unmarked: bare-key fragments, the blocks whose file had no token headroom left for a wrapper, and the `SKILL.md` subform example, whose fence is indented inside a list item where the gate does not read it. No rule's teaching changes.
// Period-over-period: renderer fetches the prior quarter and
179
-
// surfaces a secondary value + delta arrow automatically.
180
181
compareTo: { kind: 'previousPeriod' },
181
182
},
182
183
183
-
// Chart widget with comparison overlay (M2). The renderer issues a
184
-
// second query with the time window shifted by `compareTo` and
185
-
// overlays it as a muted/dashed series. The date axis is a dataset
184
+
// Chart widget with comparison overlay. The date axis is a dataset
186
185
// dimension whose monthly bucketing lives on the dataset (`dateGranularity`).
187
186
{
188
187
id: 'revenue_vs_last_year', type: 'line',
@@ -212,30 +211,35 @@ vocabularies.
212
211
|`filterBindings: { filterName: false }`| a widget | Opt out — the honest binding when the vocabularies are disjoint and no field can be re-targeted. |
213
212
| absent | a widget | Default binding: the filter's own `field`; for the reserved `dateRange`, `dateRange.field ?? 'created_at'`. |
Set `compareTo` on any data-bound widget to add a second query against a
226
-
shifted time window. The renderer derives the comparison automatically;
227
-
no second `filter` is required.
230
+
shifted time window.
228
231
229
232
`compareTo` is `{ kind, dimension? }` — the same shape the analytics executor
230
-
reads (`DatasetSelection.compareTo`), so what a widget declares is exactly what
231
-
runs.
233
+
reads (`DatasetSelection.compareTo`).
232
234
233
235
| Key | Value | Behaviour |
234
236
|:--|:--|:--|
235
237
|`kind`|`'previousPeriod'`| The equal-length window immediately before the resolved one. |
236
238
|`kind`|`'previousYear'`| The same window shifted back one calendar year. |
237
239
|`dimension`| dimension name, **optional**| Which time dimension's window to shift. Omit it when the selection dates exactly one — the executor resolves it. With zero or several it errors, naming the candidates; it never guesses. |
238
240
241
+
The two bare `compareTo:` lines are a fragment, so `check:skill-examples` skips them.
242
+
239
243
```typescript
240
244
compareTo: { kind: 'previousPeriod' } // one dated dimension
241
245
compareTo: { kind: 'previousYear', dimension: 'close_date' } // several — say which
### Server-side date bucketing — `dateGranularity` (ADR-0021)
@@ -342,9 +350,12 @@ These five change the dataset SQL; a typo (`sortDirection`) parses too, and draw
342
350
|`limit`| positive integer | Max rows, applied **after** ordering — so "top 10 accounts" is `limit`**plus**`sortBy`. Without `sortBy` the runtime orders by the selected dimensions: deterministic, but not the top of anything. |
343
351
|`stageOrder`| array of **stored** values | Explicit stage order for `funnel`; no other type reads it. Stored values, not display labels; omit to inherit the field's picklist order. |
344
352
353
+
<!-- os:check -->
345
354
```typescript
346
-
// Top 10 accounts by revenue, bucketed monthly for this widget only
| declares `searchableFields`|**that list, verbatim** — any stored field type |
184
183
| declares nothing | the auto-default: the name field + the text-like columns (`text` / `email` / `phone` / `url` / `autonumber` / `textarea` / `markdown` / `select`) + every field marked `searchable: true`, of any type except `secret` / `password` / `vector` or a virtual `formula`|
185
184
186
-
`searchable: false`, the default, removes nothing the type default scans; declare `searchableFields` to choose the set.
185
+
`searchable: false`, the default, removes nothing the type default scans.
187
186
188
187
Modelling side: **objectstack-data → Search Fields**. Query side
189
188
(`search.fields` over the API): **objectstack-query → Full-Text Search**.
@@ -256,19 +255,22 @@ grouping: { fields: [
256
255
Board settings nest under `kanban:` (`KanbanConfigSchema`) — there is **no
257
256
top-level `groupBy`**; the top-level `columns` stays required.
0 commit comments