Make init smarter as far as detecting projects, placing files, and showing warnings for incompatible directories#530
Open
zateutsch wants to merge 9 commits into
Open
Make init smarter as far as detecting projects, placing files, and showing warnings for incompatible directories#530zateutsch wants to merge 9 commits into
zateutsch wants to merge 9 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes winapp init smarter by adding breadth-first project detection/selection when no base directory is provided and updates schema/npm wrappers + docs accordingly.
Changes:
- Added
ProjectDetectionService(+ models + interface) and wired it intoinitto detect compatible projects and prompt for selection. - Updated generated npm command wrappers/docs and CLI schema version.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/winapp-npm/src/winapp-commands.ts | Regenerated npm wrappers; adds init.searchAll and new run surface (notably appArgs, executable). |
| src/winapp-CLI/WinApp.Cli/Services/ProjectDetectionService.cs | New BFS-based project detection service with ignore lists and marker checks. |
| src/winapp-CLI/WinApp.Cli/Services/IProjectDetectionService.cs | New interface for project detection service. |
| src/winapp-CLI/WinApp.Cli/Services/DetectedProjectType.cs | New enum of detectable project types ordered by specificity. |
| src/winapp-CLI/WinApp.Cli/Services/DetectedProject.cs | New record model for detected projects and display labels. |
| src/winapp-CLI/WinApp.Cli/Helpers/HostBuilderExtensions.cs | Registers IProjectDetectionService in DI. |
| src/winapp-CLI/WinApp.Cli/Commands/InitCommand.cs | Implements detect/select flow, integrates --search-all, and adjusts config-dir defaulting when selecting nested project. |
| src/winapp-CLI/WinApp.Cli.Tests/ProjectDetectionServiceTests.cs | Adds unit tests for detection rules, BFS behavior, ignore lists, and display paths. |
| src/winapp-CLI/WinApp.Cli.Tests/InitCommandTests.cs | Updates existing tests for new prompts and adds tests for init selection behavior. |
| docs/usage.md | Documents --search-all and the new automatic project detection flow. |
| docs/npm-usage.md | Updates npm API docs for init.searchAll and run options (including appArgs, executable). |
| docs/fragments/skills/winapp-cli/setup.md | Updates setup skill fragment with search-related notes/examples. |
| docs/cli-schema.json | Bumps schema and adds init --search-all (and includes run passthrough arg schema). |
| .github/plugin/skills/winapp-cli/setup/SKILL.md | Updates GitHub Skills content to mention project search and --search-all. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Build Metrics ReportBinary Sizes
Test Results✅ 1024 passed, 1 skipped out of 1025 tests in 454.0s (+31 tests, +3.7s vs. baseline) Test Coverage❌ 23.8% line coverage, 40% branch coverage · ✅ +0.2% vs. baseline CLI Startup Time39ms median (x64, Updated 2026-05-12 17:25:30 UTC · commit |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Smart init cases:
Directory passed
No directory passed
--use-defaults