gui: Danger Zone in the Updates tab — reset levels for a wedged node#194
Merged
Merged
Conversation
Adds an in-app way to reset a node, so recovering a stuck install doesn't mean
hand-deleting files under ~/.myownmesh. A "Danger Zone" card at the bottom of
Settings → Updates (desktop only) offers three graduated, two-click-armed
levels:
- **Leave the fleet** — drop this device from its fleet (ownership, fleet
key, signed fleet roster); keep other meshes and settings. Reuses the
existing `fleet_leave`.
- **Reset networking** — leave the fleet AND forget every mesh (rosters +
signed state), keeping the device identity.
- **Factory reset** — wipe everything (identity, config, all meshes, fleet
ownership); the device becomes brand-new to every peer.
Each reboots the whole stack when it fires. The myownmesh daemon is the real
datastore, so a reset that only deletes files gets undone by an in-memory cache
re-persisting on the next write. So each command clears state, the daemon exits,
and `restart_app` relaunches the app — the supervised node and a fresh daemon
come back on clean disk (identity regenerated on a factory reset).
- node (mesh.rs): `reset_networking` (fleet_leave + daemon ForgetAllNetworks)
and `factory_reset` (clear ownership, then daemon FactoryReset wipes the
shared state dir); dispatched from node_control.rs.
- allmystuff-protocol: `ForgetAllNetworks` / `FactoryReset` on the daemon
Request mirror (needs a daemon that speaks them — see note).
- GUI: `reset_networking` / `factory_reset` Tauri commands (restart_app
already existed), `resetNetworking` / `factoryReset` bindings, the
`dangerLeaveFleet` / `dangerResetNetworking` / `dangerFactoryReset` store
methods, and the Danger Zone UI.
Depends on the myownmesh daemon that adds ForgetAllNetworks/FactoryReset; the
.myownmesh-rev pin will be bumped as that release cuts. Reset networking still
leaves the fleet against an older daemon (the forget-all just no-ops with a
parse error).
Note: wipe + backend compile/clippy/type-check clean, but the reboot lifecycle
(node/daemon exit → app relaunch → fresh stack) can't run in CI and wants a
smoke test on a real desktop install.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018x1RV6ppUdMDTHxScVo26L
Owner
Author
|
The Evidence:
So the change is green everywhere the crash didn't randomly land. I don't have permission to re-run the job from here (the API returns Generated by Claude Code |
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.
What
The AllMyStuff half of the Danger Zone (companion to MyOwnMesh #106). An in-app way to reset a node, so recovering a stuck install doesn't mean hand-deleting files under
~/.myownmesh. A Danger Zone card at the bottom of Settings → Updates (desktop only), with three graduated, two-click-armed levels:fleet_leave.Why the reboot
Each action reboots the whole stack when it fires. The myownmesh daemon is the real datastore, so a reset that only deletes files gets undone by an in-memory cache re-persisting on the next write. So each command clears state, the daemon exits, and
restart_apprelaunches — the supervised node and a fresh daemon come back on clean disk (identity regenerated on a factory reset).Changes
mesh.rs):reset_networking(fleet_leave + daemonForgetAllNetworks) andfactory_reset(clear ownership so it can't re-persist, then daemonFactoryResetwipes the shared state dir); dispatched fromnode_control.rs.ForgetAllNetworks/FactoryReseton the daemonRequestmirror.reset_networking/factory_resetTauri commands (restart_appalready existed),resetNetworking/factoryResetbindings, thedangerLeaveFleet/dangerResetNetworking/dangerFactoryResetstore methods, and the Danger Zone UI (theme-aware,--dangervars).Dependency
Reset networking and factory reset need the myownmesh daemon that adds
ForgetAllNetworks/FactoryReset(#106 over there). Per the plan, the.myownmesh-revpin gets bumped as that release cuts — this PR intentionally leaves it. Against an older daemon, Reset networking still leaves the fleet (the forget-all just no-ops with a parse error); Leave the fleet works regardless.Testing
node + protocol + Tauri crates:
cargo check/clippy --all-targets -D warnings/fmtclean;svelte-checkclean (0 errors).🤖 Generated with Claude Code
https://claude.ai/code/session_018x1RV6ppUdMDTHxScVo26L
Generated by Claude Code