hosts/docs/adr/0001-privileged-mode-gates-writes.md
phg e268794564 Fix #13: Expose Pre-edit Backup restoration
Preserve full diff opcodes before grouping, route modal navigation to a two-axis viewport-sized scroller, and calculate side-by-side layout using terminal cell widths so tabbed Hosts File lines keep a stable divider.
2026-09-04 21:37:51 +02:00

12 lines
763 B
Markdown

# Privileged mode gates system-file writes
The application starts read-only and permits changes to `/etc/hosts` only after
sudo access has been validated and a timestamped backup has been created. All
privileged writes go through `HostsManager` during that mode. This makes the
authorization boundary visible to the user and guarantees a pre-edit safety
snapshot. While Privileged Mode remains active, the TUI exposes that session's
exact Pre-edit Backup path and can restore it after explicit confirmation. The
restore confirmation identifies both the backup source and Hosts File target;
it presents an exact-file Git-style diff and rechecks both reviewed files before
restoring. On success the application reloads the Hosts File and clears
undo/redo history.