Skip to content

✨ feat: add relative paths robustet install, docs updates#15

Merged
Timpan4 merged 1 commit intomainfrom
add-path-install
Apr 7, 2026
Merged

✨ feat: add relative paths robustet install, docs updates#15
Timpan4 merged 1 commit intomainfrom
add-path-install

Conversation

@Timpan4
Copy link
Copy Markdown
Owner

@Timpan4 Timpan4 commented Apr 7, 2026

Summary by CodeRabbit

  • New Features

    • Per-package installation with automatic scope fallback and enhanced logging.
    • Path remapping support in restore operations with user confirmation for configuration files.
  • Bug Fixes

    • Improved error handling and capture for package installation failures.
  • Documentation

    • Updated project roadmap with Phase 4 infrastructure improvements and implementation dependency order.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85250e2e-4830-45e4-a097-05861468cc04

📥 Commits

Reviewing files that changed from the base of the PR and between ad8bbe5 and edc8777.

📒 Files selected for processing (4)
  • TODO.md
  • bootstrap.ps1
  • preflight-backup.ps1
  • restore-backup.ps1

📝 Walkthrough

Walkthrough

The PR updates TODO.md with completed task statuses and a new Phase 4 infrastructure plan, refactors WinGet package installation from manifest-based bulk install to per-package install with dual-scope fallback in bootstrap.ps1, modifies backup path storage to base-relative paths in preflight-backup.ps1, and enhances restore path remapping logic to support drive letter substitution and restore target mapping in restore-backup.ps1.

Changes

Cohort / File(s) Summary
Documentation & Task Tracking
TODO.md
Advanced metadata date, marked multiple tasks as completed with implementation notes, added Phase 4: Infrastructure Improvements section with planned refactoring, testing, and feature work; inserted implementation dependency diagram.
Package Installation Flow
bootstrap.ps1
Replaced manifest-based bulk WinGet import with per-package winget install, added dual-scope install attempts (user then machine) per package, introduced per-package stdout/stderr logging to temp files, changed failure tracking to $failedPackages list, removed temporary apps-missing-*.json creation during install path.
Backup & Restore Path Handling
preflight-backup.ps1, restore-backup.ps1
Added Get-RelativePath helper in preflight-backup.ps1 to compute base-relative paths; restore-backup.ps1 enhanced Resolve-RestoreTargetPath with drive letter and restore target remapping parameters, changed copy sources to use manifest-relative paths, added interactive guard for config\backup.json restore.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~65 minutes

Possibly related PRs

Poem

🐰 A hop through backups, relative paths gleam,
Per-package installs, a dual-scope dream!
Drive letters remap with manifest grace,
Restore targets guide to their rightful place,
Two scopes dance where one once stood,
This bundled refactor is wonderfully good! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-path-install

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Timpan4 Timpan4 merged commit 92cf6a2 into main Apr 7, 2026
2 of 3 checks passed
@Timpan4 Timpan4 deleted the add-path-install branch April 7, 2026 22:05
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edc8777a1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread preflight-backup.ps1
relativePath = $repoFile.relativePath
source = $repoFile.source
backupPath = $destination
backupPath = Get-RelativePath -Path $destination -BasePath $sessionRoot
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve absolute repo backup paths for bootstrap restore

This change writes manifest.repoFiles[*].backupPath as a path relative to the session root, but bootstrap.ps1 still consumes that field as an absolute filesystem path in Restore-RepoFilesFromManifest (Test-Path $repoFile.backupPath then Copy-Item -Path $repoFile.backupPath). In the first-logon flow, that makes personal repo files (like apps.json / config\backup.json) fail to restore from new backups because the relative path is resolved from the wrong working directory.

Useful? React with 👍 / 👎.

Comment thread bootstrap.ps1
$stdoutFile = Join-Path $env:TEMP "winget-stdout-$packageId-$(Get-Random).log"
$stderrFile = Join-Path $env:TEMP "winget-stderr-$packageId-$(Get-Random).log"

$proc = Start-Process -FilePath "winget" -ArgumentList "install", $packageId, "--accept-package-agreements", "--accept-source-agreements", "--scope", $scope -NoNewWindow -PassThru -RedirectStandardOutput $stdoutFile -RedirectStandardError $stderrFile
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep winget manifest constraints during package install

Switching from winget import of a filtered manifest to winget install <PackageIdentifier> drops manifest-level constraints (for example source selection and any pinned metadata in exported manifests). In manifests that rely on those fields, installs can come from the wrong source or wrong version, which breaks the declarative/reproducible behavior this step is intended to provide.

Useful? React with 👍 / 👎.

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.

1 participant