feat(ai): configurable channel blocklist dashboard UI#256
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request restructures the DOM layout of the blocked channels UI in the dashboard config editor by wrapping the label and input field in a container div and moving the descriptive text into a separate paragraph element below. Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/src/components/dashboard/config-editor.tsx (1)
1033-1049:⚠️ Potential issue | 🟠 MajorComplete the blocked-channel hint and bind it to the selector.
This copy still misses the allowed-vs-blocked precedence called out in issue
#180, so admins won't learn what happens when both lists are configured. Also, now that the help text sits outside the<label>, it should be exposed via the selector's accessible description.Suggested change
- <div className="space-y-2"> + <div className="space-y-2"> <label htmlFor="ai-blocked-channels" className="block"> <span className="text-sm font-medium">Blocked Channels</span> </label> - <p className="text-xs text-muted-foreground"> - The bot will not read messages, respond, or run triage in these channels. + <p id="ai-blocked-channels-hint" className="text-xs text-muted-foreground"> + If allowed channels are configured, AI only runs in those channels. Any + channel selected here is always excluded from reading, replies, and triage. </p> <ChannelSelector id="ai-blocked-channels" + aria-describedby="ai-blocked-channels-hint" guildId={guildId} selected={(draftConfig.ai?.blockedChannelIds ?? []) as string[]} onChange={updateAiBlockedChannels}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/src/components/dashboard/config-editor.tsx` around lines 1033 - 1049, The help text for blocked channels is missing the allowed-vs-blocked precedence and is not exposed to assistive tech; update the copy to mention that allowed (whitelisted) channels take precedence over blocked channels (e.g., "If a channel is both allowed and blocked, allowed takes precedence") and bind the help paragraph to the ChannelSelector by giving the paragraph an id (e.g., "ai-blocked-channels-desc") and passing that id via the ChannelSelector's aria-describedby prop; ensure ChannelSelector usage (id="ai-blocked-channels", selected={(draftConfig.ai?.blockedChannelIds ?? []) as string[]}, onChange={updateAiBlockedChannels}, disabled={saving}) is unchanged except for adding aria-describedby and the revised help text.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@web/src/components/dashboard/config-editor.tsx`:
- Around line 1033-1049: The help text for blocked channels is missing the
allowed-vs-blocked precedence and is not exposed to assistive tech; update the
copy to mention that allowed (whitelisted) channels take precedence over blocked
channels (e.g., "If a channel is both allowed and blocked, allowed takes
precedence") and bind the help paragraph to the ChannelSelector by giving the
paragraph an id (e.g., "ai-blocked-channels-desc") and passing that id via the
ChannelSelector's aria-describedby prop; ensure ChannelSelector usage
(id="ai-blocked-channels", selected={(draftConfig.ai?.blockedChannelIds ?? [])
as string[]}, onChange={updateAiBlockedChannels}, disabled={saving}) is
unchanged except for adding aria-describedby and the revised help text.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 08960a04-71e0-457f-8f33-87c23ece0e81
📒 Files selected for processing (1)
web/src/components/dashboard/config-editor.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Greptile Review
- GitHub Check: Docker Build Validation
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,mjs,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,mjs,jsx,ts,tsx}: Use single quotes for strings in code, double quotes only allowed in JSON files
Always end statements with semicolons
Use 2-space indentation, enforced by Biome
Files:
web/src/components/dashboard/config-editor.tsx
web/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Next.js 16 web dashboard uses App Router with Discord OAuth2 authentication, dark/light theme support, and mobile-responsive design
Files:
web/src/components/dashboard/config-editor.tsx
🧠 Learnings (4)
📚 Learning: 2026-03-07T15:34:56.495Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-07T15:34:56.495Z
Learning: Applies to web/src/components/dashboard/config-workspace/**/*.{js,jsx,ts,tsx} : Refactor config feature presentation to use reusable `SettingsFeatureCard` pattern with structure: header + master toggle + Basic/Advanced blocks
Applied to files:
web/src/components/dashboard/config-editor.tsx
📚 Learning: 2026-03-07T15:34:56.495Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-07T15:34:56.495Z
Learning: Applies to web/src/components/dashboard/config-workspace/**/*.{js,jsx,ts,tsx} : Web dashboard config editor must use category workspace navigation with categories: `AI & Automation`, `Onboarding & Growth`, `Moderation & Safety`, `Community Tools`, `Support & Integrations` located in `web/src/components/dashboard/config-workspace/`
Applied to files:
web/src/components/dashboard/config-editor.tsx
📚 Learning: 2026-03-07T15:34:56.495Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-07T15:34:56.495Z
Learning: Applies to web/src/components/dashboard/config-workspace/**/*.{js,jsx,ts,tsx} : Config editor save contract must maintain: global save/discard, diff-modal confirmation, per-section PATCH batching, and partial-failure behavior
Applied to files:
web/src/components/dashboard/config-editor.tsx
📚 Learning: 2026-03-07T15:34:56.495Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-07T15:34:56.495Z
Learning: Applies to web/src/components/dashboard/config-workspace/**/*.{js,jsx,ts,tsx} : Config editor must implement metadata-driven config search with cross-category quick jump, focus/scroll targeting, and auto-open advanced sections when search hits advanced controls
Applied to files:
web/src/components/dashboard/config-editor.tsx
|
🧹 Preview Environment Cleaned UpThe Railway preview environment for this PR has been removed. Environment: |
Summary
The backend
isChannelBlocked()and config support were already in place. This PR adds the dashboard description text that was missing from the blocked channels selector.The backend reads
config.ai.blockedChannelIds(already wired inmessageCreateandtriage). The dashboard ChannelSelector was merged via #253. This PR closes the gap with proper help text.Closes #180