Repository navigation
feat(Admin): modernize settings menu with interactions - #155
Conversation
…mponents - Replace reaction-based navigation with StringSelectMenu and Buttons. - Implement RoleSelectMenu and ChannelSelectMenu for respective setting types. - Use Buttons for boolean settings. - Use Modals for text/number input. - Add missing localization keys for UI components.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
02acbc0 to
6ee7055
Compare
…r for interaction handling
There was a problem hiding this comment.
Pull request overview
This PR successfully modernizes the settings menu (conf command) by replacing legacy reaction-based collectors with Discord's modern Interaction components (buttons, select menus, and modals).
Key Changes:
- Replaced
LongLivingReactionCollectorandMessageCollectorwithInteractionCollectorfor component-based navigation - Added
LongLivingInteractionCollectorutility class with global interaction broadcasting - Implemented specialized input methods: select menus for navigation/removal, role/channel selects, boolean buttons, and modals for text/number inputs
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/listeners/interactions/interactionCreate.ts |
New listener that broadcasts message component interactions to all registered LongLivingInteractionCollector instances |
src/lib/util/LongLivingInteractionCollector.ts |
New utility class for managing long-lived interaction collectors with timeout and cleanup support |
src/lib/types/Augments.d.ts |
Added type augmentation for lliCollectors set on the Discord client |
src/lib/structures/SettingsMenu.ts |
Complete refactor from reactions to interactions: navigation via string select menus, actions via buttons, specialized inputs for different data types |
src/lib/i18n/languageKeys/keys/Globals.ts |
Added language key exports for common UI labels (Back, Stop, Set, Remove, Reset, Value, Cancel) |
src/lib/WolfClient.ts |
Added lliCollectors Set property to track active LongLivingInteractionCollector instances |
src/languages/en-US/globals.json |
Added English translations for new global UI labels |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // For others, we might have used Modal, but since we are in `renderInput`, | ||
| // if we want to support Modal for others, we should have triggered it immediately in `onInteraction`. | ||
| // So if we are here, it means we don't use Modal, OR we show a "Click to Enter Value" button which opens Modal. | ||
| // But that adds a step. | ||
| // Better: In `onInteraction`, if type is string/number, open Modal immediately and don't enter `inputMode` unless we want to show error state. | ||
| default: { | ||
| // Fallback to button that opens modal (if we ended up here) | ||
| rows.push(new ActionRowBuilder<MessageActionRowComponentBuilder>().addComponents( | ||
| new ButtonBuilder().setCustomId('conf-input-modal').setLabel(this.t(LanguageKeys.Globals.Set)).setStyle(ButtonStyle.Primary) | ||
| )); | ||
| } |
There was a problem hiding this comment.
The comment on line 280-284 describes a design decision but doesn't match the actual implementation in the default case (lines 285-290). If modals are meant to be shown immediately in onInteraction for string/number types, this fallback shouldn't be needed. Consider either removing the comment or the code if it's truly unreachable, or clarifying when this fallback is actually used.
…mponents - Replace reaction-based navigation with StringSelectMenu and Buttons. - Implement RoleSelectMenu and ChannelSelectMenu for respective setting types. - Use Buttons for boolean settings. - Use Modals for text/number input. - Add missing localization keys for UI components.
…r for interaction handling
8af2904 to
f4cf860
Compare
…tps://github.com/wolfstar-project/wolfstar into feature/conf-interactions-v2-4862137746081132892
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #155 +/- ##
==========================================
- Coverage 78.95% 78.12% -0.84%
==========================================
Files 79 81 +2
Lines 2091 2153 +62
Branches 205 212 +7
==========================================
+ Hits 1651 1682 +31
- Misses 417 448 +31
Partials 23 23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
90e7b44 to
c980d22
Compare
…d localized descriptions
…ds and enhance command fetching
This PR modernizes the
confcommand's settings menu (src/lib/structures/SettingsMenu.ts) by replacing legacy reaction collectors and chat-based navigation with Discord Interactions.Key Changes:
StringSelectMenu.RoleSelectMenu.ChannelSelectMenuwith type filtering.PR created automatically by Jules for task 4862137746081132892 started by @RedStar071