Skip to content

feat(bots): third-party bot installs, message buttons, and bot SDK fixes - #370

Merged
Makisuo merged 6 commits into
mainfrom
feat/bot-install-oauth
Oct 31, 2026
Merged

Makisuo merged 6 commits into
mainfrom
feat/bot-install-oauth

test(bots): a deleted author's message event names no author

ee1f670
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 31, 2026 in 57s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 3 defects.
1 note · tests covered · 3 defects fixed in earlier rounds

Follow-up fixes on the bot-install PR: a malformed user id no longer voids the whole lookup, message events carry no author once that user is deleted, and a signed-out visitor gets a sign-in button instead of a dead retry. The changes read clean. The McpQueryError issues whose frames point at page/registry.ts are not addressed — that diff only registers the new route.

Before merge

Still open from earlier reviews

Fixed since the last review

  • ✅ F5 · Deleted-author branch in authorOf is not tested

Production impact

Open errors in the changed files (2)
Issue Service Occurrences File
@maple/mcp/errors/McpQueryError (6 issues) maple-chat 1.3k apps/web-foldkit/src/page/registry.ts
@maple/mcp/errors/McpQueryError (4 issues) maple-ai 349 apps/web-foldkit/src/page/registry.ts

After this merges, Maple checks whether they stop.

Telemetry this change adds and removes (9)
  • ➕ span name ApiV1.redeemBotInstall · apps/backend/src/routes/api-v1/bots.http.ts:77
  • ➕ span name ApiV1.createThread · apps/backend/src/routes/api-v1/bots.http.ts:130
  • ➕ span name ApiV1.listOrganizationUsers · apps/backend/src/routes/api-v1/bots.http.ts:152
  • ➕ span name ChannelObject.messageThread · apps/backend/src/worker/objects/channel/api-messages.ts:89
  • ➕ attribute botGateway.interaction · apps/backend/src/worker/objects/effects/bot-gateway-effects.ts:88
  • ➕ span name OrgObject.mintInstallGrant · apps/backend/src/worker/objects/org/bot-install-grants.ts:37
  • ➕ span name OrgObject.redeemBotInstallGrant · apps/backend/src/worker/objects/org/bot-install-grants.ts:73
  • ➕ attribute bot.id · apps/backend/src/worker/objects/org/bot-install-grants.ts:109
  • ➕ span name OrgObject.botUsers · apps/backend/src/worker/objects/org/bot-install-grants.ts:125
What was checked
  • UserId carries isUUID() (packages/schema/src/ids.ts:43), so not-a-uuid is dropped per id and the users test fails if the whole-array decode returns
  • The deleted-author test can fail: messageEventEnvelope omits author when it is undefined (bot-gateway-service.ts:41) and authorOf filters deletedAt
  • registry.ts only adds BotInstall.page, so none of the McpQueryError issues from it are addressed

ee1f670 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.