Repository navigation
Commit 1a95c74
docs(spec): the view filter any-of group is described as live, not planned (#29534)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8GryRwZRPx8VGbUQRn2eZiM)_
Fixes #28522
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:视图筛选「任一满足」组 `{ or: [...] }` 的 spec 说明文字与 `$or` 拒收提示,去掉「[PLANNED]
尚无控制台读取 / 载入即被拒」的旧说法,改述现状;同步 liveness 注记与生成的参考文档。无行为改动。
- 为什么改:控制台那一半已落地(#28370,PR #28475),`/meta/types`
与拒收提示仍告诉作者这个形态不可用,把人引向两个视图或客户端变通。
- 风险与回滚:仅文字;schema 接受与拒收的内容逐字节不变。回滚即 revert 本 PR。描述文字随 `dist` 与
`src/**/*.zod.ts` 发布,故带 patch changeset。
- 先看:`packages/spec/src/ui/view.zod.ts`(`ViewFilterOrGroupSchema` 文档注释与
`.describe`)、`packages/spec/src/ui/filter-rule-array.ts`(`$or`
拒收句)、`packages/spec/liveness/view.json`(`list.filter` 注记)。
- 两分钟验证:`pnpm --filter @objectstack/spec exec vitest run
src/ui/view-filter-or-group.test.ts
src/ui/filter-rule-array-guidance.test.ts`,预期全部通过。
- 需要你做的:无,席位落地。
## What changes
The console now applies a view filter's any-of group: `toFilterNode` in
`ui/packages/core/src/utils/filter-converter.ts` lowers `{ or: [rule,
...] }` to one `or` node inside the list's AND, and the filter builder
edits a filter that is exactly one group (`builderRulesOfSpecFilter`,
the save fold in `ui/packages/app-shell/src/views/viewFilterFold.ts`).
The spec still said the opposite. This PR corrects the prose only.
- `packages/spec/src/ui/view.zod.ts`, `ViewFilterOrGroupSchema`: the `##
[PLANNED — not yet rendered]` docblock section becomes `## Applied by
the console`, which names the lowering and the builder's one-group rule.
The `.describe` loses its `[PLANNED — not yet rendered]` prefix and the
"No console reads it yet … refused when it loads" sentences; it now ends
"The console applies it, ANDed with its sibling elements, and its filter
builder edits a filter that is exactly one group."
- `packages/spec/src/ui/filter-rule-array.ts`: the `$or` refusal still
prescribes the any-of group element, without "(declared, but no console
applies it yet, so it does not narrow the rows today)". The code comment
no longer cites the PLANNED note.
- `packages/spec/liveness/view.json`, `props.list.children.filter.note`:
the "rides this live verdict at PLANNED strength" sentence is amended as
it asked, citing the group read (`toFilterNode` via
`viewFilterOrGroupToNode`, reached from `ListView.tsx`
`buildEffectiveFilter` through `mergeFilterNodes` and from
`ObjectView.tsx`; the builder fold and its read-back). Status stays
`live`.
- `packages/spec/src/conversions/registry.ts`, `dollarKeysReason`: the
TODO reason that the record-form filter conversion gives for a `$or`
record drops "(declared, not yet applied by any console)".
- `content/docs/references/ui/{view,page,component}.mdx`: regenerated by
`gen:docs`. Each changed line is only this describe.
- `.changeset/28522-view-or-group-live.md`: `@objectstack/spec` patch.
## Why
Every author, human or AI, who reads `/meta/types` for a view `filter`,
or who writes a MongoDB-style `$or` and gets the parse refusal, was told
the group is not applied and that a view storing one fails to load. That
steered them away from the one shape that works.
## Tests
No behaviour changed, so there is no new behaviour test and no ablation.
Two pins held the old wording and are updated:
- `packages/spec/src/ui/view-filter-or-group.test.ts`: the describe pin
now asserts the description starts with "An any-of group:" and carries
no `[PLANNED` marker (it asserted the marker before).
- `packages/spec/src/ui/filter-rule-array-guidance.test.ts`: the
`toContain('no console applies it yet')` line is removed; the pin that
the refusal names the any-of group element stays.
## Acceptance notes
- The liveness note edit is outside the claim's listed file surface but
inside the card's Wanted ("Any liveness / marker register row that lists
this key as planned moves with it"). No other register lists the key as
planned. A line grep missed one more copy of the false status:
`dollarKeysReason` in `packages/spec/src/conversions/registry.ts` splits
it across two string literals. The contract review found it (record
6585135393), and it is fixed here. A re-sweep with literals and comment
lines joined finds no other copy.
- `.changeset/28020-view-filter-or-group.md` and
`packages/spec/CHANGELOG.md` keep their wording; both are release-owned
history.
- Main was merged before opening (16 commits, including PR #29447 at
other `view.zod.ts` hunks). `view.mdx` was regenerated from the merged
tree; the branch's delta vs `origin/main` is exactly the nine files
above.
## Verification
Patch round 1: head `6966a0b17` (`f42d8a2e` + `origin/main` merged
again): 105 derived, 104 exit 0, `check:dual-build-cjs-loads` NOT
MEASURED (exit 3; CI runs it); spec 794 files / 23549 tests pass;
typecheck 0. Contract re-review PASS 6586088767 on this head.
Round 0 readings, kept below, were at head `b71e28d33` (base `94d3e254`,
then `origin/main` `c88467d4a` merged in).
<details><summary>dispatch-gates: 104 derived, 104 exit 0</summary>
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `b71e28d33`: 104 commands, each run from
a runner with its exit code captured before any pipe.
- All 104 exited 0. Reconciliation: `dispatch-gates --ran` printed "104
derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED".
- Prerequisites built first under the verify lock: `turbo run build` for
formula, lint, client, client-react and objectql; the pinned fixture
commit of `check-plugin-teardown-shape --self-test` fetched.
- An earlier pass at `70500e67`, before the merge, read 103 exit 0 and
`check:dual-build-cjs-loads` exit 3 (prerequisite); the final pass
measured it at exit 0.
</details>
<details><summary>spec package: test, typecheck, generated
artifacts</summary>
- `pnpm --filter @objectstack/spec test`: Test Files 792 passed (792),
Tests 23522 passed, 1 todo. Exit 0.
- `pnpm --filter @objectstack/spec typecheck`: exit 0.
- `pnpm --filter @objectstack/spec check:generated --fix` after the
merge: 1 of 14 stale (`content/docs/references/**`), regenerated and
committed. The diff of `view.mdx` against `origin/main` is only the five
describe lines.
- Published text: after the build, `packages/spec/dist` carries "The
console applies it, ANDed with its" (`chunk-HDN2DLYE.js`,
`chunk-M3JDHXOJ.mjs`) and 0 files carry "No console reads it yet".
`view.zod.ts` and `liveness/` also ship through `files[]`, so the
changeset is patch, not skip-changeset.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbYCMdGp2Cju6A39cTB)_
<!-- signed: domain:spec#5 · os-warren ·
session_01JQwxbWR3K3h7i1ytwycVg1 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 12415a8 commit 1a95c74
10 files changed
Lines changed: 55 additions & 44 deletions
File tree
- .changeset
- content/docs/references/ui
- packages/spec
- liveness
- src
- conversions
- ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
| 744 | + | |
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
| 902 | + | |
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | | - | |
| 1069 | + | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | | - | |
| 1152 | + | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
| |||
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | | - | |
| 1296 | + | |
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
1375 | | - | |
| 1375 | + | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | | - | |
| 1474 | + | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
| |||
1938 | 1938 | | |
1939 | 1939 | | |
1940 | 1940 | | |
1941 | | - | |
| 1941 | + | |
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
| |||
2099 | 2099 | | |
2100 | 2100 | | |
2101 | 2101 | | |
2102 | | - | |
| 2102 | + | |
2103 | 2103 | | |
2104 | 2104 | | |
2105 | 2105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
0 commit comments