Offer Hive Keychain on the first sign-in page when the extension is installed
Problem and intended result
The sign-in dialog (packages/smart-signer/components/auth/form.tsx) always opens on the safe-storage step (Steps.SAFE_STORAGE_LOGIN, methods/safestorage.tsx). It asks for a username, password and private key.
Keychain sign-in is only on the second step, "Other sign in options" (methods/methods.tsx). That step already detects the extension with hasCompatibleKeychain() (packages/smart-signer/lib/signer/signer-keychain.ts, which checks window.hive_keychain and requestSignBuffer), but uses it only to enable or disable the Keychain button. A user who has Keychain installed, typically the user least willing to paste a private key into a web page, is shown the key form first. They have to find the second step themselves.
Intended: when hasCompatibleKeychain() is true as the dialog opens, the first page offers "Sign in with Hive Keychain" prominently:
- Above the safe-storage form, or as its primary action.
- Needs only the username field, and uses the same sign flow as the existing Keychain button (
sign(LoginType.keychain, username, keyType)thensubmit). - With the dialog's
preferredKeyTypes: posting on the Blog, active on the Wallet.
The safe-storage form stays available on the same page (collapsed or below), and "Other sign in options" is unchanged. Without the extension the first page looks exactly as today.
Apply the same to PeakVault when hasCompatiblePeakvault() is true, since it is the same kind of injected extension. MetaMask (async snap check) and Google Drive stay on the second step.
Acceptance criteria
- With a Keychain stub (
window.hive_keychainwithrequestSignBuffer, as inapps/wallet/playwright/tests/support/keychainStub.tsandapps/blog/playwright/tests/fixture/loggedInVoteSigningStack.spec.ts), the Blog and Wallet sign-in dialogs show the Keychain option on the first page. Signing in with only a username logs in withloginType: keychain, using posting on the Blog and active on the Wallet. - Without the stub, the first page is unchanged and the existing login specs pass.
- PeakVault, when stubbed, likewise appears on the first page.
- The option is keyboard reachable, has an accessible name, and its label is translated in every Blog and Wallet locale (validators pass).
- The username typed on the first page carries over to the Keychain sign-in, and to "Other sign in options" as today.
Verification
aidev test run --slot full.
Integration points
packages/smart-signer/components/auth/form.tsx,methods/safestorage.tsx— first-page extension sign-inpackages/smart-signer/components/auth/methods/methods.tsx— shares the sign handler and detection rather than duplicating thempackages/smart-signer/locales/*/smart-signer.json— new label(s)
Scope boundary
Sign-in dialog only. No change to signing itself or to the Keychain signer.