Skip to content

feat(actions-fleet): install planner with unified diff preview#434

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/add-install-planner-and-diff-preview
Draft

feat(actions-fleet): install planner with unified diff preview#434
Copilot wants to merge 2 commits into
masterfrom
copilot/add-install-planner-and-diff-preview

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 25, 2026

Adds a readable diff preview to the install planner so reviewers can inspect exact file additions, modifications, and conflicts before any writes occur.

Core library (actions-fleet-core)

  • PlannedFileDiff — adds existingContent: string | null field; the on-disk content is now captured during planDiff and carried through for diffing
  • render-diff.ts (new) — zero-dependency LCS-based diff engine:
    • renderUnifiedDiff(old, new, filename, context?) — produces standard diff -u output; null old content renders as all-additions (new file)
    • renderPlanPreview(plan, context?) — full plan preview: additions for create, unified diff for update-managed, # CONFLICT warning headers with proposed content for conflict-unmanaged / conflict-other-pack, unchanged files omitted

CLI (sh1pt actions plan)

New --diff flag prints a colorized unified diff after the file status table:

$ sh1pt actions plan node-pnpm-ci --diff

Plan: node-pnpm-ci@1.0.0 → /my/repo

  create               .github/workflows/ci.yml

Diff preview:

--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
+name: CI
+on: [push, pull_request]
...

---/+++ headers bold · - lines red · + lines green · @@ hunks cyan · # CONFLICT warnings yellow.

Copilot AI linked an issue May 25, 2026 that may be closed by this pull request
@alwaysmeticulous
Copy link
Copy Markdown

Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR.

Last updated for commit f505900. This comment will update as new commits are pushed.

Copilot AI changed the title [WIP] Implement install planner and diff preview for sh1pt CLI feat(actions-fleet): install planner with unified diff preview May 25, 2026
Copilot AI requested a review from ralyodio May 25, 2026 19:18
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.

Build install planner and diff preview

2 participants