Repository navigation
Commit 3fb1a24
refactor(collaboration,mobile): delete readerless createPresenceUpdater and requestBackgroundSync (#28402)
domain:ui#5 · os-sales · session_01L6bhgUhKx1XHzkoikGjRB4
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuJSyZAA88UvC1TbJJXdgoi2)_
Part of #25921
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:删除 `@object-ui/collaboration` 里的 `createPresenceUpdater` 和
`@object-ui/mobile` 里的 `requestBackgroundSync` 两个函数体,共 50 行。
- 为什么改:上一个 PR 已把这两个名字移出包入口,仓库内再无任何读取者,留着只是死代码。
- 风险与回滚:无公开面变化,两个包都只有一个 `.` 入口,外部无法导入;回滚即 revert 这一个提交。
- 先看:`ui/packages/collaboration/src/usePresence.ts`
末尾、`ui/packages/mobile/src/serviceWorkerSource.ts` 末尾(都是文件尾部整段删除)。
- 两分钟验证:`git grep -nw -e createPresenceUpdater -e requestBackgroundSync
-- . ':!**/CHANGELOG.md'` 只应命中 `.changeset/` 里 #25921 的三个 changeset(本 PR
新增的一个,加上 PR #28385 的两个),源码零命中。
- 需要你做的:无,席位落地。
## What changes
Deletes the module-local function `createPresenceUpdater`
(`usePresence.ts`) and `requestBackgroundSync`
(`serviceWorkerSource.ts`). No imports or types became unused; no test
exercised either function (none found by `git grep -w`). Net 50
deletions plus one patch changeset.
Changeset vs `skip-changeset`: both packages compile with `tsc` and ship
`dist` (`files[]`), so `dist/usePresence.js` and
`dist/serviceWorkerSource.js` change bytes; a patch changeset is added
and no `skip-changeset` label. It is not a public-surface change: the
single `.` export of each package already dropped both names.
## Tests
- `pnpm --filter @object-ui/collaboration run type-check` exit 0; `pnpm
--dir ui exec vitest run packages/collaboration/` 7 files / 83 tests
pass.
- `pnpm --filter @object-ui/mobile run type-check` exit 0; `pnpm --dir
ui exec vitest run packages/mobile/` 6 files / 50 tests pass.
- Dependency closure built first (`@object-ui/collaboration^...`,
`@object-ui/mobile^...`).
## Acceptance notes
- Premise re-measured on origin/main 125ad06: `git grep -nw` over the
whole tree (examples, packages/console, skills, content/docs, READMEs)
finds each name only at its definition plus CHANGELOG history.
- `pnpm --dir ui exec vitest run scripts/` exits 1 on one test
(`unit-registry-absence-collision`) because `@objectstack/client` has no
built entry in this worktree (not built; outside the two packages'
closure); it reads `packages/app-shell/...`, not the files touched here.
Reported as NOT MEASURED for that family; CI builds it.
## Verification
<details><summary>Derived gates at bec3be1 (all exit 0 except the one
above)</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` run in full, including `node
scripts/check-sdui-manifest.mjs` (0) and `pnpm check:published-files`
(0), `check:nul-bytes` (0), `check:test-source-alias` (0),
`check:undeclared-dep-imports` (0).
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgUhKx1XHzkoikGjRB4)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgUhKx1XHzkoikGjRB4
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7e9f814 commit 3fb1a24
3 files changed
Lines changed: 11 additions & 50 deletions
File tree
- .changeset
- ui/packages
- collaboration/src
- mobile/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
0 commit comments