Skip to content

feat(chat): Hazel channels as alert destinations through the bot - #2027

Merged
Makisuo merged 1 commit into
mainfrom
feat/hazel-bot-destinations
Oct 31, 2026
Merged

Makisuo merged 1 commit into
mainfrom
feat/hazel-bot-destinations

Conversation

@Makisuo

@Makisuo Makisuo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Bottom of a 2-PR stack. The second PR, #2022, deletes the old Hazel OAuth webhook integration so Maple has a single Hazel integration.

The Hazel chat connector's destinations() now reads the channels its bot can post in from Hazel's GET /api/v1/organizations/{id}/bot-channels (MapleTechLabs/hazel#372). Hazel channels can then be picked as ordinary chat alert destinations, and alerts post as the bot. A 401/403 maps to auth (the bot lost its grant or lacks channels:read); a 404 maps to not_found.

The manifest description and the connector README now cover alerts. The README also says the existing US and EU bots need the channels:read scope added.

Verification

  • outbound.test.ts checks three things: the request path and bot token, 403 mapping to auth, and an unreadable reply failing the listing.
  • chat-platform: typecheck, 319 tests. Web integrations scene tests: 164.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

The Hazel connector's destinations() reads the channels its bot can post in
from Hazel's GET /api/v1/organizations/{id}/bot-channels (every public
channel, and the private ones the bot was added to), so a Hazel channel is
picked as an ordinary chat alert destination and alerts post as the bot.
A 401/403 is the bot's grant (auth), a 404 the workspace (not_found).
@Makisuo
Makisuo added this pull request to stack #2028 October 31, 2026 17:34
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10c8285d-8714-4854-9c45-9667a232b810
Commits

Reviewing files that changed from the base of the PR and between ac73405 and 5b4006d.

Files selected for processing: 4
  • packages/chat-platform/src/connectors/hazel/README.md
  • packages/chat-platform/src/connectors/hazel/manifest.ts
  • packages/chat-platform/src/connectors/hazel/outbound.test.ts
  • packages/chat-platform/src/connectors/hazel/outbound.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@maple-review-bot

maple-review-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 10/10 · safe to merge. A contained connector change: one new reader through the existing client-span and error-mapping helpers, pinned by three transport tests.
no findings · tests covered · risk medium · 1/1 new units observable

Hazel's transport now lists the bot's channels from GET /organizations/{id}/bot-channels, so Hazel channels become ordinary chat alert destinations; the manifest description and connector README follow. The change reuses the existing request, decode and failure-mapping helpers and is safe to merge.

  • hazelOutbound.destinations reads Hazel's bot-channels endpoint instead of answering empty
  • Manifest description and README now cover alerts and the channels:read scope

Before merge

5b4006d · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@Makisuo
Makisuo merged commit 82ff0d9 into main Oct 31, 2026
35 checks passed
@Makisuo
Makisuo deleted the feat/hazel-bot-destinations branch October 31, 2026 17:49
@maple-review-bot

Copy link
Copy Markdown

Merged with 2 steps from "Before merge" still open. If they are done, tick them on the review comment; if not, now is the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant