Skip to content

feat(integrations): support chatRoomFilter on rules#433

Draft
AndyTWF wants to merge 4 commits into
mainfrom
integrations-chat-room-filter
Draft

feat(integrations): support chatRoomFilter on rules#433
AndyTWF wants to merge 4 commits into
mainfrom
integrations-chat-room-filter

Conversation

@AndyTWF

@AndyTWF AndyTWF commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Ably Chat integration rules populate chatRoomFilter (top-level on the rule, alongside source) rather than source.channelFilter. ably integrations get/list previously had no way to display this, so chat-room-sourced rules looked like they had no filter configured.
  • integrations get now shows a "Chat Room Filter" line when rule.chatRoomFilter is set.
  • integrations list shows a "Chat Room Filter" line per rule in human-readable output, and includes chatRoomFilter (or null) top-level alongside source in --json output.
  • integrations create/update gained a --chat-room-filter flag (and create gained chat.message as a --source-type option) so chat-room-sourced rules can actually be created/updated via the CLI, not just displayed.
  • Rule/RuleData interfaces in control-api.ts gain the chatRoomFilter field to match the Control API shape.
  • Added an e2e test that creates, gets, lists, and deletes a chat.message-sourced rule against the real Control API, verifying chatRoomFilter round-trips end to end.
  • Fixed channelFilter/chatRoomFilter example and test values to use valid regex syntax (e.g. chat:.*, room:.*) instead of glob-style chat:* — both fields are regexps evaluated by the Control API, not globs.

DX-1546

Test plan

  • pnpm prepare (build + manifest)
  • pnpm exec eslint . — 0 errors
  • pnpm test:unit — full suite passes
  • pnpm test:tty — passes
  • Unit tests added/updated for integrations get/list/create/update covering: chat room filter displayed when present, omitted when absent, sent on create/update, and correctly surfaced in --json output
  • New e2e test (test/e2e/integrations/integrations-e2e.test.ts) covers the full create/get/list/delete lifecycle for a chat-room-sourced rule — requires E2E_ABLY_ACCESS_TOKEN to run; not executable in this environment, so it's only been verified to type-check and correctly skip without credentials (same skip gating as the existing Control API e2e tests in this file)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli-web-cli Ready Ready Preview, Comment Jul 17, 2026 4:25pm

Request Review

Rules created from Ably Chat rooms populate chatRoomFilter (top-level
on the rule, alongside source) instead of source.channelFilter. Surface
it in both human-readable and JSON output so `integrations get`/`list`
don't silently omit the filter for chat-room-sourced rules.

DX-1546

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AndyTWF added 2 commits July 17, 2026 17:08
Rules can be sourced from Ably Chat rooms (source-type chat.message),
which requires setting chatRoomFilter rather than the channel-based
source.channelFilter. `integrations create`/`update` had no way to set
it, even though get/list already knew how to display it.

Also corrects the example/test filter values to valid regex syntax
(channelFilter/chatRoomFilter are regexps, not globs) — e.g. "room:.*"
instead of "room:*".

DX-1546
Extends the Control API e2e suite to create/get/list/delete a rule
with source-type chat.message and --chat-room-filter, verifying
chatRoomFilter round-trips through the real API end to end.
@AndyTWF AndyTWF changed the title feat(integrations): show chat room filter on rule get/list feat(integrations): support chatRoomFilter on rules Jul 17, 2026
…ests

channelFilter is a regexp, not a glob, so "chat:*" is invalid — the
trailing * has nothing to repeat. Switch examples and test fixtures to
"chat:.*" (and similarly for other filter values used in tests).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant