fix(dashboard/audit): channel dropdown uses /api/channels for full 44-adapter list#3253
Merged
Conversation
…-adapter list The 8-name hardcoded seed (`api / dashboard / cli / telegram / discord / slack / matrix / feishu`) was the visible audit-page channel filter list. Operators couldn't pick feishu, wechat, voice, mastodon, webhook or any of the other 36 shipping adapters until that channel happened to appear in the result set — i.e. the dropdown failed exactly when it was needed (filter to a channel you've never used yet). Replace the seed with `useChannels()` (the existing `/api/channels` query the Channels page already uses) UNION kernel-internal channels (`api / dashboard / cli / system / cron`) UNION channels seen in the current result set. `Custom…` still covers anything none of those three sources know about.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
The audit page's Channel filter dropdown shipped with a hardcoded seed of 8 names —
api / dashboard / cli / telegram / discord / slack / matrix / feishu. The daemon ships 44 channel adapters; the operator couldn't pickfeishu,wechat,voice,mastodon,webhook, or any of the other 36 shipping adapters until a row with that channel happened to appear in the result set. The dropdown failed exactly when it was needed: filtering to a channel you've never used yet.Fix
Replace the 8-name seed with the union of:
useChannels()— the existing/api/channelshook the Channels page already consumes, returning all 44 adapters with metadata.api / dashboard / cli / system / cron— these aren't user-configurable adapters but they appear aschannelvalues in audit entries (HTTP API calls, dashboard reads, CLI commands, scheduler / system events).Custom…still covers the rare case where none of the three sources knows about the channel yet.Test plan
/dashboard/audit, expand Filters, open the Channel dropdown.wechat) and Apply → server returns empty result set, no longer "you can't even ask the question".