Repository navigation
Commit 01e6af6
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D62xGLMbyWJaMEVnAMEjTK1)_
Part of #34730
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:在接入了 Slack 连接器的部署上,组织管理员在“设置 ›
集成”菜单里多了一个“Slack”入口,点开就是上一张界面改动做好的 Slack 管理页;没有接入 Slack 的部署菜单不变。
- 为什么做:这是「Slack 私信通知」专题第三步的服务端一半,补上管理页的菜单入口,同时补写上一步欠下的一句更新说明。
- 出错会怎样:最坏是入口不出现或排在别的位置,管理页本身仍可用地址直接打开;改动只加一个菜单项,可以直接撤回。
- 要你做什么:无。
## What changes
Step 3 of #34730, server half: Setup's menu entry for the Slack page
that PR #35968 adds (component `messaging:slack`, gated by
`setup.write`, today reachable only at
`/apps/setup/component/messaging/slack`). This PR was written in session
`session_016WV4czKnDE6hsyXQzB9wB2`.
- **The entry** (`service-messaging/src/slack-setup-ui.ts`):
`SLACK_SETUP_UI_BUNDLE` contributes Setup › Integrations
(`group_integrations`) › **Slack**, `type: 'component'`, `componentRef:
'messaging:slack'`, `requiredPermissions: ['setup.write']` (the
`SLACK_ADMIN_CAPABILITY` every Slack administrator door asks), priority
140: after Connector Credentials / Connector Connections (120), before
Cloud Connection (200). The shape copies
`CONNECTOR_CREDENTIALS_UI_BUNDLE` in service-automation.
- **Registered only where the slack channel registers**:
`MessagingServicePlugin` registers the bundle through the `manifest`
service inside the same `kernel:ready` hook as the `slack` channel,
after the same `if (!getSlack()) return;`. Without connector-slack, no
entry. A composition with no `manifest` service gets no entry and still
boots (the pattern's try/catch).
- **Nav label i18n, the pattern's way**:
`apps.setup.navigation.nav_slack.label` = `Slack` (the product name,
kept verbatim as `Webhooks` is in `zh-CN`) in all eleven platform
locales under `packages/platform-objects/src/apps/translations/`, with
the source digest recorded in the seven locales that record one for the
neighbouring `nav_connector_connections` (`c3c9e181e8c74b22`, computed
with `hashSource`; control: `Connector Connections` reproduces the
committed `949e9a8fd25c3d57`).
- **Gates that judge the entry**:
`packages/cli/scripts/check-app-nav-i18n.mjs` gains a roster row reading
`SLACK_SETUP_UI_BUNDLE` (the `service-automation` row's shape, since the
bundle registers at `kernel:ready`), so the label is judged in every
locale; `packages/cli/test/setup-integrations-order.pin.test.ts` orders
it as its own tier. `packages/cli/vitest.config.ts` resolves
`@objectstack/service-messaging` to source (`check:test-source-alias`
asked for it); `packages/services/service-messaging/vitest.config.ts`
declares `OS_REGISTRY_LOG: 'warn'` (`check:registry-log-declared` asked
for it, since the new pin folds a `SchemaRegistry`).
- **Changeset** (`.changeset/34730-s3b-slack-setup-entry.md`, patch on
service-messaging and platform-objects): the entry, plus the sentence
owed from step 2: the topic `messaging.slack_link_removed` is listed by
`GET /api/v1/messaging/preference-options` and `GET
/api/v1/messaging/me/preferences` on every deployment, and is emitted
only where connector-slack is composed (when an administrator removes a
person's link or the organization's install).
Read first: `messaging-service-plugin.ts` (the hook, the riskiest hunk:
the registration must stay behind the slack guard), `slack-setup-ui.ts`,
`slack-channel-composition.test.ts`.
Two-minute check: `pnpm --filter @objectstack/service-messaging exec
vitest run src/slack-channel-composition.test.ts` shows 5 passed, among
them "with a slack service: the entry is registered once and served
under Integrations" and "without a slack service: no entry is registered
and Integrations serves none".
## Evals
Base `523ada4cc0`; tests below at `fd50ed384d` / `60b28db358` (final
head; the last commit only adds the cli alias).
<details><summary>Pins: with and without connector-slack, through the
Setup app fold</summary>
The new top-level describe sits in the existing slack composition
harness (`slack-channel-composition.test.ts`), whose `compose({ slack
})` boots `MessagingServicePlugin` with and without connector-slack's
`slack` service. The harness now records what the plugin registers with
`manifest`, and each side folds those manifests into the Setup app the
way the meta door serves it (`SchemaRegistry.registerApp(SETUP_APP)` +
`setPackageNavContributions`, then `getApp('setup')`):
- with slack: the bundle is registered exactly once, and
`group_integrations` serves `nav_slack` with `componentRef:
'messaging:slack'` and `requiredPermissions: ['setup.write']`;
- without slack (control): no bundle, no `nav_slack` in the served
group, while the same boot registered the messaging manifest;
- the bundle parses as a `ManifestSchema`, and `setup.write` is a
declared org-scoped platform capability.
`pnpm --filter @objectstack/service-messaging test` on `fd50ed384d`:
`Test Files 79 passed (79)`, `Tests 1060 passed (1060)`, `VERDICT
command-exit 0`.
`pnpm --filter @objectstack/cli exec vitest run --project unit
test/setup-integrations-order.pin.test.ts` on `60b28db358`: `Tests 1
passed (1)`.
`pnpm --filter @objectstack/platform-objects exec vitest run
src/apps/translations/`: `Test Files 26 passed (26)`, `Tests 587 passed
(587)`.
`node packages/cli/scripts/check-app-nav-i18n.mjs`: `OK (14
contributor(s), 11 locale(s), 2 app(s) — setup: 61 merged nav id(s),
account: 15 merged nav id(s) — every id labelled in every locale)`;
`--self-test` exit 0.
</details>
<details><summary>Ablations (all through scripts/ablation-replace.mjs,
each restored to HEAD with git diff HEAD empty)</summary>
- Registration removed (`...register(SLACK_SETUP_UI_BUNDLE);` replaced
by a marker): anchor 1 to 0, blob `794db597159a` to `a5675d9a239f`;
`Tests 1 failed | 4 passed (5)`, the failure being "with a slack
service: the entry is registered once and served under Integrations".
- Slack guard removed (`if (!getSlack()) return;`): anchor 1 to 0;
`Tests 2 failed | 3 passed (5)`: both "without a slack service" cases,
the step-2 channel pin and the new entry pin.
- Priority 140 to 250: the cli order pin fails with `expected Set{
'nav_cloud_connection' } to deeply equal Set{ 'nav_slack' }`.
The messaging tests import the plugin by relative path (source), and the
cli pin reaches source through the new alias, so no rebuild sits between
mutation and run.
</details>
<details><summary>Type-check and gates</summary>
- `pnpm --filter @objectstack/service-messaging typecheck && pnpm
--filter @objectstack/platform-objects typecheck && pnpm --filter
@objectstack/cli typecheck`: exit 0.
- `node scripts/pm/dispatch-gates.mjs --commands` derived 77 commands on
the final head `60b28db358`: all 77 exit 0, and `--ran` reconciles 77 of
77 with a derived zero NOT-MEASURED. First run (74 on `5380a29a6a`) was
red on `check:registry-log-declared` and `check:test-source-alias`
(fixed by the two vitest config entries above) and refused on a missing
build for `check:i18n` and `check:dual-build-cjs-loads` (exit 3; green
after building the closures they name).
- `node scripts/pm/overlap-check.mjs
--branch=claude/area-a4W-34730-s3b`: `VERDICT clean exit 0` (no open PR
shares a file).
- Not run locally, CI's: the whole `@objectstack/cli` unit layer (a
two-worker local run passed 570 s without finishing and was stopped, so
it is NOT MEASURED here; Test Core runs it).
</details>
## Acceptance notes
- File surface is wider than the claim amendment's
`packages/services/service-messaging/src/**`: the order asks for nav
label i18n "following the pattern", and the pattern's labels live in
`packages/platform-objects/src/apps/translations/` and are judged by the
cli roster gate and order pin, so those files, and the two vitest
configs the gates asked for, ride here. No ui, spec or skills change.
- `Metadata-protocol: none` measured: the entry adds no authorable key,
value or metadata type; it is a navigation contribution a deployment
without connector-slack never sees (it is not registered there).
- The pin reads the entry through the registry fold the
`/api/v1/meta/app` door serves, not through an HTTP request to that
door; booting ObjectQL plus REST in service-messaging's suite would add
a full engine boot for the same fold.
https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 62daf7d commit 01e6af6
27 files changed
Lines changed: 188 additions & 5 deletions
File tree
- .changeset
- packages
- cli
- scripts
- test
- platform-objects/src/apps/translations
- services/service-messaging
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
468 | 479 | | |
469 | 480 | | |
470 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1011 | 1019 | | |
1012 | 1020 | | |
1013 | 1021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
0 commit comments