-
-
Notifications
You must be signed in to change notification settings - Fork 466
fix: disable command menu doesnt work #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis patch refactors the command-type abstraction by introducing a system-specific enum, renaming the base interface to ShellCmdType (with icon and displayName support), updates all existing command enums accordingly, adjusts the server edit UI to use the new types and displayNames, and fixes script builders to filter disabled commands by displayName. Sequence diagram for filtering disabled command types in script builderssequenceDiagram
participant ScriptBuilder
participant DisabledCmdTypes
participant CmdTypeEnum
ScriptBuilder->>DisabledCmdTypes: Get disabled command types (by displayName)
ScriptBuilder->>CmdTypeEnum: Filter command types not in disabledCmdTypes
CmdTypeEnum-->>ScriptBuilder: Return enabled command types
ScriptBuilder->>ScriptBuilder: Build command string from enabled types
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Claude finished @lollipopkit's task —— View job Code Review for PR #852: fix: disable command menu doesn't workI've completed my review of the changes that fix issue #841. Here's my comprehensive feedback: Todo List:
✅ Overall Assessment: Good FixThis PR successfully resolves the disabled command menu functionality by implementing a proper type system and fixing the UI interaction logic. The changes are well-architected and improve code maintainability. Key Changes Analysis1. Enhanced Type System (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lollipopkit - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `lib/data/model/app/scripts/script_builders.dart:199` </location>
<code_context>
/// Get Unix status command with OS detection
String _getUnixStatusCommand({required List<String> disabledCmdTypes}) {
// Generate command lists with command-specific separators, filtering disabled commands
- final filteredLinuxCmdTypes = StatusCmdType.values.where((e) => !disabledCmdTypes.contains(e.name));
+ final filteredLinuxCmdTypes = StatusCmdType.values.where((e) => !disabledCmdTypes.contains(e.displayName));
final linuxCommands = filteredLinuxCmdTypes.map((e) => '${e.divider}${e.cmd}').join('').trimRight();
</code_context>
<issue_to_address>
Linux command filtering now depends on displayName.
Ensure all code and data sources use displayName for disabledCmdTypes to prevent commands from being incorrectly enabled.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Claude finished @lollipopkit's task —— View job Code Review for PR #852: fix: disable command menu doesn't workTodo List:
✅ Overall Assessment: Good FixThis PR successfully resolves the disabled command menu functionality by implementing a proper type system and fixing the UI interaction logic. The changes are well-architected and improve code maintainability. Key Changes Analysis1. Enhanced Type System (
|
Fixes #841
Summary by Sourcery
Refactor command type handling to use a unified ShellCmdType interface with system metadata, update the disabled commands UI to display icons and correctly toggle items by displayName, and adjust script builders to filter commands by displayName, thereby fixing the issue where disabling commands did not work.
Bug Fixes:
Enhancements: