feat: delete machines + hide offline from settings#1073
Merged
Conversation
Users had dead/zombie machines cluttering their machine list after daemon reauthentications. Add a way to clean them up: - Settings machine list hides offline machines by default with a toggle to reveal them (shows count) - Machine detail screen has a Danger Zone with a delete button - Server DELETE /v1/machines/:id removes the machine and its access keys, preserves session history, broadcasts delete-machine event - Client sync handler removes the machine from storage and drops encryption keys on receipt (only if machine was in local state) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Users had dead/zombie machines cluttering their machine list after daemon reauthentications (reported on Discord by
ratio [CLAW]). This adds a way to clean them up without affecting session history.DELETE /v1/machines/:id: removes the machine + its access keys, preserves sessions, broadcasts a newdelete-machineevent to all the user's connected clientsdelete-machineevent → removes machine from storage, drops encryption keys andmachineDataKeys, guarded on local presence so stale events are no-opsBackwards compatibility
Old clients (pre-upgrade) on the same account will receive the new
delete-machineevent but will safely ignore it —handleUpdateusessafeParseand drops unknown discriminants. They'll see the deleted machine disappear on next full fetch / reconnect. No hard break.Notes for reviewer
inTxblock.en,ru,it,ja,zh-Hans,zh-Hant,ca,pl,es,pt). Polish uses proper plural rules (1, 2-4, 5+, with 11-14 special case).changelog.jsonregenerated.Test plan
pnpm typecheckpasses in bothhappy-appandhappy-server🤖 Generated with Claude Code