Skip to content

Preserve themes when updates fail - #6347

Open
27mfp wants to merge 2 commits into
basecamp:masterfrom
27mfp:fix/transactional-theme-updates
Open

Preserve themes when updates fail#6347
27mfp wants to merge 2 commits into
basecamp:masterfrom
27mfp:fix/transactional-theme-updates

Conversation

@27mfp

@27mfp 27mfp commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • Stage theme files and generated templates before replacing the active theme.
  • Preserve the active theme when copying, color generation, template rendering, or activation fails.
  • Clone external themes into a staging directory so failed clones cannot delete an installed theme.
  • If applying a cloned theme fails, restore the previous installed theme and retain the failed clone for inspection.
  • Recover the previous active theme if activation is interrupted between the two atomic moves.
  • Report post-activation integration failures as warnings after the new theme is safely active.
  • Add hermetic tests for failure, interruption, warning, and success paths.

Validation

  • bash test/omarchy-cli-test.sh
  • bash -n bin/omarchy-theme-set bin/omarchy-theme-set-templates bin/omarchy-theme-install test/omarchy-cli-test.sh
  • git diff --check

Release compatibility

This draft targets the current Omarchy 3 master implementation. Quattro is a separate major-release rewrite and will require a follow-up port if these safeguards are still desired there.

@27mfp
27mfp marked this pull request as ready for review July 23, 2026 16:42
Copilot AI review requested due to automatic review settings July 23, 2026 16:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants