Skip to content

feat: magic:install --with-devtools wires the debug trio in one step#100

Merged
anilcancakir merged 2 commits into
masterfrom
feat/install-with-devtools
Jun 25, 2026
Merged

feat: magic:install --with-devtools wires the debug trio in one step#100
anilcancakir merged 2 commits into
masterfrom
feat/install-with-devtools

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

Fixes REPORT friction item #10.

Adds a --with-devtools flag to magic:install that wires magic_devtools + fluttersdk_dusk + fluttersdk_telescope in one step: adds the three regular dependencies and injects the kDebugMode main.dart integration exactly as dusk:install / telescope:install do (DuskPlugin/TelescopePlugin install + watchers before Magic.init; MagicDuskIntegration/MagicTelescopeIntegration after). Idempotent; the no-flag install path is unchanged.

TDD. analyze 0, format 0-diff, flutter test test/cli/ 108 pass (new buildDevtoolsWiring + real-FS install groups), dart pub publish --dry-run clean. Doc + skill + CHANGELOG synced.

Copilot AI review requested due to automatic review settings June 24, 2026 23:47

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

Adds a --with-devtools flag to the magic:install artisan command to optionally wire Magic’s debug tooling trio (Dusk + Telescope + magic_devtools integrations) during initial project scaffolding, and updates tests + docs/changelog/skill references accordingly.

Changes:

  • Extend magic:install with --with-devtools, injecting kDebugMode-gated runtime wiring into lib/main.dart and adding the trio packages to dependencies.
  • Add unit + real-filesystem integration tests covering signature, wiring shape, dependency insertion, and idempotency.
  • Sync docs/skill/changelog to document the new flag and recommended workflow.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/src/cli/commands/magic_install_command.dart Adds flag parsing, dependency insertion, and buildDevtoolsWiring() main.dart transform.
test/cli/commands/magic_install_command_test.dart Adds tests for signature + pure transform + real-FS end-to-end install behavior and idempotency.
doc/packages/magic-cli.md Documents one-step debug tooling installation via --with-devtools.
skills/magic-framework/SKILL.md Bumps skill version and adds example invocation for --with-devtools.
skills/magic-framework/references/cli-commands.md Adds --with-devtools option reference and explanation.
CHANGELOG.md Adds an Unreleased entry describing the new flag and behavior.

Comment thread lib/src/cli/commands/magic_install_command.dart Outdated
anilcancakir added a commit that referenced this pull request Jun 25, 2026
…rdering-clean

buildDevtoolsWiring injected the debug-trio package imports immediately
before `void main(`, landing them after the relative `config/...` imports
the install stub emits. That violates directives_ordering (package imports
must precede relative imports, and foundation must precede material), so a
freshly installed --with-devtools app surfaced analyzer warnings.

Anchor each injected package import against the existing package import it
must sit beside: foundation before flutter/material, fluttersdk_* before
magic, magic_devtools/* after magic and before the first relative import
(falling back to the void main( anchor when no relative import is present).
The kDebugMode block injection is unchanged and the transform stays
idempotent. Verified the generated import block is directives_ordering-clean
via the analyzer.

Addresses Copilot review comment on PR #100.
… step

Wires magic_devtools, fluttersdk_dusk, and fluttersdk_telescope (deps plus kDebugMode main.dart integration) in a single install step instead of the manual multi-step setup. The wiring is idempotent and the no-flag install path is unchanged (#10).
…rdering-clean

buildDevtoolsWiring injected the debug-trio package imports immediately
before `void main(`, landing them after the relative `config/...` imports
the install stub emits. That violates directives_ordering (package imports
must precede relative imports, and foundation must precede material), so a
freshly installed --with-devtools app surfaced analyzer warnings.

Anchor each injected package import against the existing package import it
must sit beside: foundation before flutter/material, fluttersdk_* before
magic, magic_devtools/* after magic and before the first relative import
(falling back to the void main( anchor when no relative import is present).
The kDebugMode block injection is unchanged and the transform stays
idempotent. Verified the generated import block is directives_ordering-clean
via the analyzer.

Addresses Copilot review comment on PR #100.
@anilcancakir anilcancakir force-pushed the feat/install-with-devtools branch from a6cb0d3 to 225244e Compare June 25, 2026 00:36
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@anilcancakir anilcancakir merged commit 43c619b into master Jun 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants