Commit 54a1125
skills(ui): optimization flight — date macros/relationships pointed at their anchors, searchableFields and timeSegments cut, dashboards consolidated, retired widget keys removed (net −2,585 tokens) (#14338)
* skills(ui): analytics cluster — date macros pointed at query, ctx/cube/drilldown trims, filterBindings + widget options funded
UI-C-01 delete the date-macro + context-token block; keep the heading (two
in-file anchors resolve to it) and point at objectstack-query
rules/filters.md. Two UI-owned rules stay: presentation-scope-not-
security, and AppContextSelector ids never resolving in a filter.
UI-C-02 drop the org-isolation narration; keep the blessed-name pointer at
objectstack-data's hooks reference. `ctx.session.positions` stays in
compact form -- the anchor does not carry it (see PR follow-up list).
UI-D-08 Cube Best Practices -> the two enforced facts.
UI-D-05 delete the renderer note that ends by telling the reader to ignore it.
UI-D-06 delete the v17 `compareTo` removal narration.
UI-B-03 move the dateGranularity bucket table out of `### Drilldown` and under
its own heading (reorder only).
UI-G-02 falsehood 2: the dataset dimension is the DEFAULT; options.dateGranularity
overrides it per widget (dashboard.zod.ts:217-225).
UI-E-02 falsehood 1: delete the retired `actionType`/`actionUrl` pair from the
canonical dashboard widget (dashboard.zod.ts:382-384, retiredKey =
z.never()).
falsehood 4 (found in span, same defect class): `{current_user.id}` ->
`{current_user_id}`; `current_user.id` is the RLS expression root, not
a filter token (spec/src/data/context-tokens.zod.ts:44,49,85).
UI-F-01/F-03 ADD the globalFilters/filterBindings construct (paid by D-05+D-06).
UI-F-02 ADD the five declared widget `options` keys (paid by D-08+D-03-to-come).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
* skills(ui): searchableFields rewritten as a construct, timeSegments retired, relationships/conditional-rules pointed at objectstack-data
UI-D-01 keep the two tables and the `userActions: { search: false }` example;
delete the two verbatim `os validate` diagnostics, the empty-array
essay (folded into the row that already existed) and the related-title
prose (reduced to its objectstack-data pointer).
UI-D-02 delete the `timeSegments` block -- self-declared NOT part of
GanttConfigSchema, zero implementation in this repo (every hit is in
objectui plugin-gantt), and 10 of the package's 13 CJK lines.
UI-C-04 the inlineEdit ladder and the modelled grid behaviours point at
objectstack-data rules/relationships.md, which carries them verbatim.
Kept the three UI-authored facts the anchor does NOT carry: the ghost
row, `autofill: false`, and the form's `taxRateField`.
UI-C-03 delete the visibleWhen/readonlyWhen/requiredWhen table; keep the
routing line, the row-by-row inline-grid note and the retired
`conditionalRequired` guard.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
* skills(ui): frontmatter routing corrected, prose rationale trimmed, four highest-traffic examples gated
UI-A-01 add `*.page.ts` / `*.report.ts` / `*.dataset.ts` to the trigger list --
`*.page.ts` is the corpus's most-authored kind (29 definitions) and had
no filename trigger at all.
UI-A-02 falsehood 3: drop "the React renderer implementation (lives in
packages/client-react)". That package is React hooks for the client SDK
(package.json description; src/index.tsx exports hooks + provider). The
renderer is @object-ui/react-runtime, in objectui.
UI-A-03 wizards: a stepped form over ONE object is this skill's `formViews`
`type: 'wizard'`; only step-branching flows route to automation.
UI-D-07 keep the requirement, drop the removal history.
UI-D-03 delete the "Why this model" justification.
UI-D-04 reduce the metadata-fence rationale to the two facts the table lacks
(live-not-a-screenshot; data-not-code).
UI-B-06 delete "When to Use This Skill" -- it restated the frontmatter.
UI-B-05 the Tailwind rule now states the rule once and points at ADR-0065.
UI-G-03 translate the CJK example label. The two remaining CJK lines are
non-English USER PHRASINGS the router matches on -- see the PR body.
UI-E-03 inline a minimal defineAction so the record-detail page block stands
alone (the relative import could never resolve in the gate build dir).
UI-E-01 mark four highest-traffic examples `os:check`: structured definePage,
the Dashboard literal, defineDataset, the react source tier.
Gate: pnpm --filter @objectstack/spec check:skill-examples -- 259 -> 263 marked
blocks, "every marked block parsed, so tsc ran the SEMANTIC pass on all of them".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
* skills(ui): generated + ledger consequences of the frontmatter edit and the timeSegments deletion
Two mechanical consequences, neither hand-written:
- `content/docs/ai/skills-reference.mdx` — `pnpm --filter @objectstack/spec
gen:skill-docs`. The dispatch predicted `skills/README.md` would be the file
the drift gate demands; it is not. README came back green on its own (it does
not embed the description); the out-of-date artifact is the reference page.
Both are outputs of the one generator the card names.
- `scripts/skill-identifier-liveness-ledger.json` — `node
scripts/check-skill-identifier-liveness.mjs --update`, pruning the now-stale
`dayStart` / `showMidnight` exemptions. Both existed only to excuse the
`timeSegments` block this flight deleted, and each ledger note independently
records that the implementation lives in objectui plugin-gantt -- the same
measurement UI-D-02 rests on. `--update` never ADDS an exemption.
Gates: check:skill-docs 0 (both artifacts ✓); check:skill-identifier-liveness 0
("Leg 1: 498 citations over 48 published files ... 3 ledgered exemptions").
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
* skills(ui): drop the unsupported "(enforced)" from the Cube Rules heading
In-seat contract review is right: my UI-D-08 retitle asserted enforcement that
does not exist, which is the same defect class this flight exists to remove.
Re-verified against the source, and the evidence is stronger than the review
cited:
- `granularities: z.array(TimeUpdateInterval).optional()`
(packages/spec/src/data/analytics.zod.ts:147) — optional, and the file
contains ZERO `.refine(` / `superRefine` occurrences, so nothing requires it
on a `time` dimension.
- Cube `sql: z.string().describe('Base SQL statement or Table Name')` (:216).
The describe string itself admits raw SQL; nothing rejects it at parse time,
and no gate script under scripts/ or packages/*/scripts/ references
`cube.sql`.
So there is no gate or schema refinement to cite, and the word is dropped rather
than defended. The two body items are unchanged: they are prescriptions with a
stated mechanism (`cube.sql.trim()` read as the object name), not claims of
enforcement.
Gates at this head: node scripts/check-skills-token-ratchet.mjs exit 0 --
SKILL.md 22856 tokens (ceiling 25445, headroom 2589); pnpm --filter
@objectstack/spec check:skill-examples exit 0 -- "263 prose examples type-check
across 3 surface(s)".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>1 parent 96b627d commit 54a1125
3 files changed
Lines changed: 165 additions & 382 deletions
File tree
- content/docs/ai
- scripts
- skills/objectstack-ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 20 | | |
33 | 21 | | |
34 | 22 | | |
| |||
0 commit comments