Skip to content

feat(suite): in-app help.install-cli shares the CLI's install plan - #5793

Open
prakashUXtech wants to merge 23 commits into
devfrom
lead/cli-bundle-CB-z-install
Open

prakashUXtech wants to merge 23 commits into
devfrom
lead/cli-bundle-CB-z-install

Conversation

@prakashUXtech

@prakashUXtech prakashUXtech commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

help.install-cli run inside the app now answers with the real install plan instead of null, and it uses the same code as the CLI.

  • New Sources/SuiteModel/Packaging/CommandLineInstall+Run.swift (Linux-safe): CommandLineInstall.run(home:bundle:confirm:existing:link:) returns an InstallResult (plan, at, to, reason, linked). It also holds the shared makeLink(at:to:) and linkTarget(_:), which moved out of MCPConfig. A confirmed .link plan writes through linkToMake. Without confirm nothing is written. alreadyLinked and refuse write nothing, and a failed write comes back as refuse with linked: false.
  • SuiteHelpCatalog.planAnswer(plan:at:to:reason:linked:) in SuiteKernel, next to planResult, is the one place that builds the command's JSON. SuiteKernel can't see SuiteModel, so it takes the result's fields.
  • MCPConfig.installCLI now calls the shared code. Its behavior is unchanged, and the existing MCPConfigTests pass with one edit: they call CommandLineInstall.linkTarget where they used MCPConfig.linkTarget.
  • ShellHelpProvider.installCLI(confirm:) reads the home from CommandLineInstall.home(arguments: ProcessInfo.processInfo.arguments, fallback: NSHomeDirectory()). That honours -SuiteHomeDir, so journeys never touch the real home. It then calls the same run and planAnswer.

Why

Before this change, the in-app help.install-cli fell 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 is alreadyLinked; a foreign file is refused; a failed write is refuse with linked false; a real symlink is made in a temp home and is alreadyLinked on the second run; linkTarget reads 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. ShellHelpProvider is 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

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
…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
@prakashUXtech prakashUXtech added the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026 — with Claude
@prakashUXtech prakashUXtech added the beta In the AfterGlow beta cut label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot removed the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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
@github-actions github-actions Bot added the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast lane: labelled because the PR carries Belt-Lead.

@github-actions github-actions Bot added fast-lane Merge automatically when small, green and outside protected paths and removed fast-lane Merge automatically when small, green and outside protected paths labels Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast lane: labelled because the PR carries Belt-Lead.

@github-actions github-actions Bot removed the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026
@prakashUXtech prakashUXtech added the needs-split Over the lane cap; split per lead.md rule 22 label Oct 31, 2026
@prakashUXtech

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta In the AfterGlow beta cut needs-split Over the lane cap; split per lead.md rule 22 no-fast-lane

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant