refactor(core): DI, persistence, command routing, and classification registry (#0001-#0004)#59
refactor(core): DI, persistence, command routing, and classification registry (#0001-#0004)#59tonythethompson wants to merge 13 commits into
Conversation
Wire Microsoft.Extensions.DependencyInjection via AddQuickShellCore, seed QuickShellRuntimeServices from the provider, and keep page call sites on the shim. Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse shortcuts temp/replace semantics for worktree targets and edit drafts, and register the writer through AddQuickShellCore without changing the array schema. Co-authored-by: Cursor <cursoragent@cursor.com>
…ep links Add CommandKind/CommandDescriptor/CommandIdParser in Core, CommandRouter in QuickShell, and delegate QuickShellCommandsProvider.GetCommandItem while preserving existing factory behavior and deep-link ID compatibility. Co-authored-by: Cursor <cursoragent@cursor.com>
…hanged Dual-read legacy root-array shortcuts.json (v0) while writing a v1 document envelope on save and export. Raise WorkspacesChanged from layout mutations so consumers can react without polling the repository. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace QuickShellRuntimeServices with QuickShellServices bound from the composition root, register launcher/health/git/mapper abstractions in AddQuickShellCore, and inject IShortcutRepository into CommandRouter. Co-authored-by: Cursor <cursoragent@cursor.com>
Register ICommandRouter and per-kind handlers via AddQuickShellHost, move parse logic into CommandIdParser, add git/worktree and status deep links, and slim ShortcutCommandIds to ID builders only. Co-authored-by: Cursor <cursoragent@cursor.com>
…permissions escapeWindowsArgument only escaped literal quotes, not backslashes preceding them, allowing command injection via crafted paths (GHAS #740, high severity). Rewrote to follow CommandLineToArgvW escaping rules. Also scopes the winget-update job to contents: read explicitly (GHAS #1, medium) since it only relies on the external WINGET_PAT secret, not the default GITHUB_TOKEN. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…se 1) Add IProjectClassifier orchestration via ProjectAnalysisService and migrate CmdPal call sites; wire QuickShell.Run through AddQuickShellCore() for shared IShortcutRepository resolution. Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Running ultrareview automatically — This large-scale refactor extracts core services into a DI composition root, introducing a new versioned persistence envelope for shortcuts, hardened command ID parsing, and project classification infrastructure, making any subtle bug in data migration or command routing high-risk for production.. I'll post findings when complete. |
|
I can't run this ultrareview because you've reached your trial's review limit. Trial plans have lower review limits than paid plans. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
|
@claude do PR review |
|
Claude finished @tonythethompson's task in 4m 44s —— View job PR ReviewTodo list
Important note on scope
Worth double-checking the PR is rebased/synced with Findings1. 2. 3. Minor — if (_shortcuts is ShortcutRepository repository)
{
BeginShortcutPreload(repository);
}
4. Minor/nit — redundant classifier sorting What looks good
|
…on-root-0001-2981 # Conflicts: # QuickShell.Core.Tests/QuickShellCompositionRootTests.cs # QuickShell.Core/Composition/QuickShellServiceCollectionExtensions.cs # QuickShell/QuickShellCommandsProvider.cs # QuickShell/Services/CommandRouting/CommandItemHandlers.cs # QuickShell/Services/QuickShellServices.cs
…-case tests QuickShellRunSettingsPanel.cs had a stray blank line inserted after every line from a prior edit, ballooning it to 191 lines for a 2-line interface-type change. Reformatted to match the clean 95-line version already on master. Also adds test coverage for the CommandLineToArgvW-style escaping rewrite in windows-launch.ts: embedded quotes, a trailing backslash before the closing quote, and backslash-then-quote sequences. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Addressed both findings from the review:
Also rebased/merged onto current Left as-is (minor, non-blocking):
🤖 Addressed by Claude Code |
TryCreateCommandFromTaskType called QuickShellServices.Current.ProjectAnalysis, but phase 1 of the classification split intentionally keeps internal call sites (TaskTypeCommandSuggestion, WorkspaceSeedFactory, etc.) on the static facade rather than the DI-resolved service. Unit tests invoke this method directly without bootstrapping QuickShellServices, so it threw "has not been initialized" (CI: .NET build and test). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
CodeQL review comment flags 20+ items, but these are pre-existing code-quality warnings in unchanged lines (verified e.g. 🤖 Addressed by Claude Code |
…#4 phase 2) Expand ProjectLayout, split misc classifiers into nine plugins, add companion/dev-server detectors, route Core and UI call sites through ProjectAnalysisAccessor, and auto-suggest companion apps in workspace seeds. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
QuickShellServiceshost facade, Core service abstractionsIAtomicFileWriter, shortcuts v1 envelope,WorkspacesChangedon repositoryCommandKind,CommandIdParser, handler registry)IProjectClassifierregistry,ProjectAnalysisService, Run plugin DIProjectLayout, nine stack classifiers, companion/dev-server detectors,ProjectAnalysisAccessorfor Core static call sites, UI migration, companion auto-suggest in workspace seedsTest plan
dotnet build QuickShell.sln -c Release -p:Platform=x64dotnet test QuickShell.Core.Tests --filter FullyQualifiedName~ProjectAnalysis|FullyQualifiedName~WorkspaceUtility|FullyQualifiedName~QuickShellCompositionRoot|FullyQualifiedName~ProjectAnalysisAccessor