Repository navigation
Commit f722f9e
fix(desktop): an explicit basic password store keeps saved environments (#1531)
## Problem
On a Linux host with no keyring, the desktop app cannot keep a remote environment pairing.
1. `--password-store=basic` is honoured
2. Electron reports encryption unavailable
3. The connection catalog skips the write
4. The next launch needs a new pairing
## Change
An explicit `--password-store=basic` calls `safeStorage.setUsePlainTextEncryption(true)` before `ready`.
Electron then uses its built-in `basic_text` key: obfuscation only, opted into by the flag.
```sh
t3code --password-store=basic
```
Auto mode, keyring backends, macOS, and Windows are unchanged.
## Scope and approval
Requested by the maintainer for a keyring-less cloud agent host that must run the Electron app.
The upstream test gains only a `safeStorage` mock entry; fork cases live in `DesktopPreReadyPlatform.fork.test.ts`.
Rebased as one commit onto `hyprws` `fb8d78ee063`.
The `exp/electron-api-automation` hook shared an earlier experimental build; it is not in this PR.
## Verification
Real Electron 44.4.2 `safeStorage`, each case with a private D-Bus session, temp `HOME`, and dummy secret:
| Case | Store | Backend | Available | Restart decrypt |
| --- | --- | --- | --- | --- |
| No keyring, no opt-in | `basic` | `basic_text` | `false` | n/a |
| No keyring, this fix | `basic` | `basic_text` | `true` | `true` |
| Throwaway keyring | auto | `gnome_libsecret` | `true` | `true` |
| Throwaway keyring | `gnome-libsecret` | `gnome_libsecret` | `true` | `true` |
| No keyring | auto | `gnome_libsecret` | `false` | n/a |
The opt-in ran only in `basic` rows; no ciphertext contained the dummy plaintext.
| Check | Command | Exit |
| --- | --- | --- |
| Tests | `vp test run` both `DesktopPreReadyPlatform` files | 0 |
| Desktop app tests | `vp test run src/app/` (146) | 0 |
| Typecheck | `apps/desktop` `vp run typecheck` | 0 |
| Build | `vp run build:desktop` | 0 |
| Fork CI | `vp run fork:ci` | 0 |
Not checked: a full app pairing round trip on the cloud host.
Claude Code (claude-opus-5-5)
## Fork trailers
Fork-Domain: upstream-fixes
Fork-Tier: bugfix
Fork-Upstreamable: yes
Co-authored-by: donjor <[email protected]>1 parent 14b6cd1 commit f722f9e
3 files changed
Lines changed: 79 additions & 0 deletions
File tree
- apps/desktop/src/app
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
0 commit comments