mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Replace the two-mode (generated vs custom + confirm) encrypted-backup
passphrase UI with a single password input and an inset generator, and make
encryption eager so Download commits instantly in the common case.
- EncryptedBackupCreator.tsx: single password input (eye reveal toggle) with
a refresh icon inset in the field that anchors a 1Password-style popover
containing only Words (range slider, 3-10) and Separator (Spaces default,
Hyphens/Periods/Commas) controls; every generation (open, control change,
repeat icon clicks) writes straight into the field — no candidate preview
or Use button. Popover stays open across re-rolls; only click-outside or
Esc closes it. Validation hint is absolutely positioned below the field
(text-xs, fade + slide-down) so it never shifts layout.
- encryptedBackup.ts: state model rewritten for eager background encryption —
the KDF starts (debounced 400ms) as soon as the passphrase is valid,
results are keyed by passphrase so stale completions never commit, and
Download either commits a finished result instantly or queues until the
in-flight encryption lands (downloadPending). New helpers:
pendingEncryptPassphrase, isEncrypting, downloadDisabled, passphraseIssue.
- DownloadKeyStep.tsx: subtitle merges the password-safety hint and drops the
encryption-mechanics sentence; Back is locked via onBusyChange while a
queued download resolves.
- key_backup.rs / commands/identity.rs: generate_passphrase now takes word
count (clamped 3-10, default 3) and separator (default space); phrases
under MIN_PASSPHRASE_LEN are re-drawn so 3-word draws always pass the same
length gate as typed passphrases.
- tauriIdentity.ts: generateBackupPassphrase accepts { words, separator }.
- e2eBridge.ts: mocked generator honors word count and separator from a
fixed deterministic word pool so specs can assert the popover controls.
- onboarding-backup.spec.ts: happy path drives the generator popover (open,
slider, separator select, re-roll, Esc) and the custom-password test drops
the confirm field; encryptedBackup.test.mjs rewritten for the eager
lifecycle (queued download, stale results, failure retry).
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition