Skip to content

desktop: no keychain password prompt at launch; the keychain opens only when an AI key is saved or used - #46

Closed
asaficontact wants to merge 2 commits into
mainfrom
keychain-on-demand
Closed

asaficontact wants to merge 2 commits into
mainfrom
keychain-on-demand

Conversation

@asaficontact

Copy link
Copy Markdown
Contributor

Spec: Tawab installed 0.1.0 with the install command. On first launch, macOS asked for his login password: "archdraw wants to use your confidential information stored in 'archdraw Safe Storage' in your keychain". He had not stored anything yet.

Change:

  • SafeKeys (app/desktop/src/keys.ts) called safeStorage.isEncryptionAvailable() in its constructor at launch. On macOS, any safeStorage call opens or creates the keychain item, and an ad hoc signed app is then asked for the password.
  • Now only Linux, the one platform that can lack a keyring, checks at launch. On macOS and Windows, the keychain opens only when a key is encrypted or decrypted.
  • The "No system keychain found" warning, which is about GNOME Keyring and KWallet, now only shows on Linux.
  • If a Mac user pressed Deny, saving a key now says so, instead of quietly storing it unprotected.

The Mac launch check in ci.yml and release.yml now fails if launching the packaged app leaves an archdraw Safe Storage item on the runner.

Evidence:

  • The test came first. With only the check pushed (f4ed31a, app code as on main), the macOS job failed: run 37414424030 logged archdraw smoke ok 0.1.0, then "launching archdraw created or opened the 'archdraw Safe Storage' keychain item".
  • With the fix (94dbfa8), run 37414982543 passed: test (macos-15), test (ubuntu-22.04) and node-22. The Linux desktop e2e still saves and reads back a key.
  • scripts/ci-local.sh passed before each push.

Not covered by CI: saving a key on a Mac. There, the first save is where macOS asks once. It needs a check by hand on a real Mac.

Breaks: the new macOS step in ci.yml (manual runs) and release.yml (every release) watches for a prompt at launch.

Rollback: git revert the two commits.

— Banna, one of Tawab's agents

Banna added 2 commits October 6, 2026 00:22
…hain item

A user who installed 0.1.0 was asked for their login password at first launch ("archdraw wants to use your
confidential information stored in 'archdraw Safe Storage'"), before storing any AI key. The check after the
packaged app's launch asserts that no 'archdraw Safe Storage' item exists on the runner.

Agent: Banna
…at launch

On macOS any safeStorage call, isEncryptionAvailable() included, opens the 'archdraw Safe Storage' keychain item,
and an ad hoc signed app gets a password prompt for it. SafeKeys called it in its constructor at launch, so every
new Mac user was asked for their login password before storing anything. Only Linux can lack a keyring, so only
Linux checks at launch (and only Linux shows the 'no system keychain' warning, whose text is about Linux
keyrings). On a Mac whose keychain refused (Deny), saving a key now says so instead of storing it unprotected.

Agent: Banna
@vercel

vercel Bot commented Oct 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
archdraw Ready Ready Preview Oct 6, 2026 4:46am UTC

Request Review

@asaficontact

Copy link
Copy Markdown
Contributor Author

Replaced by #47: the same code (git tree 59e5f4755f) with the commits signed off, so the sign-off check passes. — Banna, one of Tawab's agents

This branch was successfully deployed

1 active deployment
Preview — 94dbfa8e Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant