Repository navigation
feat(app-shell): connect your Slack account on the notification settings page, and an admin Slack page in Setup (Part of #34730) - #35968
Conversation
… door lists slack (red) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…ngs page, and an admin Slack page in Setup Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…ngeset; effect reads set state in callbacks Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…ack tests Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
…line, zh-Hant regenerated from zh-Hans Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
|
repo:objectstack#4 · os-elon-musk · session_016WV4cwxJaQdC11ABGtTez8 L1 verdict (L1-a): ACCEPT at head Gates on this head: The benefit boundary: client against server. I read
Local runs and positive controls. I ran the two new test files plus the notification-settings folder from
Both were restored, and What the screens say, checked against the server:
The changeset and Scope: Notes (not owed):
Landing: not governed. a4-W lands with or after step 3b, which adds the Setup nav entry. Generated by Claude Code |
|
repo:objectstack#4 · os-elon-musk · session_016WV4cwxWUDevGYuHGney5V Landing (area a4-W, seat 4) · 2026-11-21T09:33Z · head
|
Requested by Elon · project thread
Part of #34730
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Step 3 of #34730 (ADR-0013 addendum of 2026-11-19): the console side of the Slack link doors that step 2 (#35789) put on
main. UI and docs only; no server, spec or skills change. This PR was written in sessionsession_016WV4czKnDE6hsyXQzB9wB2.console/notification-settings/slackDoors.ts). All nine Slack link routes are called through the host's authenticated fetch (SchemaRendererContext.apiFetch), the way the notification settings page already reads its own door;@objectstack/clienthas no method for these routes (measured: noslack-link,slack/accountorslack/linksinpackages/clienton the base). Each answer is read as served and refused when it is not the door's shape. A refusal is the server's own sentence:error.userMessagewhen the door sends one (onlyslackLinkProposalOutdatedtoday, already in the caller's language), elseerror.message.SlackLinkSection.tsx). Drawn only while the preference door lists theslackchannel, which it does only where connector-slack is composed. States, each as theGET /me/slack-linkdoor answers it:account: null): says so, offers nothing;revoked: says Slack refused the organization's token, offers no connect;POST …/proposal;{ state: 'proposed' }): says a Slack user with the person's verified email was found, never whom, with Confirm (POST …/confirm) and Cancel (DELETE /me/slack-link, which removes the proposal row);link: nullfrom a proposal: the door answers this alike for no verified email, no Slack user with that email, and that Slack user already linked to someone else (step 2's own doc says so), so the page names all three conditions in one sentence and never picks one.views/setup/SlackSetupPage.tsx, component refmessaging:slack, so/apps/setup/component/messaging/slack). Gated bysetup.writethroughusePermissions().hasCapabilities, the capability every administrator door asks (SLACK_ADMIN_CAPABILITY); without it the page says what is needed and reads no door. It installs or sets again the token (PUT /slack/accountwith{ token }) through a password input that starts empty, is emptied as soon as the value is sent, and is never filled from anything (no door answers the token). Remove Slack asks first, saying every linked person is told by in-app message and email, thenDELETE /slack/account. The link list shows each link as served: the person's id, the Slack user only once confirmed (a proposal reads "Proposed, not confirmed yet"), and when it was confirmed; Remove per link asks first, thenDELETE /slack/links/:id. The list is read once, unpaged; when it holds the 10,000 links the store reads at most (limit: 10000inSlackLinkStore.links), the page says the list may be incomplete. Paging is messaging: the administrator's Slack link list answers at most 10,000 links — page GET /api/v1/messaging/slack/links #35861 (server); this page does not page on its own.slackLinkandslackSetup, in all eleven built-in packs;zh-Hant.tsis regenerated bypnpm --filter @object-ui/i18n gen:zh-hantfromzh-Hans, not hand-written.content/docs/permissions/administrator-guide.mdxgains "Deliver notifications by Slack direct message" (no existing page taught Slack DM setup).flex-colundersm), and the link table scrolls inside its card.Evals
Final head
ddbc916340(the branch merged withorigin/mainat73e4b966f6; the incoming commits touch none of this PR's files).Tests on ddbc916: notification settings, Setup views and the i18n package, 121 files / 2143 tests passed; ui scripts 172 files / 5111 passed
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/console/notification-settings/ packages/app-shell/src/views/setup/ packages/i18n/under the verify lock:Test Files 121 passed (121),Tests 2143 passed | 13 skipped (2156),VERDICT command-exit 0.pnpm --dir ui exec vitest run scripts/(derived):Test Files 172 passed | 2 skipped (174),Tests 5111 passed | 2 skipped (5113),VERDICT command-exit 0.SlackLinkSection.test.tsx(connect, proposal, confirm, linked; cancel; disconnect; no install; revoked;link: null; stale proposal viauserMessage; replaced proposal 404; token refused 502 then revoked; no install at click 409; failed read),SlackSetupPage.test.tsx(hidden withoutsetup.writeand no door read; install; update never pre-fills and shows a refusal; remove install with confirm; list and remove a link with confirm; the cap text at the cap and not below; the ref resolves; key and placeholder parity of both sections in every pack), and inNotificationSettingsPage.test.tsxthe gate (section and door read withslacklisted; neither without).3494958712:Tests 1 failed | 16 passed (17).Loading…group grew by one;Slackserved verbatim as a title in non-Latin packs;zh-Hant.tshand-written instead of generated). Fixed atddbc916340by a distinct setup loading line, translated titles, and the generator.Ablation of the `slack`-listed gate: red as intended, restored to HEAD
node scripts/ablation-replace.mjsonNotificationSettingsPage.tsx, anchorapiFetch && prefs.channels.some((c) => c.channel === SLACK_CHANNEL) &&replaced byapiFetch && /* ABLATION-slack-gate-removed */: anchor 1 to 0, blob3cd1154f0563toa7bdd0eba035; the page test ranTests 1 failed | 16 passed (17), the failure being "without slack listed, no section and no Slack door is called"; restored, blob equals HEAD andgit diff HEADempty. A first attempt used a replacement that was a substring of the anchor; the tool refused it as a mutation that did not land (replacement count 1 to 1) and restored, so it measured nothing.Type-check, lint and gates
pnpm --filter @object-ui/app-shell --filter @object-ui/i18n run type-checkonddbc916340:VERDICT command-exit 0(bothtsconfig.jsonandtsconfig.test.json; the test files are in the program, since an earlier run reported errors in them, now fixed).eslinton the changed app-shell files: exit 0, no warning in the new files.check:i18n-keys,check:i18n-drift,check:i18n-dead-keys,check:new-line-citations: exit 0 each.node scripts/pm/dispatch-gates.mjs --commandsderived 74 commands, re-derived identical onddbc916340; the gate results are in the report.check:skill-examples(after building@objectstack/client-react) andcheck:type-check-debt(under the lock) exit 0.node scripts/pm/overlap-check.mjs --branch=claude/area-a4W-34730-s3:VERDICT clean exit 0(five open PRs share the locale packs; each merges cleanly).Verification
Two minutes, on a dev stack with connector-slack composed: open Notification Settings as a member; under the matrix a "Slack direct messages" card shows. With no install it says an administrator installs Slack first. As an organization administrator open
/apps/setup/component/messaging/slack, paste a bot token and choose Install: the workspace and "Active" show and the field is empty again. Back as the member, Connect Slack shows the proposal without a name; Confirm shows the Slack user.Files to read first, by risk:
SlackSetupPage.tsx(the token input and the two confirm dialogs),slackDoors.ts(what is read from each answer and which sentence a refusal shows),SlackLinkSection.tsx(the state after each action is re-read, never inferred).Acceptance notes
CONNECTOR_CREDENTIALS_UI_BUNDLEin service-automation follows; the shell declares none), so the entry that opens this page belongs in service-messaging: Setup, groupgroup_integrations,componentRef: 'messaging:slack',requiredPermissions: ['setup.write'], contributed only where theslackchannel registers. That is a server change, outside this PR's surface; it is named for the seat to file. Until it lands the page is reached by its address, which the docs section names.messaging.slack_link_removed(listed as a topic on every deployment) belongs in@objectstack/service-messaging's changeset, outside this PR's surface; it is not carried here.ui/AGENTS.md✨ Set up Copilot instructions #2 asks for a package README update for features;@object-ui/app-shell's README documents no individual page, so none was added.🤖 Generated with Claude Code