Repository navigation
fix(desktop): store saved SSH hosts in the versioned JSON document - #454
Conversation
Corrupt, invalid, and pre-envelope files fail and stay untouched. Version stays 1.
commit: |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
|
Blocked — head
Needs: a green |
electron-vite externalizes production deps. Leaving the store external made Main import its TypeScript source, so the window never opened.
|
auto-merge: no Reviewed head
Needs a rebase and a manual review/merge decision. |
|
Developer decisions on the host-write questions:
Please also resolve the current conflicts with |
A missing file is not created until the first change. A pre-envelope file is migrated. A corrupt or newer file is left untouched and only SSH hosts are unavailable.
|
CI on |
Review and verification of head
|
An explicit undefined hostsError failed RPC output validation after a list update. Every hosts-file write now passes 0600 to the atomic writer.
|
Developer decision on invalid legacy entries If any entry in a legacy, pre-envelope file fails validation, abort the migration:
No entry is ever discarded. Please add a test for this case. |
|
Desktop evidence after the hostsError encode fix.
The crash dialog from the previous head was not re-recorded. ssh-hosts.webm |
A pre-envelope file with one bad entry stays byte-for-byte unchanged. SSH hosts stay unavailable instead of dropping that entry.
|
CI blocker on Review and verification have not started. Please fix the typecheck and push. Running |
An untyped empty array was never[], so pushing a host failed typecheck.
|
CI on
|
# Conflicts: # apps/desktop/src/main/application/desktop-application.test.ts
Review record — verified, merging
CIOn this head: Check, react-doctor, and both Publish @getpie/cli preview runs succeeded. Merge state was CLEAN against current ReviewSaved SSH hosts move to
|
|
Merged as |






Requirement
Saved SSH hosts must move onto the versioned JSON document without losing hosts, and without blocking Desktop when the file cannot be read.
Developer decisions:
{ version, activeId, environments }file into version 1 only when every entry validates. DropactiveId. If any entry fails validation, abort adoption and leave the file byte-for-byte unchanged.Expected behavior
{ version: 1, data: { environments } }at0600.hostsError: undefined.Changes and risks
makeJsonDocumentcan skip seeding and pin a mode on each atomic write. Desktop uses both. An unreadable or partially invalid legacy store no longer fails startup and never drops entries to force a migration.UI: the connections menu shows the fixed hosts error and hides Add SSH host while the file cannot be read.
Verification
apps/desktopvitest:desktop-ssh.test.tsanddesktop-application.test.tspassed, including adoption mode0600, aborted adoption leaving the original bytes, and encoding a snapshot after a list update.Desktop screenshots and video: #454 (comment)