Repository navigation
Backups before every config edit, /changes history with revert, guarded /nmsh reset - #529
Draft
raiseCatError wants to merge 8 commits into
Draft
raiseCatError wants to merge 8 commits into
raiseCatError wants to merge 8 commits into
Conversation
… reload the terminal, Ask knows /changes and /nmsh reset An XDG_CONFIG_HOME outside the home made every journaled write of NMSh's own files (theme bridge, /cursor) refuse; the same symlink, owner and permission checks now apply under NMSh's configuration directory.
…them directly again Journaling them made Fish's first prompt never arrive with Theme Bridge on (live fish test); they live in NMSh's configuration directory and are regenerated from settings. Tool configuration files outside it stay journaled. Restores the original live test fixture.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #528. NMSh now backs up every configuration file before it changes one. You can browse and revert those changes, and a guarded reset removes only what NMSh added.
src/backups/): before any NMSh write to a config file (host appearance, Kitty/Ghostty shaders,/cursor, Theme Bridge, Starship, tmux, keyboard, status line, Oh My Zsh restore, dotfiles), the previous contents are stored and verified by hash. If the backup cannot be made, the write is refused. Storage is bounded, and reset/restore entries are never pruned silently. NMSh'sconfig.jsonis checkpointed daily and before every reset or restore./changes(also/backupsand/snapshots): newest first. It shows whether each file is unchanged since, edited since, or missing. A restore shows the exact diff back to the backup. It asks again if you edited the file afterwards, re-checks the files before writing, and backs up the current state first, so the restore can itself be undone.Stakes a manual snapshot./nmsh reset: choose areas (nothing preselected) → see the exact owned lines and skipped areas → see the backup → typereset→ Enter. Everything is re-verified before writing, and it reports per-area results plus the undo entry. Plain/resetwrites nothing and explains/nmsh reset.XDG_CONFIG_HOMEis outside the home folder. Without this, journaled writes there were refused. Ask knows the new commands.Tests: 1847 of 1848 affected focused tests pass (0 failures; logs in the evidence folder), and tsc is clean. Panel snapshots cover 120x40, 80x24, 60x20 and 40x14, with and without NO_COLOR. Physical terminal validation of restore/reset is still pending.