Repository navigation
Commit 4c50ec7
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XC63go34oEMBFaBgqpoDC8N)_
Part of #35870
Clause-②: no
Metadata-protocol: none
repo:objectstack#4 · os-project-manager ·
session_01FEkQ5kDGa1ViantgrfH797
`Part of`, not a closing line: this PR is the skills half of the card.
The card's other half, the dated add-only note on ADR-0050 §2, is not in
this diff (no `docs/adr/**` path); the claim proposes it as a row on the
weekly ADR revisions card 36086, and the seat routes it.
## 维护者速读
- 用户能看到什么变化:照着界面技能搭应用的作者和
AI,以前被教「在列表视图上声明整页打开」;现在技能教的是今天的规则:在对象列表里点记录名称进整页,鼠标移到这一行时名称旁的图标从侧边打开,什么都不用声明。
- 为什么做:属于「记录详情页重做」专题的收尾。维护者已裁定列表上的「打开方式」声明废弃,技能还按旧规则教,AI 会写出一个不起作用的设置。
- 出错会怎样:只改技能文字和一条评测用例,不动运行时;写错的话作者读到的是一句不准确的说明,直接撤回这个 PR 即可。
- 要你做什么:无。
## What changes
The source for every new sentence is the spec's own text on
`origin/main`: the `[DEPRECATED]` describe of `mode` in
`NavigationConfigSchema` (`packages/spec/src/ui/view.zod.ts`) and the
ADR-0087 D3 semantic entry `navigation-mode-record-open-deprecated`.
Ruling: the maintainer's 「废弃」 on the parent card (comment 7039654214).
- `skills/objectstack-ui/rules/record-page.md`, step 5. Was: the drawer
unless the object declares `page`, with `navigation: { mode: 'page' }`
on the list view as the way to the full page. Now: on an object's list
the name opens the page and its hover icon the drawer; `navigation.mode`
is deprecated there (`drawer`, `page`, `new_window` change nothing, so
omit it); `none` still means rows open nothing (prefer
`preventNavigation: true`); a page block's `navigation` honours every
value. The `modal` / `split` / `popover` refusal and "A phone always
pages" stay.
- Same file, step 6. The Display menu's Open records choice and the
drawer's ⤢ leave the list of the reader's own choices: the setting and
the drawer's full-width state were removed with the same change. The two
dragged widths and the `size` bucket stay.
- `skills/objectstack-ui/rules/navigation.md`, the Surface bullet of
Record Presentation. Was: "A clicked record opens in the drawer, which
expands to the full page; `page` only by declaration". Now the same one
rule, pointing at Record Page steps 5 and 6.
- `skills/objectstack-ui/evals/README.md`: the `record-page.json`
summary line names the new rule.
- `skills/objectstack-ui/SKILL.md` (rework round, contract review
7074880702 S1 and N3). Principle 5 was: "how a record opens is one
list-view key". Now: how a record opens from an object's list is not
authored (the name opens the page, its hover icon the drawer); the
reader's-own-choices clause and the Record Page link stay. The
Where-to-go row "drawer or page" now reads "how a record opens".
- `.changeset/35870-navigation-mode-skills.md`: `@objectstack/skills`
patch.
Left as is, measured:
- `skills/objectstack-ui/references/react-blocks.md` line 61
(`navigation` on the `ListView` block of a `kind: 'react'` page) and
`rules/pages.md` line 218 (`navigation={{ mode: 'none' }}` on a block):
a page block still honours every value of the key, so neither teaches
the retired meaning. `react-blocks.md` is generator-owned.
## Evals
`skills/objectstack-ui/evals/record-page.json`, case 2 only; id and
prompt unchanged ("Contracts should open as a full page, not the side
drawer. Reps also keep asking for records to open beside the list").
- `expected_output`: nothing to author. The record's name opens the full
page and the hover icon beside it opens the drawer over the list;
`navigation.mode` is deprecated on an object's list, so the contract
list view declares neither `page` nor `drawer`; a pane beside the list
is not offered (`split`, `modal`, `popover` are refused).
- `must_contain`: `navigation: { mode: 'page' }` and `Display menu` are
replaced by `icon`, the one word an answer that knows the rule has to
use and that the bundle teaches ("hover icon").
- `must_not_contain`: adds the two code spellings of the declaration,
`mode: 'page' },` and `mode: 'page',`, following the file's own
convention for a forbidden declaration (cases 1 and 5 forbid a key with
its trailing comma or brace), so an answer that names the key as the
thing to omit is not failed. The three retired values and `definePage(`
stay.
No eval round was run (a round is the eval seat's). Both token lists
changed, so earlier records of this case are set apart on a regrade.
## Tests
Round-one readings below are at head `a48596646`, merge base
`76cb36661`. Rework head `f65f4181d` (SKILL.md and the changeset only):
token ratchet exit 0, `skills/objectstack-ui/SKILL.md` 2186 tokens
(ceiling 2272), no ceiling row moved; `dispatch-gates.mjs --ran`: 50
derived, 48 run, 2 NOT MEASURED (whole-workspace build), 0 UNRUN;
overlap-check clean against `8925d5bcb`. No eval file moved after
`a48596646`, where the skill-evals test passed 38 of 38. Rework report:
card comment 7075067101.
<details><summary>Token ratchet, size and line budget</summary>
- `node scripts/check-skills-token-ratchet.mjs`: exit 0.
`skills/objectstack-ui/rules/record-page.md is 988 tokens (ceiling 991;
headroom 3)`; `skills/objectstack-ui/rules/navigation.md is 2554 tokens
(ceiling 2564; headroom 10)`. No ceiling row moved.
- `rules/record-page.md`: 64 lines before and after; 3951 to 3952 bytes;
988 tokens before and after. The added sentences are paid in the same
file by the removed `mode: 'page'` sentence, the step 5 aside "(always
the standard page)" (step 4 already says the drawer draws the standard
page) and the two step 6 items.
- `rules/navigation.md`: 191 lines before and after; 10219 to 10216
bytes; 2555 to 2554 tokens.
- `evals/README.md`: 54 lines before and after; 637 to 636 tokens.
`evals/record-page.json`: 117 to 118 lines; 1834 to 1826 tokens.
- Every `SKILL.md` summed: 4947 lines before and after (none touched).
Bundle total 289859 to 289849 tokens; ratcheted authored total 197477 to
197476; eval fixtures 77775 to 77766.
- PR net added lines (`git diff --shortstat` against the merge base,
changeset included): 27 added, 13 deleted, net +14. Budget 20.
</details>
<details><summary>Gates run locally</summary>
- Derived list (`node scripts/pm/dispatch-gates.mjs --commands`, 47
commands), each run under `scripts/pm/os-verify-lock.sh`, each exit code
captured before any pipe: 43 exit 0. `check:doc-formula-expressions`
first answered exit 3 (prerequisite), and exit 0 after `turbo run build`
of `@objectstack/formula` and `@objectstack/lint`.
- `node scripts/pm/dispatch-gates.mjs --ran`: `47 derived, 43 run, 4
NOT-MEASURED, 0 UNRUN`. NOT MEASURED, exit 3 `PREREQUISITE NOT MET`,
each asks for a whole-workspace `pnpm build` and reads built `dist/`
trees this diff cannot move (declared narrowing, left to CI):
`check:dts-closure`, `check:dual-build-cjs-loads`,
`check:lean-entry-closure`, `check:sourcemap-no-sources-content`.
- `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2
test/skill-evals/skill-evals.test.ts`, after building that package's
dependency closure: `Test Files 1 passed (1)`, `Tests 38 passed (38)`,
lock verdict `command-exit 0`. The first attempt, before the closure
build, loaded no test (unresolved workspace entry): not a reading.
- `pnpm --filter @objectstack/scenarios run skill-evals --dry-run
--skills objectstack-ui`: exit 0, `objectstack-ui: 47 case(s)`, no case
refused, `dry run: no login read, no model called, nothing written`.
- Outside the derived list, run because a changed path sits in their
roster directory: `pnpm check:changeset-fixed` exit 0, `pnpm
check:skill-top-level-keys` exit 0.
- NOT MEASURED: `pnpm --filter @objectstack/spec run
check:skill-examples`, exit 3 (prerequisite); outside the derived list,
and the fenced example blocks of both rule files are byte-identical to
the merge base.
- `node scripts/pm/overlap-check.mjs
--branch=claude/issue-35870-navigation-mode-skills` against
`origin/main` `b57f778b1`: `VERDICT clean exit 0`, 0 PR heads share a
file.
</details>
No ablation: the diff changes prose and an eval fixture, no tested
behaviour.
## Acceptance notes
- The claim's file surface lists four skills files and a changeset.
`rules/navigation.md` is added to it: its Surface bullet taught the same
retired rule ("`page` only by declaration") and the card's grep words do
not reach it. `references/react-blocks.md` is on the claim's list as
"measure" and is unchanged.
- Step 5 and the eval say "drawer" where the spec describe says "side
panel": the rest of the rule file (steps 4 and 6) already calls that
surface the drawer, and the `size` describe in the same schema does too.
- `openNewTab: true` (the spec's replacement for a list that declared
`new_window`) is not taught here: the bundle never taught `new_window`
on a list, and the `mode` describe this text follows does not carry it.
Noted, not filed.
- `ui/packages/app-shell/src/views/objectViewRecordNavigation.ts` line
34: a doc comment still names the reader's Open records preference,
which no longer exists. A comment, noted, not filed.
- `ui/scripts/check-skill-eval-tokens.mjs` lists no row for
`skills/objectstack-ui` (its bundle root is `skills/objectui`), so no
gate holds this bundle's `must_contain` tokens to its own markdown;
checked by hand here (`icon` is taught in `rules/record-page.md` step
5). An observation, noted, not filed.
- The ADR-0050 §2 note: carrier is the weekly ADR revisions card 36086
(see top).
## Verification
Read first, by risk:
1. `skills/objectstack-ui/rules/record-page.md`, the step 5 hunk: every
clause against the `[DEPRECATED]` describe of `mode` in
`packages/spec/src/ui/view.zod.ts`.
2. `skills/objectstack-ui/evals/record-page.json`, case 2: the single
`must_contain` token and the two forbidden code spellings.
3. `skills/objectstack-ui/rules/navigation.md`, the Surface bullet: the
one hunk outside the claim's file list.
Two-minute check: `git grep -n "mode: 'page'" --
skills/objectstack-ui/rules skills/objectstack-ui/evals` prints two
lines, both in `evals/record-page.json` under case 2's
`must_not_contain`; no rule file teaches the declaration.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5kDGa1ViantgrfH797)_
<!-- signed: repo:objectstack#4 · os-project-manager ·
session_01FEkQ5kDGa1ViantgrfH797 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent e100a37 commit 4c50ec7
6 files changed
Lines changed: 31 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments