Skip to content

refactor(commands): organize command definitions into modular commands/ directory #3895

Open

Description

@LeonMollNetlight

Description

Organize command definitions into a dedicated commands/ directory structured by feature/domain instead of keeping all actions inside a single command_palette_actions.dart file.

Originated from discussion in #3870.

Motivation

As the number of commands in DartPad grows (pub commands, workspace actions, editor actions, panel toggles), a single file will become difficult to maintain. Splitting them into focused files improves discoverability and testability.

Proposed Changes / Acceptance Criteria

  • Create a dedicated directory: lib/features/shared/commands/ (or feature-specific directories where appropriate).
  • Split commands by domain:
    • commands/pub_commands.dart (Pub get, outdated, upgrade, etc.)
    • commands/editor_commands.dart / workspace_commands.dart
    • commands/commands.dart (central aggregator exporting allCommandActions)
  • Use final instead of const for action declarations where closures or dynamic context bindings are needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions