Skip to content

fix(dashboard/audit): channel dropdown uses /api/channels for full 44-adapter list#3253

Merged
houko merged 1 commit into
mainfrom
fix/audit-channel-full-list
Apr 26, 2026
Merged

fix(dashboard/audit): channel dropdown uses /api/channels for full 44-adapter list#3253
houko merged 1 commit into
mainfrom
fix/audit-channel-full-list

Conversation

@houko

@houko houko commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

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 pick feishu, 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:

  1. useChannels() — the existing /api/channels hook the Channels page already consumes, returning all 44 adapters with metadata.
  2. Kernel-internal channels — api / dashboard / cli / system / cron — these aren't user-configurable adapters but they appear as channel values in audit entries (HTTP API calls, dashboard reads, CLI commands, scheduler / system events).
  3. Channels seen in the current result set — covers any one-off channel name we don't know about up front (e.g. webhook adapters with custom routes).

Custom… still covers the rare case where none of the three sources knows about the channel yet.

Test plan

  • Open /dashboard/audit, expand Filters, open the Channel dropdown.
  • Confirm the list now shows all 44 adapters (alphabetical) plus the 5 internal channel identifiers.
  • Pick a channel you've never used (e.g. wechat) and Apply → server returns empty result set, no longer "you can't even ask the question".

…-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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@houko
houko merged commit 4e0a9e2 into main Apr 26, 2026
15 checks passed
@houko
houko deleted the fix/audit-channel-full-list branch April 26, 2026 15:08
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review and removed ready-for-review PR is ready for maintainer review labels Apr 26, 2026
@houko houko mentioned this pull request Apr 26, 2026
@github-actions github-actions Bot added size/S 10-49 lines changed no-rust-required This task does not require Rust knowledge labels Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant