Skip to content

feat(Admin): modernize settings menu with interactions - #155

Merged
RedStar071 merged 11 commits into
mainfrom
feature/conf-interactions-v2-4862137746081132892
Jan 2, 2026
Merged

RedStar071 merged 11 commits into
mainfrom
feature/conf-interactions-v2-4862137746081132892

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This PR modernizes the conf command's settings menu (src/lib/structures/SettingsMenu.ts) by replacing legacy reaction collectors and chat-based navigation with Discord Interactions.

Key Changes:

  • Navigation: Users now navigate folders and keys using a StringSelectMenu.
  • Actions: "Back", "Stop", "Set", "Remove", "Reset", and "Undo" are now Buttons.
  • Input Handling:
    • Roles: Uses RoleSelectMenu.
    • Channels: Uses ChannelSelectMenu with type filtering.
    • Booleans: Uses "Yes" / "No" Buttons.
    • Text/Numbers: Uses Modals.
  • Localization: Added global keys for "Back", "Stop", "Set", "Remove", "Reset", "Value", and "Cancel".

PR created automatically by Jules for task 4862137746081132892 started by @RedStar071

…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.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@RedStar071
RedStar071 force-pushed the feature/conf-interactions-v2-4862137746081132892 branch from 02acbc0 to 6ee7055 Compare January 1, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LongLivingReactionCollector and MessageCollector with InteractionCollector for component-based navigation
  • Added LongLivingInteractionCollector utility 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.

Comment thread src/lib/structures/SettingsMenu.ts Resolved
Comment thread src/lib/structures/SettingsMenu.ts Resolved
Comment thread src/lib/structures/SettingsMenu.ts Resolved
Comment thread src/lib/structures/SettingsMenu.ts Resolved
Comment thread src/lib/structures/SettingsMenu.ts Resolved
Comment thread src/lib/structures/SettingsMenu.ts Outdated
Comment on lines +280 to +290
// 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)
));
}

Copilot AI Jan 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread src/lib/structures/SettingsMenu.ts Resolved
Comment thread src/lib/structures/SettingsMenu.ts Resolved
google-labs-jules Bot and others added 2 commits January 1, 2026 17:14
…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.
@RedStar071
RedStar071 force-pushed the feature/conf-interactions-v2-4862137746081132892 branch from 8af2904 to f4cf860 Compare January 1, 2026 16:14
@sentry

sentry Bot commented Jan 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.52941% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.12%. Comparing base (144a1c5) to head (cc11507).

Files with missing lines Patch % Lines
src/lib/util/LongLivingInteractionCollector.ts 20.51% 31 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RedStar071
RedStar071 force-pushed the feature/conf-interactions-v2-4862137746081132892 branch from 90e7b44 to c980d22 Compare January 1, 2026 17:20
@RedStar071
RedStar071 marked this pull request as ready for review January 2, 2026 21:45
@RedStar071
RedStar071 self-requested a review as a code owner January 2, 2026 21:45
@RedStar071
RedStar071 merged commit b04a223 into main Jan 2, 2026
@RedStar071
RedStar071 deleted the feature/conf-interactions-v2-4862137746081132892 branch January 2, 2026 21:52
@github-project-automation github-project-automation Bot moved this to Done in Wolfstar Jan 13, 2026
@RedStar071 RedStar071 self-assigned this Jan 13, 2026
@RedStar071 RedStar071 added this to the v2 milestone Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants