Repository navigation
Commit f810c34
refactor(types)!: delete SubqueryNode and the filter builder configuration pair nothing reads (#31101)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoGkWmgZR7t1GLVZ3tjBQgX3)_
Part of #25921 (batch 12, claim 6703671714 with amendment 6703700084
naming the batch and its three rulings; the card's other open items stay
on it)
Clause-②: no (narrowing)
Metadata-protocol: none
## 维护者速读
- 改了什么:从 `@object-ui/types` 的 `data-protocol.ts` 删除 3 个没人读的类型:查询 AST 的
`SubqueryNode`,以及过滤器构建器配置一组的 `FilterBuilderConfig`、`FilterFieldConfig`。
- 为什么改:#25921 清理零消费者公开面;这 3 个名字在仓内与 hotcrm 都没有任何引用,没有任何查询构建器或过滤器 UI
构造或读取它们,留着会被当成 UI 协议包的公开承诺。
- 风险与回滚:纯类型删除,构建出的 JavaScript 不变;同模块的其它查询节点类型与 `DateRangeFilter`
原样保留。对外部 npm 使用者是破坏性变更,带一个 `!` patch changeset(BREAKING、FROM/TO、ADR-0087
`runtime-export-retired` 3 个)。另外按席位裁决修正了第 8 批待发 changeset
里一句「`FilterBuilderConfig` 保持导出」的话(DELIBERATE CORRECTION,见下)。回滚即 revert 本
PR。
-
先看:`ui/packages/types/src/data-protocol.ts`(删掉的声明与退役注释)、`.changeset/25921-types-subquery-filter-builder.md`(迁移说明)、`.changeset/25921-types-driver-datasource-block.md`(被修正的一句)。
- 两分钟验证:`git grep -lw -e SubqueryNode -e FilterBuilderConfig -e
FilterFieldConfig -- ui packages` 预期只命中 `ui/packages/types` 里的退役注释与本
changeset;`pnpm --dir ui exec vitest run packages/types/` 预期全绿。
- 需要你做的:无,席位落地。
## What changes
`@object-ui/types` (its `.` entry) loses 3 types of
`src/data-protocol.ts`. They are deleted from the module, not only from
the entry:
`SubqueryNode`, `FilterBuilderConfig`, `FilterFieldConfig`.
- `src/data-protocol.ts`: the "Subquery node (Phase 3.3.3)" interface
and the "Filter builder configuration (Phase 3.4.5)" pair go, each
replaced by a two-line retirement comment.
`FilterBuilderDateRangePreset`'s JSDoc said its eight future windows
serve "the `FilterBuilderConfig` surface below"; it now names
`DateRangeFilter`'s `preset`, the one remaining reader (ruling 3).
- `src/index.ts`: the three names leave the `./data-protocol.js` type
list; a comment at each spot names them.
- `src/__tests__/phase35-validation-types-retired-10719.test.ts`: its
second firing control used `FilterFieldConfig` as "the neighbouring
filter type"; it now uses `DateRangeFilter`, same matcher, same module,
kept (ruling 1, option A). The absence assertion and the
`ObjectValidationRule` control are unchanged.
- `.changeset/25921-types-subquery-filter-builder.md`: one `!` patch
changeset, BREAKING, FROM/TO per name (no replacement in this package),
and the ADR-0087 `runtime-export-retired` marker naming all 3.
- `.changeset/25921-types-driver-datasource-block.md`: one sentence
corrected, see below.
`data-protocol.ts` is reached only through the `.` entry; no subpath
entry of the package exports it.
### DELIBERATE CORRECTION of a pending release note
`.changeset/25921-types-driver-datasource-block.md` (batch 8, still
pending) listed `FilterBuilderConfig` among the `data-protocol.ts` names
that stay exported. Both changesets compile into the same release, so
that sentence would publish as false next to this batch's BREAKING note.
Seat ruling 2 (amendment 6703700084, option A): delete only that name
from that sentence and touch nothing else in the file. The corrected
sentence now reads:
> Every other name of `data-protocol.ts` stays exported unchanged, among
them `DriverQueryConfig`, `SqlQueryAST`, the query-AST node types,
`AdvancedFilterSchema` and `ObjectValidationRule` with its variants.
`check-empty-changeset` stays red on this file by design (the DELIBERATE
CORRECTION class); the dispatching seat's record confirms it.
## Tests
- One in-package test changes: the firing control above. No other test
reads the 3 names.
- No ablation: a deletion of types with no tested behaviour behind it.
The reverse probe below is the proof that the built `.d.ts` is the one
read.
## Verification
<details><summary>Census (read-only, before any edit; origin/main
b631573, hotcrm 6961ab1)</summary>
- Tool: the batch 8 census (TS AST of every published `ui/packages/*`
main entry; identifier-token index over every tracked file of both
repositories minus CHANGELOGs, changesets, the lockfile and release
notes; prose and tests count as consumers; then not taught in
README/demo/docs and not named by a kept export's declaration).
`@object-ui/types`: 705 entry names, 144 zero-outside, 42 candidates.
Note: this project's files `ui-seat-3/r2026-11-06/25921-b12-census.md`.
- `git grep -lw` per name, whole repository: 0 hits outside
`ui/packages/types/` except the pending batch 8 changeset (corrected
above); hotcrm 0 for all 3.
- No zod twin, not an arm of `AnySchema`, no subpath entry, not taught.
- Positive controls, same module: `OffsetNode` and `AggregateNode` (core
`query/query-ast.ts`), `DateRangeFilter` (core
`utils/dashboard-filters.ts`). `AdvancedFilterOperator`, which typed
`FilterFieldConfig.operators`, stays (`AdvancedFilterCondition` and a
`ui/docs` audit read it).
- No open PR touches `ui/packages/types/` (the claim's read at 07:00Z).
</details>
<details><summary>Local runs on head 736cafb (base b631573)</summary>
- `env -u OS_SKIP_DTS pnpm --filter '@object-ui/types^...' build`, then
`env -u OS_SKIP_DTS pnpm --filter @object-ui/types build` from a clean
`dist` + `tsbuildinfo`, `pnpm --filter @object-ui/types run type-check`
and `pnpm --dir ui exec vitest run packages/types/`: VERDICT
command-exit 0; Test Files 388 passed (388), Tests 10470 passed (10470).
Built `dist`: 0 files name `SubqueryNode`, `FilterBuilderConfig` or
`FilterFieldConfig`; the control `DateRangeFilter` is in 4.
- Reverse probe against the built `dist/index.d.ts`: a scratch file
importing the 3 names plus the control `DateRangeFilter`, `tsc --noEmit
--module nodenext`: 3 errors (TS2305 / TS2724, one per retired name), 0
on the control line.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 36 derived, all run with stdin closed; 35
exit 0, `check-empty-changeset.mjs --base origin/main` exit 1 (the
DELIBERATE CORRECTION above, by design). `--ran`: 36 run, 0
NOT-MEASURED, 0 UNRUN. `check-adr-0087-registration` verified all 3
operands at `data-protocol.ts`. `pnpm --dir ui exec vitest run
scripts/`: 170 passed, 2 skipped (after building client and formula).
- Extra: `node scripts/check-platform-checklist.mjs --changed-from
origin/main` exit 0; `pnpm check:new-line-citations` (ui) 0 new.
- Full dogfood battery: `pnpm --filter @objectstack/dogfood test` under
the verify lock (closure built first) on 736cafb: VERDICT command-exit
0; Test Files 434 passed, 3 skipped (437); Tests 3596 passed, 41 skipped
(3637); no failure.
</details>
## Acceptance notes
- Still open on #25921 after this batch, in `@object-ui/types`:
`field-types.ts`'s `VisibilityCondition` (an objectui#12242 orphan; its
neighbour `FieldValidationFunction` stays because the one-authority
gate's remedy text under `ui/scripts` teaches it, and `FieldConstraints`
is module-local, not on the entry), `AuditFieldName`,
`ContainerSchemaWithChildren`, and the two `designer.ts` blocks (Unified
View with the objectui#12063 tombstone pin, Dashboard with a zod twin).
`DataContext`, `EventHandlers` and `StyleProps` have no readers but sit
on the `./data` and `./base` subpath entries, which the claim fences.
The seven `Spec*` spec/ui aliases still wait on a predicate-2 ruling.
`types/src/ai.ts` keeps its tombstones until the sunset rule of #25912;
not touched here.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibvW4JtHmnJuaoYMkAY)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 465c2be commit f810c34
5 files changed
Lines changed: 31 additions & 68 deletions
File tree
- .changeset
- ui/packages/types/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| 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 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 160 | + | |
| 161 | + | |
168 | 162 | | |
169 | 163 | | |
170 | 164 | | |
| |||
571 | 565 | | |
572 | 566 | | |
573 | 567 | | |
574 | | - | |
| 568 | + | |
575 | 569 | | |
576 | 570 | | |
577 | 571 | | |
| |||
608 | 602 | | |
609 | 603 | | |
610 | 604 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
665 | 608 | | |
666 | 609 | | |
667 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
| 663 | + | |
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
691 | | - | |
| 690 | + | |
| 691 | + | |
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| |||
0 commit comments