Repository navigation
feat(suite): in-app help.install-cli shares the CLI's install plan - #5793
prakashUXtech wants to merge 23 commits into
Conversation
…ith the CLI's MCPConfig provider
scripts/bundle-apps builds the afterglow product in release, copies it to Contents/Helpers/afterglow, checks its framework links, signs it ad hoc after the helpers, and its verify step runs the bundled afterglow --version. RJ-X62's job folder lands with platforms empty, pending CB-7.
# Conflicts: # Sources/AfterGlowCLICore/MCPConfig.swift # Sources/SuiteModel/Packaging/AssistantConnect.swift # Tests/AfterGlowCLITests/MCPConfigTests.swift # Tests/SuiteModelTests/AssistantConnectTests.swift
…o lead/cli-bundle-CB-z
…ocal # Conflicts: # Sources/SuiteModel/Packaging/AssistantConnectPanel.swift # Sources/SuiteShell/SuiteHelpCommands.swift # Sources/SuiteUI/AssistantConnectSheet.swift # Tests/AppSnapshotTests/RenderBudgetConnectTests.swift # Tests/AppSnapshotTests/SuiteHelpSnapshots.swift # Tests/RealJobs/suite/connect-assistant/connect-assistant.jobs.json # Tests/SuiteModelTests/AssistantConnectPanelTests.swift # Tests/mutations/SuiteModel.AssistantConnectPanel.json # UITests/AfterGlowJourneyTests+Connect.swift
|
Fast lane: this PR body has AI attribution lines ("Generated by Claude Code", "🤖 Generated with" or a Co-Authored-By: Claude trailer). The lane strips them from the squash commit, so nothing waits on this, but please delete them from the body and leave them out of your next PRs. |
|
Fast lane: not eligible. too big: 519 lines, 21 files (max 400 lines, 15 files). This PR now needs normal captain review. |
…nstall # Conflicts: # Sources/SuiteShell/ShellHelpProvider.swift
|
Fast lane: labelled because the PR carries Belt-Lead. |
|
Fast lane: labelled because the PR carries Belt-Lead. |
|
Supervisor sentinel: this PR is 519 lines / 21 files, over the lane's 400/15 cap (lead.md rule 22). First merge origin/dev into the branch: when parent slices were squash-merged, the branch still carries their commits and the count drops to this PR's own work once dev is in. If it is still over the cap, split it into PRs of 150-400 lines (tests and model in one, wiring in another) and close this one; the lane merges the pieces on their own. Oversize PRs aren't hand-merged. |
What
help.install-clirun inside the app now answers with the real install plan instead of null, and it uses the same code as the CLI.Sources/SuiteModel/Packaging/CommandLineInstall+Run.swift(Linux-safe):CommandLineInstall.run(home:bundle:confirm:existing:link:)returns anInstallResult(plan, at, to, reason, linked). It also holds the sharedmakeLink(at:to:)andlinkTarget(_:), which moved out of MCPConfig. A confirmed.linkplan writes throughlinkToMake. Without confirm nothing is written.alreadyLinkedandrefusewrite nothing, and a failed write comes back asrefusewithlinked: false.SuiteHelpCatalog.planAnswer(plan:at:to:reason:linked:)in SuiteKernel, next toplanResult, is the one place that builds the command's JSON. SuiteKernel can't see SuiteModel, so it takes the result's fields.MCPConfig.installCLInow calls the shared code. Its behavior is unchanged, and the existingMCPConfigTestspass with one edit: they callCommandLineInstall.linkTargetwhere they usedMCPConfig.linkTarget.ShellHelpProvider.installCLI(confirm:)reads the home fromCommandLineInstall.home(arguments: ProcessInfo.processInfo.arguments, fallback: NSHomeDirectory()). That honours-SuiteHomeDir, so journeys never touch the real home. It then calls the samerunandplanAnswer.Why
Before this change, the in-app
help.install-clifell through to HelpProviding's default and answered null, while the CLI gave a full plan. Now both answer from one implementation, and jscpd finds no copy.Tests
Tests/SuiteModelTests/Packaging/CommandLineInstallRunTests.swift: without confirm nothing is written; confirm makes the link; our own link isalreadyLinked; a foreign file is refused; a failed write isrefusewithlinkedfalse; a real symlink is made in a temp home and isalreadyLinkedon the second run;linkTargetreads a plain file and a missing path correctly.SuiteHelpCatalogTests.planAnswerLeavesOutNilFields(SuiteKernelTests).MCPConfigTests(AfterGlowCLITests) are unchanged in behavior.Mutate: 4/4 SuiteModel.CommandLineInstall+Run
No snapshot PNGs change: there is no view change.
ShellHelpProvideris macOS-only and can't be built on Linux, so the batch's macOS gate compiles it.Docs checked (apple-docs MCP):
FileManager.createSymbolicLink(atPath:withDestinationPath:),FileManager.destinationOfSymbolicLink(atPath:),ProcessInfo.arguments.Stacked on #4999; merges after it.
Refs #3773
Refs #5751
Belt-Lead: act-1a178358362-etn1
Feature: cli-bundle
Slice: CB-z
Fast-Check: pass
Head: 9c36114
Generated by Claude Code