Repository navigation
Commit f588898
docs(skills): objectstack-ui says where os validate judges actionLayout names (#37122)
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Refs #37057 (item 1)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用户无感;装了界面技能包的 AI 助手读到的「按钮顺序」一节,现在说清了校验命令只检查本应用自己定义的对象上的按钮名。
- 为什么做:原句让助手以为给已安装对象写的定制扩展里写错按钮名也会被校验拦下,实际不会,只是按钮不显示。
- 出错会怎样:只改了一句说明文字、几行示例和一处注释,写错了最多是助手读到不准确的说明;撤回这一个改动即可恢复。
- 要你做什么:无。
## What changes
`skills/objectstack-ui/rules/actions.md`, section "Button Order
(`actionLayout`)". Before:
> `os validate` refuses a name the arm's scope does not place. On an
installed object only its paired `.custom` package's extension writes it
(as `fieldGroups`, objectstack-data), each arm whole.
After:
> `os validate` refuses a name the arm's scope does not place, on the
object or an extension of one the same stack defines. On an installed
object only its paired `.custom` package's extension writes it (as
`fieldGroups`, objectstack-data), each arm whole, not judged there: a
wrong name draws nothing.
What the code does, read at `b49a264a10`:
- `validateObjectActionLayout`
(`packages/lint/src/validate-object-action-layout.ts`, docblock): "Both
object positions are judged: an object's own `actionLayout`, and an
`objectExtensions` entry's, against the object it extends. An extension
of an object this stack does not define is not judged". Its pin is the
test "judges an extension against the object it extends, and skips one
whose object the stack does not define".
- `arrangedHeaderActions` (`ui/packages/types/src/ui-action.ts`,
docblock): "A name naming none of `actions` ... is skipped: it draws
nothing, and no other action takes a pinned one's place."
Paid for in the same file, no ceiling raised and
`scripts/check-skills-token-ratchet.mjs` not edited. Four cuts that
repeat what the file already shows are removed (107 bytes):
- Add to Campaign `icon` (the Convert Lead block shows the key);
- Add to Campaign `successMessage` (the Convert Lead and Reassign Lead
blocks show it, and the `successMessage` / `errorMessage` bullet
describes it);
- Add to Campaign `refreshAfter: true` (the Convert Lead and Add Line
blocks show it; this body inserts a `campaign_member` rather than
writing the current record);
- the gloss "(the handler's answer)" after `result` on the copy-holes
bullet (the `resultDialog` bullet above it says the dialog shows the
server answer).
The Convert Lead block keeps its `successMessage`, byte-identical to
`main`: eval case 3 of
`skills/objectstack-ui/evals/views-apps-actions-pages.json` expects it
(contract review S1, record 7144254679). A grep of
`skills/objectstack-ui/evals/**` finds no `must_contain` token whose
teaching the four cuts remove.
Item 2 of the card (`skills/objectstack-data/SKILL.md`) is not in this
PR: that file conflicts with open PR #36158, so the card is released
with item 2 behind it after this lands.
Changeset: `@objectstack/skills` patch.
### skills readings (lines, then tokens as `check-skills-token-ratchet`
counts them)
| Reading | Before (`b49a264a10`) | After (`e799ec7699`) |
|:--|:--|:--|
| `rules/actions.md`, whole file | 268 lines · 15519 bytes · 3880 tokens
(ceiling 3880, headroom 0) | 267 lines · 15519 bytes · 3880 tokens
(ceiling 3880, headroom 0) |
| all `skills/*/SKILL.md` summed | 4937 lines | 4937 lines |
| whole shipped bundle | 23066 lines · 296366 tokens | 23065 lines ·
296366 tokens |
Net lines in `skills/**`: -1 (5 added, 6 removed), inside the +2 budget.
## Tests
No code changed, so no test changed and nothing was ablated. The
47-command `dispatch-gates --commands` sweep was taken at `fa749f9d3b`
(43 exit 0; four dist-reading gates NOT MEASURED locally, exit 3, CI
runs them). Rerun at `e799ec7699`, each exit 0: `node
scripts/check-skills-token-ratchet.mjs`
("skills/objectstack-ui/rules/actions.md is 3880 tokens (ceiling 3880;
headroom 0)"), `check:skill-examples` ("350 prose examples type-check
across 3 surface(s)"), `check:doc-formula-expressions`,
`check:skill-links`, `check:skill-identifier-liveness`,
`check:doc-authoring`, `check:nul-bytes`; `overlap-check`: "VERDICT
clean exit 0".
## Acceptance notes
- "draws nothing" is the run-time reader's own wording. The design
mode's Save checks names before it writes (the lint rule's docblock), so
the unjudged path is a hand-written extension.
- Contract review nit N1 ("not judged there" has a loose subject) is
left as is: the file has no bytes to spare and both readings are true.
## Verification
Read first:
1. `skills/objectstack-ui/rules/actions.md`, the hunk at line 37: the
risk is the new sentence claiming more or less than the rule does.
2. The Add to Campaign example hunk and the copy-holes bullet: check
that each removed piece is still shown elsewhere in the file.
Two-minute check: `node scripts/check-skills-token-ratchet.mjs`, and
expect the `rules/actions.md` line to read 3880 tokens against ceiling
3880, exit 0.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent fa7d94b commit f588898
2 files changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
129 | | - | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| |||
0 commit comments