feat(integrations): support chatRoomFilter on rules#433
Draft
AndyTWF wants to merge 4 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
force-pushed
the
integrations-chat-room-filter
branch
from
July 17, 2026 15:51
e0c5230 to
f0ef330
Compare
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.
…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).
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chatRoomFilter(top-level on the rule, alongsidesource) rather thansource.channelFilter.ably integrations get/listpreviously had no way to display this, so chat-room-sourced rules looked like they had no filter configured.integrations getnow shows a "Chat Room Filter" line whenrule.chatRoomFilteris set.integrations listshows a "Chat Room Filter" line per rule in human-readable output, and includeschatRoomFilter(ornull) top-level alongsidesourcein--jsonoutput.integrations create/updategained a--chat-room-filterflag (andcreategainedchat.messageas a--source-typeoption) so chat-room-sourced rules can actually be created/updated via the CLI, not just displayed.Rule/RuleDatainterfaces incontrol-api.tsgain thechatRoomFilterfield to match the Control API shape.chat.message-sourced rule against the real Control API, verifyingchatRoomFilterround-trips end to end.channelFilter/chatRoomFilterexample and test values to use valid regex syntax (e.g.chat:.*,room:.*) instead of glob-stylechat:*— both fields are regexps evaluated by the Control API, not globs.DX-1546
Test plan
pnpm prepare(build + manifest)pnpm exec eslint .— 0 errorspnpm test:unit— full suite passespnpm test:tty— passesintegrations get/list/create/updatecovering: chat room filter displayed when present, omitted when absent, sent on create/update, and correctly surfaced in--jsonoutputtest/e2e/integrations/integrations-e2e.test.ts) covers the full create/get/list/delete lifecycle for a chat-room-sourced rule — requiresE2E_ABLY_ACCESS_TOKENto 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