Skip to content

refactor(ui)!: retire plugin-designer's dead collaboration code, VersionHistory and the useConfirmDialog entry export - #29529

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-ytcn0k
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-ytcn0k

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Part of #25921. This is the @object-ui/plugin-designer batch named in landing note 6579769954 ("New since this batch"), under claim 6583164004 and amendment 6583226546. The card stays open. Every other item it lists is untouched: CommentSearchResult, the providers/upload fold, clearSharedDiscoveryCache and the other packages' barrel batches.

Clause-②: no (narrowing)
Metadata-protocol: none

维护者速读

  • 改了什么:删除 @object-ui/plugin-designer 中 refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer #29388 之后已成死代码的协作实现:整个 CollaborationProvider.tsx,以及页面、数据模型、流程、报表四个设计器里永远为 null 的 useCollaboration() 分支和工具栏上的“N users / Connected”标记。删除无人渲染的 VersionHistory 组件及其测试。包入口不再导出 VersionHistory 和 useConfirmDialog。useConfirmDialog 模块保留,因为七个设计器内部都在用。
  • 为什么改:普查(refactor(ui)!: retire zero-consumer exports from @object-ui/collaboration and @object-ui/mobile #28385 方法,origin/main 128681f4,hotcrm d4ffe99)显示,这些名字在包外只有一个测试文件的历史注释提到,hotcrm 为零。CollaborationProvider 在全仓无人挂载,所以协作分支在运行时从不执行。
  • 风险与回滚:Console 和其它 @object-ui/* 包都不导入这两个名字,不受影响。外部 npm 用户若导入会在升级时编译报错,changeset 写明了改法。设计器行为不变。回滚即 revert 本 PR。
  • 先看:ui/packages/plugin-designer/src/index.tsx、ui/packages/plugin-designer/src/ReportDesigner.tsx(删得最多的设计器)、.changeset/25921-plugin-designer-dead-collaboration-version-history.md。
  • 两分钟验证:git grep -n -w -e CollaborationProvider -e useCollaboration -e VersionHistory -- ui/packages/plugin-designer ':!**/CHANGELOG.md',预期无输出(退出码 1)。
  • 需要你做的:无,席位落地(入队前欠一次契约复审档复审,由席位转总监)。

What changes

  • Dead collaboration code. src/CollaborationProvider.tsx is deleted: the provider, useCollaboration, ConnectionStatusIndicator and their types. CollaborationProvider left the entry in refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer #29388 and nothing mounts it anywhere, so useCollaboration() always returned null. In PageDesigner and ReportDesigner, the broadcastOp callback, its call sites and the broadcastOp entries in the hook dependency lists go. DataModelDesigner and ProcessDesigner lose their collaboration?.sendOperation(...) calls and the collaboration dependency entries. The always-hidden "N users" status chip (DataModel, Process) and the "Connected" chip (Report, with its local LABELS.collaborationConnected) go too, as does the now-unused Users icon import in DataModelDesigner. AppCreationWizard and ObjectManager had no collaboration branch.
  • VersionHistory. src/components/VersionHistory.tsx and its test VersionHistory.displayLocale-9909.test.tsx are deleted, along with its two components/index.ts lines and the entry line. Nothing in the package rendered it. The VersionHistory case leaves ariaLabelNames.zh-12145.test.tsx: the zh wait now anchors on the minimap image. The undo, redo and minimap names are still asserted against both packs.
  • useConfirmDialog. Only the entry line goes. hooks/useConfirmDialog.ts and its hooks/index.ts line stay, because AppCreationWizard, DataModelDesigner, FieldDesigner, ObjectManager, PageDesigner, ProcessDesigner and ReportDesigner import it. hooks/index.ts is a sub-barrel nothing imports, the same state refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer #29388 left it in.
  • README.md stops teaching both names. package.json's description drops "plus collaborative editing". One comment line in useDesignerTranslation.ts stops naming VersionHistory's region.
  • One ! changeset (patch, **BREAKING** banner, both declaration lines, the ADR-0087 not-required (runtime-export-retired …) marker naming both operands, and a FROM → TO "no replacement" line per name).

Why

The #28385 census was re-run before any edit at origin/main 128681f4 (hotcrm d4ffe99). For each name, git grep -l -w -F ran over the whole tree minus ui/packages/plugin-designer/**, **/CHANGELOG.md, the lockfiles, .changeset/** and ui/.changeset/** (A). The brief's cut (ui packages apps examples content, tests excluded) is B, test files only is T and hotcrm is H. IN counts the in-package non-test files.

name on the entry before A B T H IN result
ObjectGantt (control) gantt 189 53 134 0 0 control hits
SchemaRenderer (control) react 1168 299 841 3 0 control hits
CreateAppPage (kept control) yes 49 4 45 0 3 stays
useConfirmDialog yes 1 0 1 0 11 leaves the entry; module stays
VersionHistory yes 1 0 1 0 5 leaves the entry; module deleted
VersionHistoryProps no 0 0 0 0 2 deleted with the module
VersionHistoryEntry no 1 0 1 0 2 deleted with the module
DesignerConfirmDialogState no 1 0 1 0 2 stays (module stays)
CollaborationProvider no (left in #29388) 0 0 0 0 5 deleted
CollaborationProviderProps no 0 0 0 0 1 deleted
CollaborationContextValue no 0 0 0 0 1 deleted
useCollaboration no 0 0 0 0 5 deleted
ConnectionStatusIndicator no 0 0 0 0 1 deleted

The single A/T hit for useConfirmDialog, VersionHistory, VersionHistoryEntry and DesignerConfirmDialogState is one file, ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts. Its historical comments ("ConfirmDialogState sat here", "VersionEntry sat here") name the module paths. Under the claim, that comment does not keep a name. Keep rule 3: no kept entry export's declared signature names any retired type. Each appears only in its own module and its sub-barrel.

After the change, at the merged head d7514fc8, the same git grep over the whole tree (CHANGELOGs and changesets excluded) finds zero files for CollaborationProvider, CollaborationProviderProps, CollaborationContextValue, useCollaboration, ConnectionStatusIndicator and VersionHistoryProps. VersionHistory, VersionHistoryEntry and useConfirmDialog outside the package appear only in that test comment. useConfirmDialog is absent from src/index.tsx and README.md (git grep exit 1). Control: SchemaRenderer 1207 files.

Tests

  • Code head fb1192c3; d7514fc8 merges 10 origin/main commits, none under ui/packages/plugin-designer (branch delta re-read: the same 14 files, +52 / -573).
  • pnpm --filter @object-ui/plugin-designer run type-check (tsc --noEmit && tsc -p tsconfig.test.json): VERDICT command-exit 0 on fb1192c3 and again on d7514fc8.
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-designer/: Test Files 49 passed (49), Tests 456 passed (456), VERDICT command-exit 0 on both heads.
  • pnpm --dir ui exec vitest run --maxWorkers=2 scripts/ (includes check-readme-exports) on fb1192c3: Test Files 169 passed, 2 skipped (171); Tests 4921 passed, 2 skipped; VERDICT command-exit 0.
  • eslint on the eight changed source and test files: 0 errors, 18 warnings, all on lines this diff does not touch.
  • No ablation: this diff only deletes code, removes export lines and edits README text, so no tested behaviour changed. The zero-hit census above is the proof.

Acceptance notes

  • designer.versionHistory is now unread. Its only reader was VersionHistory. Per the claim it stays in the ten locale packs and in DESIGNER_DEFAULT_TRANSLATIONS, the table the en-pack mirror gate compares. It is left for the dead-key item.
  • The historical comments in ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts still name packages/plugin-designer/src/components/VersionHistory.tsx, a path this PR deletes. They are a "sat here" record of an older rename, outside this claim's surface, and left as they are.
  • @object-ui/types' CollaborationConfig, CollaborationPresence and CollaborationOperation lose this package as a reader. @object-ui/collaboration still imports all three, so they stay.
  • The importers of this package (@object-ui/app-shell's lazy designer pages, the Console) were not type-checked locally. The census shows neither imports either retired name (B = 0), and CI's Type Check UI compiles them.
  • A CONTRACT_REVIEW_TIER review is owed before the queue (an entry narrowing). The seat routes it to the director.

Verification

Derived gates: 46/46 run, 0 NOT-MEASURED

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at fb1192c3 gave 46 commands. --ran reports "46 derived famil(ies) accounted for — 46 run, 0 NOT-MEASURED". Every command exited 0. Among them: check-adr-0087-registration --base origin/main and --self-test, check-changeset-no-major --base origin/main, check-empty-changeset, check-sdui-manifest and its --self-test, check:published-files, check:undeclared-dep-imports, check:nul-bytes, check:query-options-erasure (293 s), check-comment-mask-corpus (20193 files, 0 disagree), check:type-check-debt (locked, 0 raw tsc errors) and vitest run scripts/.

At d7514fc8 the derived list is identical. check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check-sdui-manifest, check:changeset-fixed, check:nul-bytes, check:cross-package-test-inputs, check:published-files, check:undeclared-dep-imports and check:test-source-alias were re-run there, all exit 0.

Outside the derived set: check-platform-checklist --changed-from origin/main exit 0 (0 anchored files). dispatch-gates --tier: no path-derived mandate, 625 changed lines (under the 3000 threshold), no governed path.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind. (no names added)
  • 3. No formatter ran; eslint on the changed files exits 0 (warnings only, all pre-existing). The repo-wide pnpm lint is CI's run.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.

Generated by Claude Code

…ionHistory and the useConfirmDialog entry line

The CollaborationProvider left the package entry in the previous batch and
nothing mounts it, so useCollaboration() is always null: delete the module
and the four designers' broadcast branches and status chips. VersionHistory
has no reader in the package or outside it: delete the module, its test and
its sub-barrel lines. useConfirmDialog stays module-local (seven designers
use it); only the entry and README stop publishing it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jR9JS6qCZyzC5esvUr
… from the aria-label census

The data model and process designers no longer render the collaboration
status chip, so the census declares one literal fewer in each file.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jR9JS6qCZyzC5esvUr
@github-actions github-actions Bot added the tests label Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Contract-review-claim: session_01QsR2jV5sBSzCYNEDgpYLJw · head 681e6c7 · 2026-11-02T18:30Z


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

director#1 · zhuangjianguo · session_01QsR2jV5sBSzCYNEDgpYLJw

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 681e6c7a6b6482c23b76bfb26b132e43777801c4
Local-runs: none
Scope: ui/packages/plugin-designer/src/index.tsx, src/components/index.ts, src/CollaborationProvider.tsx (deleted), src/components/VersionHistory.tsx (deleted), src/tests/VersionHistory.displayLocale-9909.test.tsx (deleted), src/DataModelDesigner.tsx, src/PageDesigner.tsx, src/ProcessDesigner.tsx, src/ReportDesigner.tsx, src/tests/ariaLabelNames.zh-12145.test.tsx, src/hooks/useDesignerTranslation.ts, README.md, package.json, ui/packages/i18n/src/tests/ariaLabelLiteralCensus-12145.test.ts, .changeset/25921-plugin-designer-dead-collaboration-version-history.md + a git grep -l -w -F census on origin/main 390bd2ae of every retired name outside the package, CollaborationProvider.tsx L33 / L205–206 on main, scripts/pm/clause2-line.mjs L84–121, AGENTS.md step 3 (the two declaration lines), the #29388 record 6579108918 and its changesets (.changeset/25921-plugin-designer-internal-helpers-off-entry.md, 25921-collaboration-zero-consumer-exports.md), card #25921, claim 6583164004 and amendments 6583226546 / 6584572334, the seat's census and os-dev report under /mnt/project-files/issue-25921-seat3/

Read-only review of the committed tree; nothing was built or run here.

① Derived judgments

  • Zero-consumer census reproduced. On origin/main 390bd2ae, outside ui/packages/plugin-designer/** (CHANGELOGs, changesets and lockfiles excluded), useConfirmDialog, VersionHistory, VersionHistoryEntry and DesignerConfirmDialogState each hit one file, ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts, in its "sat here" comments; VersionHistoryProps, CollaborationProvider, useCollaboration, ConnectionStatusIndicator hit nothing. The seat's A/B/T/H table (hotcrm d4ffe99, H = 0) matches. Holds.
  • The collaboration branches were dead by construction. CollaborationProvider.tsx L33 creates the context with a null default and useCollaboration() (L205–206) is a bare useContext; <CollaborationProvider is mounted nowhere in the tree (0 hits), and the provider left the entry in refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer #29388. So in the four designers collaboration was always null: every removed line is a collaboration?.… call, a broadcastOp that returned on !collaboration, a collaboration?.isConnected && chip, or the matching dependency-array entry. No other line of the four designers moves (hunks read). Holds.
  • useConfirmDialog stays as a module. Seven designers import it (AppCreationWizard, DataModelDesigner, FieldDesigner, ObjectManager, PageDesigner, ProcessDesigner, ReportDesigner); only the entry line and the README lines go; hooks/index.ts keeps its line and has no importer. Holds.
  • VersionHistory had no renderer. In-package non-test references are its own module, the components barrel, one comment and the entry; the module, its test and the barrel lines go together with VersionHistoryProps / VersionHistoryEntry. Keep rule 3 (no kept entry export's declared signature names a retired type) holds: neither type appears outside its module and sub-barrel. Holds.
  • Tests moved truthfully. ariaLabelNames.zh-12145 loses the VersionHistory region and anchors the zh wait on the minimap image it still asserts; undo / redo / minimap stay checked against both packs. The i18n aria-label census drops the two Collaboration active rows whose literals this diff deletes; the census stays a true backlog. Holds.
  • Field security: none in reach; nothing withheld.

② Semver level

③ Boundary flags

  • Not Tier H: no governed path. Tier S as claimed; the seat lands after the fix and a re-review of the new head, which only needs the two lines compared.
  • The PR body's Tests section still names d7514fc8 as the head the suites ran on; 681e6c7a adds only the aria-census row deletions, re-run by the dev (52 files / 472 tests). The seat's ACCEPT names the final head; the seat already knows.
  • CI on 681e6c7a: 45 success, 11 skipped, no red (read 18:3xZ).
  • Left as the dev noted, outside this claim: designer.versionHistory is now an unread key in the ten packs and DESIGNER_DEFAULT_TRANSLATIONS (the dead-key item); the 6273 test's historical comments still name the deleted VersionHistory.tsx path.

④ Design judgment

  • src/index.tsx: the hooks comment now lists the confirm-dialog hook among the module-local internals and drops the provider sentence; truthful on this head. README.md and the package.json description stop teaching collaboration. useDesignerTranslation.ts keeps the i18n comment accurate. Holds.
  • The four designers read cleaner for the deletion; no dependency array lost a live entry (each removed entry is collaboration or broadcastOp). Holds.
  • Changeset body: Before / what stays / what leaves, two FROM → TO lines. Holds once the declaration line is corrected.

One must-fix (② — both Clause-② lines to no (narrowing)). No should-fix.

Implemented-by: claude/project-thread-ytcn0k
Reviewed-by: session_01QsR2jV5sBSzCYNEDgpYLJw

VERDICT: FAIL


Generated by Claude Code

…arrowing

The batch only removes names from the package entry, so the Clause-② line
reads "no (narrowing)" rather than a bare "yes".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jR9JS6qCZyzC5esvUr

Copy link
Copy Markdown
Collaborator

Contract-review-claim: session_01QsR2jV5sBSzCYNEDgpYLJw · head bf91408 · 2026-11-02T18:37Z (re-review of the must-fix in record 6585079783)


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

director#1 · zhuangjianguo · session_01QsR2jV5sBSzCYNEDgpYLJw

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: bf9140860e74a6e8fc65f15a49f7ec370656bea2
Local-runs: none
Scope: the delta 681e6c7a…bf914086 (one commit, one file: .changeset/25921-plugin-designer-dead-collaboration-version-history.md, one line) and the PR body's declaration line + record 6585079783 (the review of 681e6c7a, whose findings carry over unchanged), scripts/pm/clause2-line.mjs L111–117, .changeset/25921-plugin-designer-internal-helpers-off-entry.md and 25921-plugin-gantt-internal-helpers-off-entry.md on origin/main

Re-review of the one must-fix in record 6585079783. Read-only; nothing was built or run here.

① Derived judgments

② Semver level

  • @object-ui/plugin-designer patch, Clause-②: no (narrowing), Metadata-protocol: none, **BREAKING** banner, ADR-0087 not-required (runtime-export-retired …) naming the two published operands. Right (as in the prior record, now with the declaration line true). The dev reports check-changeset-no-major and check-adr-0087-registration exit 0 on this head.

③ Boundary flags

  • Not Tier H. CI on bf914086 was still running when this was written (6 success, 19 in progress, 13 skipped); the seat's five pre-landing checks need its green head as usual.
  • The body's Tests section still cites d7514fc8 as the suite head; the seat's ACCEPT names the final head.

④ Design judgment

  • Unchanged from record 6585079783.

No must-fix. No should-fix.

Implemented-by: claude/project-thread-ytcn0k
Reviewed-by: session_01QsR2jV5sBSzCYNEDgpYLJw

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m

席位核对 · ACCEPT · 2026-11-02T18:53Z

Head-sha: bf9140860e74a6e8fc65f15a49f7ec370656bea2

  • Shape: draft → main, Part of #25921 and no closing keyword, so the card stays open for later batches. 15 files, +54 / −575 (629 lines ≤ 3000). No governed path: check-governed-merges --pr 29529 reports NOT governed. The body and the patch changeset for @object-ui/plugin-designer both read Clause-②: no (narrowing) and Metadata-protocol: none, line-initial, per claim 6583164004 as amended by 6583226546, 6584572334 and 6585097086. The adr-0087 runtime-export-retired marker names both operands.
  • Contract review (CONTRACT_REVIEW_TIER, director): PASS on this head, record 6585173672. It follows FAIL record 6585079783 on 681e6c7a, whose one must-fix was the Clause-② arm. The compare 681e6c7a...bf914086 is that one changeset line, and the seat patched the PR body's line to match. The director reproduced the census at origin/main 390bd2ae. Not Tier H.
  • File surface: inside the claim as amended:
    • plugin-designer's CollaborationProvider.tsx, components/VersionHistory.tsx and its test (deleted)
    • the four designers' dead collaboration branches
    • index.tsx, components/index.ts, README, package.json description, one useDesignerTranslation comment line
    • the VersionHistory case in ariaLabelNames.zh-12145, the two Collaboration active rows of the i18n ariaLabelLiteralCensus-12145, and the changeset
  • Read in the diff:
    • The entry stops exporting useConfirmDialog and VersionHistory. The useConfirmDialog module and its hooks/index.ts line stay, because seven designers import it.
    • CollaborationProvider was mounted nowhere after refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer #29388, so every useCollaboration() read was the context's null default. The deleted branches (broadcastOp / sendOperation calls, deps entries, the "N users" and "Connected" chips) could not run. No designer behaves differently.
    • Census before at 128681f4, with hotcrm d4ffe99: both retired names B0 H0. The one A hit is a comment in one-authority-per-exported-name-6273.test.ts.
  • Tests (dev):
    • plugin-designer type-check exit 0.
    • plugin-designer vitest: 49 files / 456 tests. ui scripts/: 169 files.
    • On 681e6c7a, the aria census plus plugin-designer: 52 files / 472 tests.
    • Derived gates 46 of 46, --ran reconciled. Dogfood battery exit 0 at d7514fc8; later heads touch only an i18n test and the changeset.
  • Gates (check-runs on this head): 47 success, 13 skipped, 0 failed or pending. mergeable_state is clean.
  • Record correction: the body's Tests and census paragraphs name the earlier head d7514fc8. Code is unchanged since then; 681e6c7a touched an i18n test and bf914086 one changeset line. The seat did not apply the dev's rewritten body. The body otherwise holds.
  • Out of scope (dev, carrier none, left on retire the zero-consumer surface: nine dead modules (2,211 LOC), plugin-ai, runner's publish flag, test-only reset helpers on public barrels, the providers trio, 122 dead i18n keys, root orphans #25921):
    • designer.versionHistory is now an unread key in the ten packs and in DESIGNER_DEFAULT_TRANSLATIONS.
    • The historical comments in one-authority-per-exported-name-6273.test.ts name the deleted path.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. After the merge, retire the zero-consumer surface: nine dead modules (2,211 LOC), plugin-ai, runner's publish flag, test-only reset helpers on public barrels, the providers trio, 122 dead i18n keys, root orphans #25921 goes back to pm:queue unassigned for its next batch.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 2, 2026 18:53
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 2, 2026 18:54
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 389de4a Nov 2, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ytcn0k branch November 2, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants