Skip to content

Latest commit

 

History

History
273 lines (222 loc) · 81.4 KB

app.md

File metadata and controls

273 lines (222 loc) · 81.4 KB

Desktop app

2026-10-22. Plan and first slice of Deadbolt's desktop UI, built in Rune. Open questions are marked Open.

Architecture

  • A thin client of the daemon. The app speaks the daemon's socket protocol, as the CLI does, and starts the daemon if none runs. It holds no keys and reads no store files: unlock, items, devices and pairing are all daemon requests. Quitting the app leaves the daemon (and its unlock) running.
  • crates/client (deadbolt-client) holds what both clients need: the protocol types, where the files live (Paths) and the client (call, status, ensure_running, stop). The CLI wraps it in crates/cli/src/client.rs. Launch { program, version } says which binary runs the daemon; the replacement rule below lets a bundled app coexist with a separately installed CLI.
  • crates/app (deadbolt-app) is a workspace member: a library and its own program, deadbolt-ui (src/main.rs). deadbolt (crates/cli) is headless and never links it: no Rune, wgpu or winit, so the CLI and daemon stay small and build anywhere. Users run deadbolt app (see One command), which finds deadbolt-ui and starts it, the app in its own process. Rune, rune-kit and rune-theme-opencode are git dependencies pinned to one rev (on Rune's dev branch), bumped deliberately by changing all three revs in crates/app/Cargo.toml. deny.toml allows that one git source and BSL-1.0 (the Windows backend of arboard, which Rune's clipboard uses). On Linux Rune loads Wayland, X11 (libxcb, libxkbcommon) and the GPU drivers only when a window opens, so deadbolt-ui links just glibc and libgcc_s too. Building it links libxkbcommon (libxkbcommon-dev; Fedora libxkbcommon-devel), which the linker drops again since nothing calls it; CI installs it.
  • Finding the daemon binary (binary::discover): in an .app/Contents/MacOS directory (its own path with symlinks resolved, so a link shaped like a bundle isn't one), always ../Helpers/deadbolt, even when DEADBOLT_BIN points elsewhere. A missing helper is an error, not a fallback. Outside a bundle: DEADBOLT_BIN (development and tests), else the deadbolt beside deadbolt-ui (target/<profile>, an install's directory), else the first on PATH or in the well-known directories (binary::search_dirs). The helper's pin the app checks (enclave::verify) comes from crates/enclave (deadbolt_enclave::SHA256), the same build script deadbolt takes its pin from, so the two always agree.
  • Threads: one worker thread runs daemon requests in order on a current-thread Tokio runtime and wakes the window when a reply lands. It picks each next request from what's waiting (daemon::next_jobs): only the newest selection's Get runs (older ones would be dropped as stale), and reads ahead (Peek) run last, the newest batch alone, so a held arrow never builds a queue. Item reads run up to three at once (LANES), each on its own connection, so a selection the cache missed still reads ahead while its own values come; anything else runs alone, in order. A second thread holds the daemon's watch stream open and posts each change to the same inbox, reconnecting with backoff (100 ms doubling to 2 s) when the daemon restarts; it never starts the daemon itself. The UI drains both in Rune's poll; nothing polls the socket. The main window's stream watches as the app (watch with app, daemon::Window::Main); the quick panel's doesn't. That's how a second launch finds the running app (see One command).
  • Live state: the daemon owns locking (idle timeout, deadbolt lock, sleep and screen lock) and the app mirrors it. locked or the daemon stopping goes to the lock screen and forgets every value; unlocked from elsewhere enters the vault; items for the shown vault refetches the list, keeping the selection, search and scroll, then the selected item's values in place; watching (after each reconnect) and resync refetch everything. activate (only to the main window's stream: another launch asked for the window) shows, restores and focuses the main window with the launcher's token (Windows::activate_main, Rune's AppHandle::activate, or open without one), bringing back the Dock icon a --panel start went without; nothing else changes.
  • Secrets in the app: the passphrase fields are Rune's secure single-line TextEdit (TextEdit::secure().single_line(): dots, no undo history, no copy, cut or IME, text typed with ⌘ or ⌃ held and control characters such as a pasted line break kept out, the text wiped whenever it's replaced or dropped and as an exiting field starts to leave, macOS Secure Event Input while focused). The passphrase leaves the field into a Zeroizing<String> (model::take_secret) and stays in one all the way to the socket (the protocol's passphrase fields and the request buffer are wiped too). Item values are fetched one item at a time (item-get) and wiped when the selection changes, the store locks or the window closes. Copies go through Rune's Tx::copy_secret, which writes with clipboard history exclusion (org.nspasteboard.ConcealedType on macOS) through one process-wide owner, and clears them after 30 s, or on lock and quit, only if the clipboard still holds them. An export being imported is read on the daemon thread into a Zeroizing<String> (deadbolt_client::export::read) that goes into the import request and is wiped with it once sent; the preview and the import each read the file again, so the UI holds only the file's path and the daemon's counts (ImportReport). Locking or the daemon stopping forgets an import wherever it was (App::forget_import), and drops its replies. A form's secret fields are secure from start to finish, a generated password's too; Show reveals the value in place (TextEdit::set_revealed), which changes only the drawing: no copy, cut, undo or IME, no text in the element tree, and Rune masks a revealed field on its first exit frame (Hide, the form closing, its field going, a lock). ⌘C in a secret field, shown or not, copies its selection through Tx::copy_secret, as an item's copy does. A closing form masks and empties every field, not only its secrets, so Rune wipes each (edit::Input::wipe).
  • Item pages (src/cache.rs): so a new selection shows its whole page on the frame it's made, the app keeps up to 32 pages: every item whose values landed, and the rows around the selection, read ahead (Job::Peek: four the way the keys move and two behind, or three each way after a click) each time the user moves it in the main window, never on a sync. A page keeps what the page draws with its secrets hidden: names, usernames, URLs, notes and the one-time code until its period ends, but no secret's value (a hidden secret draws as twelve dots whatever its length), so Show, Copy and ⌘E still wait for the selection's own values, which are asked for as before, after the reads ahead when its page already shows, at once when a copy or Show waits on them. A read ahead's values are wiped as its page is taken (daemon::Values), and every page is wiped as it's evicted, on a lock, the daemon stopping, the panel hiding, the window closing, and any change to the vault (App::forget_pages). Reads ahead aren't in Activity (the daemon records none of the app's reads; the app reports its own reveals and copies), but each counts as use for the idle lock, as any item-get does, which is why only a move of the user's sends them.
  • Keys: the search field and the passphrase field handle their own keys (on_input_key) and get focus by rendering with focused: true; the window's on_key handles the rest, so every key works with focus on a button or nowhere. The vault's keys live in src/keys.rs (SHORTCUTS, the map the ? sheet lists, and Nav: the field ⇥ moved into, ⌘K's open row, the sheet, the Settings row), ⌘K's actions in src/palette.rs, the ? sheet in src/sheet.rs and Settings in src/settings.rs; each overlay takes the keys first while it shows and Esc backs out of it. ⇥ into the item's fields is a Nav index, not Rune focus: the search lets go, and ⇥ or Esc gives it back. Rows are the app's own (vault::rows): role option, out of the Tab order (focusable(false)), and a press selects without moving focus (preserve_focus_on_press), so typing and ↑↓ go on in both windows wherever the press is released, and a scroll under the press cancels it. A click on a row with focus elsewhere (nothing, Lock) puts it back in the search; a click on the row of the item being edited does nothing. With the search unfocused, a printable key goes back into it. A press anywhere on the search's box (rune-kit's TextInput, plain: its icon, its padding) focuses it, never drags the window, and never blurs it on the way down; the quick panel's search is the same. ⇧⌘B leaves focus in the search. With the list hidden, ⌘F, ↑↓ and a search edit open it again, from the import view too; a search edit also closes the import view (as ↑↓ do), unless an import is running, when the selection waits for the import view to go (on_imported, cancel_import).
  • Look: Rune's OpenCode theme (rune-theme-opencode, pinned with Rune): kit(dark) for both windows and every screen, its Inter and IBM Plex Mono registered through AppSpec::fonts/families. The vault follows Seer's docs/kit-design.md: changes are immediate, motion (~0.15 s) only where something moves, no hover fades, pointer cursors or focus rings (a focused form field keeps a neutral edge, edit::view::quiet), and nothing reflows. It's rune-kit's shell (rune_kit::shell::SplitView, src/vault/): the sidebar (272 pt, 200–312, ⇧⌘B or ⌃⌘S hides it; App::sidebar) has the search on top (⌘F at its end while it's empty and unfocused), the vault's name with its item count, two-line rows (46 pt: a kind icon, the name over a faint line saying what it is, ⌘1–9 on the selected row) under one selection highlight that moves with the selection, and a foot with the device's presence, Settings and Lock. The item is a document page (vault/page.rs): its kind icon, a big title and the kind ("Login · From 1Password"), then each field as a faint name over its value with Show and Copy at the end, and the key hints along the page's foot (what ⏎, ⇧⏎ and ⌥⏎ copy, or a field's ⏎, Space and ⇥, then ⌘K Actions and ?). Edit, Delete and + sit at its top right. The form takes the page's place in the same shape: each field's name over its control. The main window draws under a transparent title bar (view::CHROME, traffic lights centred in that band); every other screen is a shell::Page (view::page), with the same frame, toolbar band and drag region, and its Back or Cancel in the band past the lights (Cx::titlebar_inset). Its panel centres in the frame, and scrolls when it's taller. The wordmark is the theme's sans, semibold and tight. The bolt's strike is the theme's ember scale (9 at rest, a paler step for the flash); the QR tile stays white in both appearances.
  • First run (src/onboarding.rs, onboarding/{worker,view,ceremony}.rs): creating and joining run on their own thread and connection (onboarding/worker.rs), beside the request worker, because a join holds its connection for minutes while the code waits for the other device. The worker reports each stage as it starts, so progress shows only what really happened. The app sets the device up (name and passphrase) before it asks for a code, so its join is a set-up device's join and the daemon never asks it for a passphrase (docs/design.md, Pairing). A device that is set up but holds no vault (a cancelled join) goes back to onboarding without the passphrase step. Cancelling a join while the device is being set up waits for the setup (the daemon finishes it even if the app hangs up), so the form never asks for a passphrase that wouldn't be used; a device set up elsewhere meanwhile refuses the new passphrase with a notice instead of keeping the old one silently. The code is a capability until it's used or expires: it's held in Zeroizing strings, and a copied deadbolt approve … leaves the clipboard (if it's still there) when the other device pairs, the join ends, onboarding is left or the window closes.

Screens

Screen v1 Later
First run Welcome (wordmark, Create or Join). Create: device name (prefilled from the computer's name, looked up off the main thread and filled in only if nothing was typed), vault name, passphrase with a strength meter and a repeat that confirms in place, then honest progress (Argon2, creating), then the moment and the empty vault. Join: device name and passphrase, then the pairing code large (its words spaced so it wraps) with the deadbolt approve <code> command to copy and a note that it works once, for 5 minutes, then the moment ("Synced from studio") and the synced vault. Cancelling, the other device refusing, a wrong code tried (the code burns), an expired code and daemon failures each return to the form with a notice coloured by how serious it is (neutral, caution, danger) and what to do next
Unlock Passphrase, Enter or Unlock; wrong passphrase says so in place and keeps focus. When Touch ID is enabled and enrolled (docs/touch-id.md), the lock screen offers Use Touch ID beside the passphrase field and auto-prompts once when a focused window opens on the lock screen (app launch, Retry, quick-panel summon) or when the locked window gains focus after a background lock (App::main_focus), never while unfocused or when a lock occurs while the main window stays focused (⌘L / Lock, or idle lock while Deadbolt is still frontmost). When the biometric slot was wiped (14-day expiry, fingerprint set changed, passphrase changed), it says "Touch ID was reset; enter your passphrase." Settings holds the "Unlock with Touch ID" switch (Command::TouchIdSet)
List Search-first: the field is focused, typing filters live, ↑↓ or J K select, ⌘1–9 jump; rows show the kind's icon, the label, and what it is (username, expiry, an SSH key's comment or fingerprint, an identity's email or phone; else the kind, never a note's body) Vault switcher, favourites, sort by recently used, daemon-side search over URL host and cardholder
Item detail Fields in schema order, secrets masked with Show, Copy per field, a file field's name with Save… (a Save dialog; the daemon sends the contents and the worker writes them, mode 0600, reported to Activity as a reveal; ⏎ on a document does the same; the quick panel saves nothing), notes and addresses wrap, a secure note's body or a private key wraps once shown (a key file's final line break draws no empty line), a public key and fingerprint set in mono. Long values wrap anywhere (wrap_anywhere), so a public key, a fingerprint, a URL or a base64 run breaks inside itself rather than being cut off; a value that fits keeps its one-line row, and a wrapped one keeps its name and buttons level with its first line, so Show moves neither. A secret, hidden or shown, is Rune's read-only secure label (text(..).secure().revealed(..)): twelve dots whatever its length until Show, never selectable or copyable (Copy goes through Tx::copy_secret), out of the element tree, Debug, --tree and the shared layout and raster caches, zeroized, and masked again on the first frame of a lock's or a new selection's fade. A secret with nothing held (an otp secret the daemon left out) is plain dots. A login's otp is a "One-time code" row: the current code in 3+3 groups (monospace, tabular), a bar that empties over the period, and Copy; no Show, since the app never holds the secret. The daemon computes each code (Command::ItemCode), the item's reply arrives without otp secrets (the daemon leaves them out, and daemon::Values wipes any that come) and with the code alongside, and the app asks for the next once per period, 50 ms after it ends (App::tick_code, one wake set at the first poll after the code lands), never per frame. Those asks don't hold off the daemon's idle lock. A second otp field (an older import) shows masked, with no Show or Copy. An otp saved before codes were checked shows why it has none Open URL, password age
Passkey Made by the browser extension (docs/autofill.md), listed by its site (the relying party id) with its username. The pane shows Site, Username, Created and any notes (view::shown), with copy buttons on all but Created; the credential id and user handle stay out, and the private key never reaches the app, since the daemon leaves it out of every item it sends. ⏎ copies the username. No Edit button, and ⌘E and Edit Item do nothing (edit::editable), since changing a passkey's site or key would break it with the site. Delete works as for any item, on every device; the site still lists the passkey until it's removed there too Rename, notes
Copy "Copied, clears in 0:28" with a bar that empties, then "Clipboard cleared" Configurable timeout, "copy and paste into the previous app"
Add / edit ⌘N or the toolbar's + (New Item): the name on top (left empty, the daemon names the item from its fields), a type row (the type's icon, name and a chevron) that opens a small floating list of every type by its full name with a filter on top (edit::types; Rune's Popover and TextInput, since rune-kit's Combobox has no icons, keywords or programmatic open): ⌘N and + open the form with the list open and the filter focused, typing narrows it by name and synonyms ("key" finds SSH key and API credential, "pdf" a document, "iban" a bank account), ↑↓ move, ⏎ picks and focuses the name, esc closes the list (a second esc the form), and ⌘T, Space, ⏎ or a press on the row open it again. Common types come first (Login, Secure note, Card, Identity, API credential, SSH key), and ⌃⇥ steps in the same order. Then the type's fields in schema order. A file field (a document's file) is a row with the file's name and Choose File… (Choose Another…, and Remove when it isn't required): the app reads the chosen file, refusing one over 10 MiB on the field, and sends its name and contents; a file already saved shows its name and stays unless another is chosen (notes and addresses in text areas, where ⏎ breaks the line; an SSH public key and fingerprint in ones that wrap, where ⏎ still saves and a pasted line break is dropped) (the core's item schema, mirrored in edit::schema). ⌘E or Edit (Edit Item): the same form in the detail pane, filled in; fields the schema doesn't know follow as they are. A login's one-time password stays as it is unless a new one is typed in, since the daemon never sends it: its field says "Kept · type to replace", with no Show until something's typed. A secure note's body and an SSH key's private key are secure text areas, hidden as one fixed row of dots. Editing an item that has one, it starts empty with "Kept · type or paste to replace" (as a login's kept one-time password does): the saved value isn't loaded into it, so what's typed or pasted is simply the new value, and left empty it's kept and not sent. Show loads the saved value and reveals it in place, wrapping, still secure, to edit anywhere inside it, up to 12 lines before it scrolls; from then on it's an ordinary field. Hidden again unchanged, it's kept again; hidden after an edit, the edit stays, hidden, and typing adds to it. Rune's pristine hidden multi-line fields (a first insert or paste replaces the value, a first delete empties it) never come into play: a kept field is empty, Show loads the saved value only to reveal it, and hiding it unedited keeps it again; an edited value isn't pristine, so Rune appends to it. To remove a note's body: Show, select all, delete, which empties it on purpose (a private key can't be empty). Show and Hide focus the field, and only it. ⏎ breaks the line there, a paste keeps its line breaks (CRLF as LF), and what's saved is exactly what was typed, a key file's final line break included; a value left as it came is never rewritten (a public key with a line break from an import isn't trimmed or rejoined into a change). ⌘C copies the selection through the secret clipboard, which clears with the countdown. Switching type keeps what both types have, but a secure note's body never moves into another type's plain notes, and plain notes moving into a secure note's body are masked. Secrets stay masked; Show reveals the value in place, still secure. New, edit and delete act only over the vault's list and item: not over Settings, the install page, the import view, a file dragged over the window, or from the quick panel (its menus do nothing). While a delete waits on the daemon the selection, the search and the pane hold. ⌘S, ⌘⏎ or ⏎ in a one-line field saves; esc cancels. While a save waits, the form holds: no typing, type switch, generator, cancel or esc, and a password still being generated is dropped; if the saved item's values then fail to come, the form closes anyway. The daemon's refusals land under the field they name ("Expiry must be MM/YY."), others above Save. An edit sends one ItemSet with only what changed: emptied fields are unset, the name only if it changed. After saving, the list shows and selects the item (clearing a search that would hide it). A form with changes keeps the selection (↑↓ or a row click says "Save or cancel your changes first."); an unchanged one gives way. A sync that changes the item mid-edit shows "Changed on another device" with Show theirs, which reloads the form; one that deletes it says so, and saving adds it back. Delete (trash in the head, ⌘⌫, Delete Item…) grows into "Delete “GitHub”?" on a dim red surface (10% red, 30% red border): ⏎ or Delete deletes on every device, esc or Cancel goes back, moving on cancels Custom fields, merging a sync's change into the form
Generate The password field of a new login fills from the daemon's generator (Generate, 24 characters with symbols; at least one lowercase and one uppercase letter, a digit and a symbol), shown in place (revealed, still secure), with a regenerate button and length (16, 20, 24, 32, 64) and symbols controls. Editing a login shows the controls once regenerate is pressed. The CLI's new uses the same command when password= is omitted Words-based passphrases, per-site rules
Devices This device and how many others share the vault, at the sidebar's foot and in Settings (CLI: devices, approve, devices remove) List with presence; Add device (type the new device's code); remove with confirm in place
Import Drop a 1Password .1pux or .csv, an Apple Passwords or browser .csv, or a Bitwarden .json anywhere on the vault, or Choose File… (Import Passwords…, ⇧⌘I, in a vault with items). The daemon previews it: "12 new logins · 3 cards · 2 secure notes" (logins and cards always, other types when there are some), what's already in Deadbolt, and quieter, what's skipped, kept as text or has no place here. Import N items (↵) or Cancel (esc); "Everything in this export is already in personal" with Done when nothing's new. Then "Imported 12 from 1Password" in the copy notice's place, and the rows arrive through watch. A file that isn't an export (dropped, or chosen) is a caution under the drop zone, one that can't be read or a daemon failure is a danger, and the drop zone stays live Import into a vault other than the default; encrypted exports
Lock ⌘L or the lock button, or the daemon locking (idle timeout, sleep, screen lock, CLI); clears our clipboard copy and forgets every value
Security ⇧⌘H, ⌘K › Security, or pressing the risk count in vault-head: swaps into the detail pane (src/health.rs, src/health/view.rs, docs/password-health.md) while the sidebar stays. Category tabs (1–6 + 7 when items are ignored: Risks, Breached, Reused, Weak, 2FA, Passkeys, Ignored), Check breaches (Command::Health { online: true }), and per-finding Fix (↵), Open site (O), and Ignore (I). Sidebar rows show a 6 pt dot only for active risks, never for 2FA/passkey upgrade opportunities; Fix opens the item's form with a site-rule-aware generated password revealed and copied, plus Copy current password (⇧⌘C) and Open <site> (⌘O)
Settings ⌘, or the sidebar's Settings button: a page in the item's place (src/settings.rs), the sidebar staying. Security (Unlock with Touch ID, where there's Touch ID; Clear copied secrets, 10 s to 2 min, for this run; Check for breached passwords via Have I Been Pwned k-anonymity range lookups, off by default, Command::BreachChecksSet), Getting to it (the quick panel's shortcut, the deadbolt command), Devices, 1Password (Sync from 1Password), Activity (Show lists what apps and commands asked the daemon for, src/activity.rs) and Keyboard (every shortcut). ↑↓ or J K move between rows, ↵ or Space change one (←→ step the clear time; ↵ on the shortcut records one, Esc stops, ⌫ clears), Esc leaves Saved clear time
Recently Deleted ⇧⌘⌫, ⌘K's Recently deleted or the trash at the sidebar's foot: a page in the item's place (src/trash.rs), the sidebar staying. The vault's deleted items, newest first, each with its kind and when it went ("Login · Deleted 3 hours ago"; an item deleted before deletes were timed just says Deleted) and its own Restore. ↑↓ or J K move, ↵ or Space open one read-only (its fields as on the item's page, secrets masked, nothing to copy), ⌘R, or ↵ on the open item, restores it on every device, Esc steps back to the list, then out to the search. A restored item leaves the list and the vault's list catches up; a refusal says so above the list. Nothing purges: a deleted item stays until it's restored (CLI: ls --deleted, restore). Deleted items never reach the search, the quick panel or autofill Undo after a delete; purging old items
Actions, shortcuts ⌘K: the selected item's actions (its ⏎, ⇧⏎ and ⌥⏎ copies, Show, Open the site, Edit), then New item, Security, Import, Recently deleted, Settings, Lock and Delete…, each with its key; ↑↓ and ↵, or the key itself, Esc closes (src/palette.rs). ?: every shortcut in two columns, over the page (src/sheet.rs); an empty search takes ? as the sheet, one being typed as text
Errors, empty Can't reach the daemon (with the reason and Try again); an empty vault shows the import drop zone (where 1Password, Apple Passwords and Bitwarden keep their exports, and Choose File…), how to add a login with the CLI and how to add a device; no matches; daemon errors inline Daemon version mismatch help

Keyboard

Search first. The search field has focus while unlocked, and a click on a row gives it back; the keys below work with focus anywhere in the vault, or none. keys::SHORTCUTS is the map the ? sheet and Settings show, and tests/app/keymap.rs checks it.

Key Does
typing filters (every word must match label, username/expiry, type or short id); with the search unfocused, typing (but J, K and O) goes back into it
↑ ↓, J K move the selection (J K while the search isn't focused); the highlight and the page follow on the same frame, held down too
⌘1–9 select the first nine rows (the selected row shows its number)
↵ copy what the item is for: a login's password, a card's number, a note's body, an SSH key's private key, an identity's email (the hint says which, and is gone when the item has no such field)
⇧↵ copy a login's username (hinted only when it has one)
⌥↵ copy the one-time code; past its period, the next one as soon as the daemon sends it, however little of its period is left. Another copy before it lands replaces it
O, ⌘O open the item's website (O while the search isn't focused): a login's URL field or a passkey's relying party, and only as an http or https address; anything else opens nothing and Actions has no Open
⇥ into the item's fields, on the first; ↑↓ move between them, ↵ copies the one you're on, Space shows or hides it, ⇥ or esc goes back to the search
esc clear the search; in a field, an overlay or Settings, back out of it
⌘F focus the search with its text selected (and show a hidden list)
⌘D favorite or unfavorite the selected item (or toggle favorite in an open form)
⌘K the item's actions, plus Filter by tag… when tags exist (see Screens)
? every shortcut
⇧⌘H Security (docs/password-health.md)
⌘, Settings
⇧⌘⌫ Recently Deleted (again closes it); ↵ opens an item, ⌘R restores it
⌘L lock
⇧⌘B, ⌃⌘S hide or show the list (rune-kit's shell; the toolbar's sidebar button does the same)
⇧⌘I Import Passwords… (the File menu's): the import view in the detail pane
↵, esc in an import import what's new (Done when nothing is), or cancel. The search field keeps focus, so it passes them on (App::import_key)
⌘N New Item (the File menu's): the add form. An unchanged open form gives way to it; one with changes stays and says so
⌃⇥, ⌃⇧⇥ in a new item the next or last type
⌘T in a new item open or close the type list
⌘E Edit Item (the File menu's): edit the selected item in place
⌘⌫ ask to delete the selected item (in a search with text, it clears the text first). The menu's Delete Item… has no key equivalent, so ⌘⌫ still deletes words in text fields
⌘S, ⌘⏎, ⏎ in a form save (⏎ only in a one-line field or a public key; in notes, a secure note's body or a private key it's a new line, as are ⇧⏎ and ⌥⏎ there)
esc in a form cancel, even from inside a field
⏎, esc in a delete confirm delete, or go back; any other key cancels it and does its own thing
⌘Q quit (the app menu's; off macOS, closing the main window quits)
⇧⌘Space open the quick panel from anywhere (change it in Settings); while the default can't be registered it still works inside Deadbolt, where in any field it never types a space
↵ on Unlock unlock

Open: ⌘C to copy the password when the search has no selection, as 1Password does?

Motion

Rune's runtime already enforces no first-paint animation, reduced motion (travel off, short fade kept; from the system's setting, or --reduced-motion) and retargeting mid-flight.

Change Who causes it Motion
Locked ↔ vault, any whole-screen change user or daemon whole-state replacement: blur (σ 1.5, text included), scale .96, fade; enter .3/0, exit .24/0, the new screen enters on the frame the old one starts to leave
Typing filters the list, esc clears it dependent on typing instant: the new list replaces the old at once (an edit is instant without animate_edit_layout; esc uses Tx::instant)
Any new selection (search, ↑↓, a click, the selected item deleted or synced away), the selected item's fields user's hand or daemon instant: the title and fields replace in place (↑↓, a row's press and a list that moves the selection use Tx::instant; a click while the import view shows still swaps back), and the fields come with the title: a page read ahead (see Item pages) shows whole, its secrets as dots until its values land in place; with none ready, the page before stays whole for up to HOLD (0.15 s) and acts on nothing, then the title shows alone until the values come. A list that moves the selection drops the rows it removed at once too
The selection highlight user's hand none: one highlight under the rows moves to the selected row on the same frame (an offset with Anim::INSTANT), so a held arrow never leaves it behind
Rows a sync adds or removes, the selection staying daemon rows that stay slide on .4/0 and never blur; rows that leave or arrive fade in place (blur 3, scale .96, .3/0 in, .25/0 out)
A list scrolled under its edge user's hand the edge fades over 24 pt, only while rows are hidden under it (hidden extent / 15 pt); ↑↓ stop the selected row 24 pt from the edge, and the list's own ends stay flush
Copy icon → check user in-place replacement .3/0
Copy notice user rises 12 pt with a fade .3/0; its label (view::copy_line, a rune_kit::RollingText) rolls only the characters that change, entering from the top; a failed copy's message swaps by replacement; leaves the way it came, shorter
One-time code rolls to the next time the digits that change roll in from the bottom (RollingText, tabular figures, so nothing shakes); each period's bar is a new one that wipes in from the leading edge (Transition::reveal, the empty one leaves unseen), then empties on a linear rune::Tween the render thread runs. Reduced motion: the digits crossfade
Countdown time the bar empties on a linear rune::Tween run by the render thread, so it needs no app wakes; the app wakes once a second for the text, and only at the clear while the quick panel is hidden. the label sets tabular figures, so its digits keep one width and nothing shakes
Unlock error daemon fades in
Command offer app rises 12 pt with a fade, like the copy notice; leaves the same way
Install page ↔ vault, its states user whole-state replacement; the page's body swaps by replacement (install → installed); Copy → Copied in place; errors fade in
Item ↔ add or edit form user whole-state replacement, enter .3/0, exit .25/0 (the import view's swap); the form holds after Save until the saved item lands, so the list and detail change once
Delete button → its confirm, and back user the button grows into the dim red confirm (a matched element on .3/0, no bounce) and shrinks back into it on cancel; under Reduce Motion the confirm fades in place (.2/0)
Regenerate user the new password replaces the old by blur replacement
Field problems, the conflict notice, the nudge daemon or user fade in where they show
Hover pointer none: rows, buttons and Settings' rows don't light under the pointer
⌘K, ?, Settings, Recently Deleted, a field ⇥ moved into user at once: the menu and the sheet appear and go without a fade, Settings and Recently Deleted replace the page, and a field's highlight moves with the keys
Import: drop zone ↔ preview ↔ nothing new, item ↔ import view user or daemon whole-state replacement, enter .3/0, exit .25/0 (import::view::swap)
A file dragged over the window pointer the drop zone's outline and fill light at once (Tx::instant), and go out the same way
Import N items → Importing…, Drop an export here → Reading … user the label rolls (RollingText; the button's own Button::rolling, its width springing with the label); errors fade in under the drop zone
Imported notice daemon rises 12 pt with a fade, like the copy notice, and leaves after 2.4 s
Onboarding steps, locked ↔ first run user whole-state replacement of what's inside the page's frame, which stays put (as does Back or Cancel, which fades in and out); progress and its result share one panel
Field hints (strength, repeat, problems) dependent on typing swap in place with a fade; the strength and repeat lines are always there, so typing never moves the fields below
Progress stages daemon the stage's glyph replaces in place (pending dot → breathing dot → check); the breath stops under reduced motion
Vault created or joined daemon the one flourish: the bolt throws from the body into the strike on .3/.3 (overshoots about 1 pt). On contact (.11 s) the strike flashes hot and its glow lights (50 ms attack), then cools: hot → red on .3/0, red → rest on .9/0, the glow decays over 1.1 s, fast then slow. The title replaces; the vault opens at 1.5 s

Quick panel

A Spotlight-style panel for the everyday task: press ⇧⌘Space, type, ⏎ copies the password (⇧⏎ the username, a card's ⏎ its number) and the panel goes away.

  • Shortcut: ⇧⌘Space (Ctrl+Shift+Space off macOS, where the Super chords belong to the desktop). ⌘Space is Spotlight and ⌥⌘Space is the Finder search window on a stock Mac; ⇧⌘Space is free there and is 1Password Quick Access's default, so it's where people already reach. It's registered system-wide on the panel's App (AppHandle::register_shortcut, shortcut::register), so pressing it anywhere toggles the panel (App::toggle_panel); the main window owns the choice (App::hotkey, src/shortcut.rs).
    • Changing it: Settings' Getting to it (⌘,) holds a rune_kit::ShortcutRecorder. A new chord registers before the old one lets go, so a refused chord keeps the old shortcut working, and the recorder keeps it on its keycaps with a red outline and says why under itself in the app's words (ShortcutRecorder::error_message, shortcut::refusal), naming the chord and, when Rune knows, who holds it ("⌥⌘Space is in use by Finder search.", else "… by another app."). Rune refuses a chord without ⌘, ⌃ or ⌥ (Ctrl, Alt or Super off macOS) before on_change ("Add ⌘, ⌃ or ⌥.", "Add Ctrl, Alt or Super."; Shift alone doesn't count), since a bare key would be taken from typing in every app; F1–F24 alone are fine. Backspace while recording clears the shortcut; ↵ on the row records from the keyboard (App::record_key, Esc stops, ⌫ clears, a refusal shows under it); Reset to ⇧⌘Space appears whenever it isn't the default, and a refused Reset says why the same way. The choice is saved in app-shortcut beside the daemon config, written beside it and renamed over it (no file for the default, an empty line for none; a line that doesn't parse, or that Rune would refuse for having no modifier (Shortcut::require_modifier in shortcut::load), falls back to the default). It's the app's own setting, not the daemon's.
    • When it can't be registered (another app has it, or the desktop has no global shortcuts): a notice in the vault's detail pane says which shortcut and why ("⇧⌘Space isn't available", "Spotlight is using it, …"), with Choose another… (opens Settings) and Not now (until the next launch). Settings says the same under the recorder, which keeps showing the shortcut, with Try again; recording the same chord again also tries again (ShortcutRecorderState::mark_unregistered). The holder's name comes from AppHandle::shortcut_owner, asked when a chord is taken (Hotkey::holder): macOS names its own shortcuts (Spotlight, Mission Control, …, or "macOS"), at the user's remapped chords, and another Rune app gives its title; other apps' grabs, and Windows and Linux, go unnamed ("Another app is using it, …"). While the default is the one that failed, ⇧⌘Space still works inside Deadbolt (App::shortcut_fallback, window::is_shortcut, checked in App::on_key, the search field and the passphrase field); a changed shortcut gets no in-app fallback.
  • Menus (macOS): "Open Quick Panel" in the app menu, with the shortcut as its key equivalent, and in the Dock menu (window::menu, on the panel's App; Windows::set_menu follows a change). The standard items (About, Services, Hide, Quit) are Rune's default menu, which set_dock_icon(true) also installs after a --panel start. Windows and Linux have no native menus in Rune (MenuError::Unsupported), so there the main window's key hints keep a clickable "Quick panel" hint (window::entry).
  • Starting: run() queues the start on the main window (App::start_shortcut), which registers the shortcut and sets the menu on the panel's App: Rune attaches every window before any queued update runs.
  • --panel (window::FLAG, Windows::start_with_panel): starts with the panel instead of the main window, with no Dock icon. Once hidden, it stays running for the shortcut; opening the main window (onboarding, the menu) brings the Dock icon and menu back. If the shortcut can't be registered, the main window opens too, since nothing else could bring the panel back. It's kept for scripting and development: headless --window panel runs and tests/app/place.rs use it, and it's the way to try the panel without the main window.
  • Window: a second Rune window (rune::run_windows, key panel) with its own App: its own daemon connection, App::panel set, started hidden. Rune's launcher panel (WindowOptions::launcher_panel): borderless, transparent and non-activating, so it takes keys while the app you were in stays frontmost, the main window stays where it was, it opens on the current Space, and focus goes back to that app when it hides. A --panel start runs without a Dock icon (RunOptions { accessory: true }), since a regular app activates itself at launch; opening the main window from it brings the icon back (AppHandle::set_dock_icon), and the default app menu with it. 680×440 with the card inset 20 pt, placed at each summon centred 160 pt from the top of the display under the pointer (window::PLACE, AppHandle::place; Rune falls back to the primary display if that one has gone).
  • Look: direction C of the design round: the search across the top, the list (250 pt) beside the selected item's fields (panel/item.rs: its icon and name, then each field's name beside its value, secrets masked), and the footer with what ⏎ does and the other keys. ⌘K opens the same actions as the main window's over the card's bottom-right corner; the panel's own keys route to it first, so Esc closes it before the panel.
  • What it reuses: the vault view's search placeholder (view::search_placeholder) in its own flat field (TextInput::plain, 17/24 type, 56 pt, an 18 pt icon, a clear button once something's typed, read-only while the copy confirms), the rows (vault::rows), the passphrase field and unlock error, and the model's filtering, selection and copy-with-countdown. The panel adds only its phases (Open, Copied, Closing, Hidden) and its card. It has no install offer or Settings: it never gets an installer, and App::overlay_key ignores them in the panel, so its keys stay its own.
  • States: connecting; the vault (empty search over every item, the first selected); filtering; no matches; an empty vault; locked, with the passphrase field in place, its error or Touch ID reset notice, and Use Touch ID (auto-prompted on summon when ready, keeping the panel open while the macOS Touch ID sheet takes focus, and dismissing the panel if it is still unfocused when a cancelled or failed Touch ID reply lands); not set up, which points to the main window (⏎ or Open Deadbolt opens it); can't reach the daemon, with Try again.
  • Dismissing: Escape (in the search or the passphrase field too), clicking away (the window losing focus, App::panel_focus), the shortcut again, or a copy: the footer's "Copy password" rolls into "Copied, clears in 0:30" for 1.1 s, then the card fades and the window hides. From the copy on, only Escape and the shortcut act (App::panel_inert): the search lets go of focus and is read-only, so keys, a paste or IME text can't reach it, row clicks do nothing, and the list ignores changes and replies until the next summon fetches it again (a failed copy refetches at once). Both times run from the first frame after the event (poll_panel sets the deadline), because an event after a pause (a click away handled in Runtime::update) arrives before the app's clock catches up. Hiding forgets everything the panel read or was typed (the list, the query, an item's values, a part-typed passphrase) and moves to a new generation: replies still on their way are dropped, and an item's values are wiped when its reply is dropped, read or not (daemon::Values). From the copy on, through closing and hidden, the panel fetches nothing: of the daemon's changes it follows only a lock or the daemon stopping, and list, item and code replies are dropped. Each summon fetches the list again and starts from an empty search and the first item. ⌘L locks only while the panel is open. The copy keeps counting down while hidden (one wake at its end, not every second) and is cleared on time, on lock, or when the app quits.
  • One clipboard: both windows copy through Rune's one secret owner, and each copy keeps its SecretCopy handle. A countdown clears only its own copy at its deadline, and only while the clipboard still holds it (SecretCopy::clear_now). A copy the other window has since replaced ends quietly: its notice leaves without "Clipboard cleared". Lock and quit clear the latest copy, whichever window made it.
  • Footer: what ⏎ does ("Copy password", "Copy number", "Unlock", …), rolling into the copy's line, or replaced by a notice (an item "has no username", a daemon error). ⇧⏎ Username shows only for a login with a username, ⌥⏎ Code only for one with a one-time code. The panel shows no code, so it asks the daemon for one only when the item's values arrive or ⌥⏎ needs the next.

Stand-ins

Adopted at Rune c479f4b: global shortcuts (register_shortcut), rune_kit::ShortcutRecorder and native menus. Gone with them: the shortcut that only worked inside Deadbolt (now only the fallback above), the always-shown "Quick panel" hint on macOS, App::quit_key (the menu's Quit runs first, and Rune installs the default menu after a --panel start), and window::leave_if_stranded (a hidden panel with no main window used to exit once its copy was cleared, since nothing could bring it back; now it waits for the shortcut). Rune's exit also clears a held secret copy (menu Quit, ⌘Q, closing the last window), so the app keeps no clear-at-exit guard of its own. Since 78dcd15, macOS Quit (the menu, ⌘Q, the Dock, logout) runs each shown window's on_close once before the process ends, as closing does: the main window's App::quit clears the copy, the panel's quit it queues never runs, and the panel's own on_close (panel_closed) wipes it without quitting again (tests/app/panel.rs, quitting_from_the_menu_clears_the_copy_once). A --panel run whose main window never opened has no main window hook to run. Resolved at 78dcd15, with their fallbacks gone: the conflict owner (the notice said only "Another app is using it."), the recorder's wording (the app drew the recorder without its error, losing the red outline, and put its own line under it, Hotkey::refused), and headless physical chords that left their modifiers held (the conflict still showed ⌥⌘ held). Resolved at 57986a9, the last of them: the start no longer hops through the panel's queue (every window attaches before any queue drains), shortcut::allowed is gone (Rune refuses chords without a modifier, so F21–F24 now work alone and off macOS the hint names Super too), and the recorder no longer empties itself after a failed start (mark_unregistered). Earlier: focus loss (on_focus), activation (launcher_panel) and placement (AppHandle::place), and their stand-ins (the 30 s idle close, the activating window, the primary-display position).

Off macOS, the main window's "Quick panel" hint (window::entry) stays, as Rune's menus there are Unsupported.

Change Motion
Summon none: the card appears at rest (Tx::settle; a summon during the close lands at rest too). The launcher shows its last frame first, which is empty once the card has faded, so nothing old flashes
Escape, clicking away, after a copy the card fades on .25/0; the window hides at 0.3 s
Typing filters instant, as in the vault
⏎ copies the footer's label rolls into the copy's (view::copy_line, the vault notice's): "Cop" stays, the rest rolls; then only the changing digits roll each second
What ⏎ does changes (Copy password ↔ Copy number, lock, unlock) the label rolls what changes; a notice swaps in by replacement
⇧⏎ Username or ⌥⏎ Code comes or goes fades in place
The list lands after an open at rest, like the open (Tx::instant for the panel's first list)
Screens inside the card whole-state replacement, as in the main window
Reduced motion Rune keeps only the fades: the label's changing characters crossfade in place

Breadboard

The main flows, as states (see the PR for the chat version):

  1. Launch → daemon starting ("Starting Deadbolt…") → locked or first-run.
    • First run → Create → device, vault, passphrase twice → Protecting your passphrase → Creating personal → the bolt throws → empty vault with the CLI guide.
    • First run → Join → device, passphrase twice → Making a pairing code → violin garden tiger lamp zoo + deadbolt approve violin-garden-tiger-lamp-zoo (Copy command) → other device pairs → the bolt throws → synced vault. Cancel or Escape, the other device refusing, a wrong code tried or the code expiring → the join form with a notice; the device stays set up.
  2. Locked: type the passphrase → ↵ → vault, or the error in place.
  3. Vault: type "git" → list narrows → ↵ → "Copied, clears in 0:30" → 30 s → "Clipboard cleared" → notice leaves.
  4. ⌘L → locked; the clipboard copy is gone.
  5. Import: drag 1PasswordExport.1pux over the window → the drop zone lights → drop → Reading … → "Import from 1Password · 214 new logins · 3 cards" → ↵ → Importing… → the rows arrive, "Imported 217 from 1Password". esc instead, or locking at any point, forgets it.
  6. Later: Devices → Add device → type the new device's code → device appears in the list.

Open decisions

  1. Clipboard timeout: 30 s now. 1Password uses 90 s, KeePassXC 10 s. Configurable?
  2. Where unlock lives: decided: the daemon owns locking (unlock_timeout, lock_on_sleep in its config); the app has no timer.
  3. Bundling: decided: ship deadbolt inside Deadbolt.app, with an optional command link on first run.
  4. Window model: decided: the main window plus the quick panel (see Quick panel). A menu-bar item is still open.
  5. Live updates: done: the app follows the daemon's watch stream.
  6. Weak passphrases: the form refuses under 8 characters and only warns about weak ones (a rough estimate that flatters dictionary words). Refuse weak ones too?
  7. ⌘⌫ for Delete Item…: decided: the window handles it and the menu shows no shortcut, so ⌘⌫ still deletes words in text fields.
  8. Sync conflicts mid-edit: decided: a change from another device shows a notice and Show theirs, and saving writes only the fields you changed over it.
  9. Item types in Add: login, card, secure note, SSH key and identity, every built-in type. A secure note's body and a private key are Rune's secure TextArea (masked, line breaks kept).

Rune gaps (for the Rune team)

At ac452a9: adapted to four Rune changes — added Rune's [patch.crates-io] block to the root Cargo.toml (Cargo doesn't inherit [patch] from a git dependency, and rune-text now depends on patched parley_engine); enabled Rune's tooling feature on rune (plus an optional keys-overlay feature for scripts/hold-down.sh) so release builds keep --snap and --list-scenes for snap.sh, bundle.sh and verify-macos-release.sh; switched view::theme::instant() to Transition::none() and added El::instant_changes() to the ⌘K/? overlay wrappers (vault::over and panel::view) so nested keyed cards land opaque on frame 1 now that identity entrances mount directly into Present; and added Tx::animated() to intentional poll-driven animations (daemon replies before apply, onboarding progress/ceremony, copy/import notice exits, installer updates, and the quick panel's post-copy close fade) now that non-input commits default to instant. Also updated deny.toml to allow Apache-2.0 WITH LLVM-exception (for rune-taffy's stacker/psm/ar_archive_writer build dep) and ignore the zbus 5 / accesskit_unix (RUSTSEC-2026-0370..0372) and chrono (RUSTSEC-2026-0543) unmaintained advisories, and bumped url to 2.5.9 for RUSTSEC-2026-0592. Resolved in Rune: OS accessibility via AccessKit on every window and overlay. Stills across dark and light themes render with Rune's updated @opencode/ui field elevation, translucent shadow cutouts, and exact text line boxes; created-contact keeps its mid-crossfade bolt throw. At b1457ab: nothing to adapt, and every still renders the same pixels (text gliding with its pixel-snapped box changes motion only; GPU prewarming and Windows' DX12-only drawing don't touch the app). At 47c9523: nothing to adapt, and every still renders the same pixels (the one breaking change, the browser dev panel's removal, doesn't touch the app; the app's on_key now sees ⌘A/⌘C before selectable text, which it doesn't bind). At 688c0a7: nothing to adapt for the bump itself (the app never assigns TextEdit::text, so replace_text already sets every value). Every still renders the same pixels but the forms and the import error, whose last field now fades into the pane's bottom edge as one layer (stacked paint under a soft clip), without its fill showing through. Adopted there: read-only secure labels for every secret in the item's pane, hidden or shown, retiring the revealed, inert secure text_input (it reported role textbox); tests check Runtime::element_is_secure. Pristine hidden multi-line fields change nothing in the form (see Add / edit). At b679282: nothing to adapt for the bump itself; every still renders the same pixels but edit-ssh, whose shown private key now wraps its long base64 line inside the locked text area (multi-line secure fields wrap anywhere by default). The hover_motion_within and virtual-list gap changes don't occur here. Adopted there: TextArea::secure with revealed, so Add takes secure notes and SSH keys and an edit changes their secrets in place (the locked, read-only text area is gone), and wrap_anywhere for long values in the item's pane and the form's public key. At 5da6b63: nothing to adapt for the bump itself, and every still renders the same pixels (task-list checkboxes in Markdown, the one output change, don't occur here: the app has no Markdown). Adopted there: secure fields' revealed for a form's Show and generated passwords, and TextInput::plain with leading_icon_size for the quick panel's search. At b13f945: nothing to adapt, and every still renders the same pixels (its changes are opt-in: SidebarRow::subtitle_color, PopupList padding and row radius, Markdown link styles; sticky headers and rows entering a reveal don't occur here). At 9bbffd9: nothing to adapt for the bump itself; the stills with item rows change for the rows' new type and nothing else does. Resolved there: two-line SidebarRows set the name medium over a faint caption, and say "Name, Subtitle" to assistive tech (Rune's default styles, no overrides); SidebarRow::select_only with El::preserve_focus_on_press replaces the rows' focusable(false)/focus_selected(false) and their press-down on_drag, which had also kept a scroll from cancelling the press; rune_theme_opencode::ember for the strike's flash; role("textbox") press routing is documented. Not adopted there: TextInput::text_style/height for the quick panel's search (adopted at 5da6b63 with plain). At b700fe8: nothing to adapt for the bump itself; stills match but for anti-aliasing on a rolling countdown digit (copied) and the mid-animation created-contact. Resolved there: TextInput takes a press anywhere on its box without a blur or a window drag (the hand-built search box is gone; the quick panel's header uses the same textbox routing); two-line SidebarRows (the hand-made rows are gone, kept at 46 pt); shell::Page for every screen but the vault (the drag band and the hand-placed Back are gone, and the pages are framed like the vault's pane); rune_theme_opencode::brand for the strike; IconButton::help/shortcut on Lock; ⇧⌘B leaves focus in the search (tests no longer press ⌘F after it). The app has no drag handlers, so Drag::cancelled needs nothing. At 8775a52: nothing to adapt, and every still renders the same pixels. At d2b5243: nothing to adapt for the bump itself (a still caught mid-animation, created-contact, lands about a point further on, as headless runs now poll once a frame). Adopted there, retiring the import's stand-ins: Button::rolling for Import N items → Importing… (the empty-label button with a measured RollingText child is gone); El::on_drop_rejected, so a dropped file that isn't an export gets the caution rather than being ignored (a drag of one lights nothing, so there's no on_drop_rejected_hover); Tx::open_file for Choose File…, answered on a later frame without blocking (a sheet on macOS), so the dialog thread, its Tokio runtime and Done::Chosen are gone. Rune refuses a second dialog, so a Choose File… while one is still up (its import cancelled, or the vault locked) takes that one over (Import::dialog). Tests drive it with Runtime::file_dialog and resolve_file_dialog, and find a RollingText by its text. At 92636a3: nothing to adapt. Adopted there for importing: file drops (El::on_drop_files, accepts_extensions, on_drop_hover; headless Runtime::drag_files/drop_files) and the native-file-dialog feature. A Dock click or reopening the app now brings back a hidden window, which never applies to the quick panel (a launcher). At 7d3b515: buttons use rune_kit::ControlSize (ButtonSize is deprecated). The ones that were 28 or 32 pt are ControlSize::Large, 28 pt with Rune's macOS padding and radius, and the old 24 pt ones are Regular. Return presses only a default button now; every Deadbolt submit is a text field's on_submit, so nothing relied on Return pressing a focused button. Adopted at 57986a9: windows that attach before any queued update runs (the start registers on the panel straight from the main window), Rune's rule for chords without a modifier (shortcut::allowed is gone; a saved chord that breaks it is caught with Shortcut::require_modifier), and ShortcutRecorderState::mark_unregistered for retries. Not needed here: a multi-window headless --snap/--tree run of one window doesn't attach its siblings' shortcut guards, but headless runs register through App::global_shortcut on the panel itself and never start the shortcut from the main window. Adopted at 78dcd15: AppHandle::shortcut_owner (the notice, Settings and the recorder name who holds a taken chord), ShortcutRecorder::error_message with the refused chord kept on the keycaps (refusal is the app's wording; the drawn copy and Hotkey::refused are gone), headless {"physical": …} chords that release their modifiers, and on_close on macOS Quit (see Stand-ins). Text fields take macOS's Control bindings, so Ctrl-K deletes to the end of the line (tests/app/panel.rs types Ctrl-J to check a Control chord types nothing). At c479f4b: adopted global shortcuts (AppHandle::register_shortcut, App::global_shortcut for headless runs), rune_kit::ShortcutRecorder, native app and Dock menu items (MenuItem, AppHandle::set_menu, headless {"menu": …} steps), and the default app menu from set_dock_icon(true) after an accessory start (see Quick panel); blur_replace softens the whole subtree, text included, peaking at σ 1.5 pt instead of the old 4 pt shape-only radius; Linux shortcuts use zbus 6, so Linux builds need Rust 1.89 or newer and deny.toml no longer ignores the three zvariant advisories. Resolved at 58a56a9: secure fields keep out chords and control characters (TextEdit::secure().single_line(), so src/secret.rs is gone) and wipe an exiting field's text as it starts to leave; Tx::copy_secret returns a SecretCopy (whether it still holds, clear_now, a failed write's error), Tx::clear_secret_clipboard clears the newest copy, and rune::clipboard::memory() lets two headless runtimes share one clipboard, so src/clipboard.rs and the direct arboard dependency are gone; RollingText places glyphs at the label's own kerned, fractional advances, so a rolled label sets like plain text (tests/app/panel.rs checks within half a device pixel); and scroll_edge_fade with scroll_margin fade each list edge only over hidden rows and stop a selected row clear of the fade (24 pt). Adopted at 1584fd3: a plain wake polls a launcher, shown or hidden, so the panel's daemon wakes it with the setup waker (the Windows::panel_waker stand-in, an empty AppHandle::update, is gone); a reveal after a change renders the fresh frame first; and headless --scripts take displays and a pointer, so tests/app/place.rs checks which display --panel lands on, its frame, and the fallback to the primary display. Adopted at e501fe1 (the APIs were already at a23bfa5): the quick panel's focus loss (on_focus), non-activating key panel (WindowOptions::launcher_panel) and placement on the screen under the pointer (AppHandle::place). Resolved at a23bfa5: truncate_fade fades over 1.5 em, so text lines use it (the 20 pt clip_fade row wrappers are gone), and a hidden window polls on app wakes (the quick panel still forgets everything as it hides, so nothing read or typed outlives the card). Resolved at 97bbc4f: secure text fields (TextEdit::secure: masked, zeroized on drop, no copy, cut or undo), a linear Tween for the countdown bar, rune_kit::RollingText for the copy label, named font families (Anton), a revived key landing at rest under settle (the per-summon card key is gone), scroll views clipping themselves (the zero-width clip_fades are gone), inherited fades kept on the edges that declared them, OpenType features (tnum), optical sizing, and the system's reduced-motion setting. Resolved at 43ff4f8: Kit::from_palette floors near-black surfaces (pure black gets visible layers, borders and status tints), keeps a warm seed's hue in derived neutrals (the app now uses the derived muted ink) and takes a focus option (the app uses PaletteFocus::Ink); an invalid input tints only its outline, ring and message. At f848cb2: icon paths parse per the SVG grammar and strokes no longer scale twice, so the app uses the built-in EYE and EYE_OFF and every stroked icon is lighter; keyboard symbols come from the macOS system font at cap height, so the hints are plain Keybinds (⏎, since the system font has no ↵); Kit::from_palette steps layers in OKLab, makes borders translucent and resolves elevation rings when painted. Earlier, at 3294968: Kit::from_palette itself, the built-in glyphs, and ttf-parser gone from the Linux tree.

  • Launcher limits left at d2b5243, neither of which matters here. Hidden changes from an earlier turn reveal settled: the panel opens at rest anyway (App::summon settles). The headless viewport doesn't resize to the placed frame: the panel's size is fixed, and place only moves it.
  • Activation, seen headless and on X11. Headless runs drop window requests, so tests can't see AppHandle::activate bring a window forward (tests/app/daemon.rs checks the main window's stream gets it and its state holds). On X11 an open window's activation ignores the forwarded DESKTOP_STARTUP_ID: no _NET_STARTUP_INFO remove message (launchers that showed a busy cursor wait out their timeout) and no _TIME timestamp for focus-stealing prevention. Wanted: a headless record of window requests, and the startup id applied on X11.
  • Window focus events for the main window (to refresh status and the list when it comes forward). At d2b5243 as El::on_window_focus and on_focus; not adopted there yet (the quick panel uses on_focus).
  • Timed sequences on an element. rune-motion has keyframes and Choreography, but El can't take them: the bolt's flash, cool and fade are four app phases, each a wake_after and a view rebuild with new targets and springs. Wanted: keyframed opacity and fill on an element ("hot for 50 ms, then red on .3, then rest on .9").
  • A wipe under reduced motion. Transition::reveal keeps its wipe when motion is reduced (Rune drops only travel), and a view can't read the system's setting to pick a fade instead (Cx::reduced_motion only sets it). The one-time code's 40 pt bar wipes in either way. Wanted: reveal degrading to its fade, or the setting readable in a view.
  • Focus set from state lands a frame late. A handler that moves focus (edit.focused = true) takes effect at the next frame, so keys already queued in the same frame still go to the old field. Rare by hand; tests must run a frame between Enter and typing.

Run, test, snapshot

cargo build -p deadbolt-cli && cargo run --release -p deadbolt-app   # deadbolt-ui in the foreground, against your daemon (starts it if needed)
cargo build -p deadbolt-cli -p deadbolt-app && target/debug/deadbolt app   # as users open it: the deadbolt-ui beside it, detached
cargo build -p deadbolt-cli && target/debug/deadbolt app   # no deadbolt-ui beside it (until it's built): `deadbolt app` says so
cargo test -p deadbolt-cli -p deadbolt-app   # the headless tests run deadbolt-ui; the real-daemon ones the deadbolt cargo built (or DEADBOLT_BIN)
cargo test -p deadbolt-app --test app panel::   # one file of tests/app; each is a module of the one test binary
crates/app/scripts/snap.sh              # headless PNGs of every scene into crates/app/snaps/
crates/app/scripts/hold-down.sh out.mp4 # hold ↓ then ↑ through 243 items, keys drawn
cargo run -p deadbolt-app -- --scene copied --at 2.4 --snap copied.png   # one scene; --theme light, --reduced-motion
cargo run -p deadbolt-app -- --panel                                             # start with the quick panel; hidden, it waits for the shortcut
cargo run -p deadbolt-app -- --window panel --scene filtering --snap panel.png   # a quick panel scene
cargo run -p deadbolt-app -- --window panel --scene empty --script crates/app/scripts/panel-motion.json --frames 240 --trace motion/panel.jsonl   # motion-lint trace: filter, then close
cargo run -p deadbolt-app -- --window panel --scene empty --script crates/app/scripts/panel-copy.json --frames 150 --trace motion/panel-copy.jsonl   # copy (the opening selection's values are loaded; a new one's come from the daemon), then close
cargo run -p deadbolt-app -- --window panel --scene empty --script crates/app/scripts/panel-clickaway.json --frames 150 --trace motion/panel-clickaway.jsonl   # filter, then the window loses focus and the card fades
cargo run -p deadbolt-app -- --window panel --scene empty --script crates/app/scripts/panel-scroll.json --frames 240 --trace motion/panel-scroll.jsonl   # ↓ past the list's bottom edge, then ↑ back
cargo run -p deadbolt-app -- --scene settings --script crates/app/scripts/settings-shortcut.json --snap conflict.png   # record a shortcut another app holds (--at 1.2 for recording)
cargo run -p deadbolt-app -- --window panel --panel --frames 2 --script desktop.json --tree tree.json   # where it's placed: a script with "displays" and "pointer"; prints rune-placed, "placed" in the tree

Scenes (--scene): connecting, failed, locked, locked-error, locked-touch-id, locked-touch-id-reset, vault, search, copied, revealed, note, note-revealed, ssh, ssh-revealed, identity, passkey, card (one of each type selected), the keys: field (⇥ into github.com's password), actions (⌘K), sheet (?), settings-page (⌘, on its second row), trash (⇧⌘⌫ on four deleted items), trash-item (one opened read-only), add and edit: new-login, new-card, new-note, new-ssh, new-identity, edit, edit-ssh (its private key kept), edit-ssh-revealed, edit-invalid, delete-confirm, edit-conflict, empty (with the import drop zone), import: import-hover (an export dragged over the empty vault), import-preview, import-nothing-new, import-error, import (⇧⌘I in a vault with items), and first run: welcome, welcome-set-up, create, create-typing, create-ready, create-invalid, create-failed, creating (created at 1.2 s, the moment, the vault at 2.7 s), join, code, joining (paired at 0.4 s, joined at 0.6 s), join-wrong-code, join-cancelled, join-failed, the command: command-offer, install-command, command-installed, and Settings / the shortcut: settings (Settings open; another app holds ⌥⌘Space), settings-changed (changed to ⌥⌘Space, with Reset), shortcut-conflict (⇧⌘Space taken: the notice), settings-unavailable (the same, in Settings, with Try again), settings-touch-id (Unlock with Touch ID enabled), and vault-243 (243 logins, answered by a stand-in daemon on the app's clock at 30 ms a request, LOOPBACK_COST). Quick panel scenes (--window panel --scene): connecting, empty, filtering, no-match, empty-vault, copied (closes at 1.1 s), locked, locked-error, locked-touch-id, locked-touch-id-reset, not-set-up, failed. They use synthetic data. Any tooling run (--snap, --tree, --trace, --frames, --script, --scene, …) gets no daemon (vault-243's stand-in answers with synthetic items), and Rune keeps headless runs off the clipboard, so its output can't hold real items. It registers no real shortcut (the panel's default is registered only inside the run, for {"shortcut": …} steps) and never reads or writes app-shortcut.

One command

Users only ever type or click deadbolt. From a terminal it's the CLI; deadbolt app, or bare deadbolt from a launcher, opens the app, which is a second program, deadbolt-ui: Deadbolt.app's own executable on macOS, and beside deadbolt in the glibc Linux tarball (install script, npm, Homebrew). deadbolt itself is headless and the same everywhere; the macOS CLI tarballs and npm packages, and the static musl build for Alpine and containers, carry only it, and there deadbolt app says the app isn't installed and how to get it.

  • deadbolt app opens the UI from anywhere, a terminal included. app because that's what it is everywhere else: Deadbolt.app, "the desktop app" in these docs, crates/app.
  • Bare deadbolt (no arguments) opens the UI when it wasn't started from a terminal: none of stdin, stdout and stderr is a TTY, there's a graphical session (always on macOS; WAYLAND_DISPLAY or DISPLAY on Linux), it isn't an SSH session (SSH_CONNECTION), and DEADBOLT_NO_UI is unset, empty or 0. Otherwise, or when the UI can't be found, it prints usage and exits 2, as before. Scripts and agents that call bare deadbolt set DEADBOLT_NO_UI=1 to be sure they never get a window. The rule is app::bare_opens_app in crates/cli/src/app.rs.
  • Which app opens, for the running deadbolt with symlinks resolved (app::find_ui, then app::locate): DEADBOLT_UI_BIN when set; on macOS, the bundle it's the Contents/Helpers/deadbolt of (a bundle outside both Applications folders first gets a link at ~/Applications/Deadbolt.app when neither folder has a Deadbolt, so Launchpad and Finder list it); the deadbolt-ui beside it; on macOS, Deadbolt.app in /Applications, then ~/Applications; then the first deadbolt-ui on PATH. A Deadbolt.app opens with open <bundle>; a macOS release build with no bundle of its own first tries whichever Deadbolt.app Launch Services knows (open -b anomaly.deadbolt). With none of these, it says the app isn't installed and how to get it. A ~/Applications/Deadbolt.app link into node_modules, left by an older npm install (its darwin packages carried Deadbolt.app), is removed once its target is gone, or replaced when opening another bundle.
  • One process each: the app is deadbolt-ui, not inside the deadbolt app that asked for it: that one returns at once and leaves the terminal, and the app gets the main thread and a process of its own, a client of the daemon like any other, while the daemon stays a third process. deadbolt ui [flags] (hidden) replaces itself with deadbolt-ui [flags], found as above, so deadbolt ui --scene vault --snap out.png works too and its exit status is the app's. Deadbolt.app's Contents/MacOS/Deadbolt is deadbolt-ui, signed as the app; the daemon takes a process running it from its bundle for the app, and it has no CLI commands to run. Outside a bundle, macOS has no app identity to give deadbolt-ui, so there it's a caller, as every Linux peer is; the label says deadbolt-ui.
  • Launching: Deadbolt.app goes through open, so a running Deadbolt comes to the front instead of starting again. For a deadbolt-ui outside a bundle, deadbolt app needs a graphical session (WAYLAND_DISPLAY or DISPLAY on Linux) and otherwise says there's none. It first asks the daemon, if one runs, to bring a running app forward (app-activate, with the launcher's XDG_ACTIVATION_TOKEN, else DESKTOP_STARTUP_ID; app::activation_token). The daemon passes it to the main window's stream of the most recently started app as activate and replies activated, and the CLI exits 0. Otherwise (no-app, no daemon, a daemon of another protocol, no answer in 10 s) deadbolt-ui is spawned in its own process group with no stdio, inheriting the token for its first window (Rune takes it from the environment), and the CLI exits 0. Tests put a stand-in deadbolt-ui beside a copy of deadbolt (crates/cli/tests/cli.rs). Opening the app never starts the daemon; the app does.
  • Two launches at once: a no-app reply holds the app's place for 5 s (watchers::STARTING), cleared as soon as an app's main window watches. An app-activate during it waits for that app and activates it, so a double click opens one window. If no app watches by then, the waiting launch is told no-app (taking a new reservation) and starts one itself.
  • Focus: on Wayland the token is what lets the compositor focus the window (Rune activates the open window through xdg_activation_v1); without one it can only ask for attention, which most compositors show as urgent. On X11 Rune focuses the window directly (_NET_ACTIVE_WINDOW), and the window manager's focus-stealing rules decide; the startup id isn't used for an open window (see Rune gaps).
  • Linux launchers: the first time deadbolt app (or bare deadbolt from a launcher) starts the app and there's no entry yet, it writes one as deadbolt desktop install does (desktop::ensure), and says so on stderr; an entry already there, for whichever binary, is left alone. deadbolt desktop install writes ~/.local/share/applications/anomaly.deadbolt.desktop (under $XDG_DATA_HOME when set) with Exec=<this deadbolt> app (for an npm install, npm's own link to it, <prefix>/bin/deadbolt, which stays put when an update moves the platform package; desktop::launcher_program) and StartupNotify=true (GLib launchers, GNOME's included, hand out an activation token only to entries that ask for startup notification), and the red keyhole as icons/hicolor/scalable/apps/anomaly.deadbolt.svg. The UI reports anomaly.deadbolt as its Wayland app id and X11 WM_CLASS (rune::set_app_id), matching StartupWMClass, so its window groups under the entry. Running it again rewrites both (after moving deadbolt, say); deadbolt desktop uninstall removes them. On macOS both say Deadbolt.app is the launcher.

One bundle, one daemon

Deadbolt.app/Contents/
  Info.plist                 anomaly.deadbolt; version from Cargo
  MacOS/Deadbolt             deadbolt-ui, the app, signed as anomaly.deadbolt
  Helpers/deadbolt           the headless deadbolt, signed as the CLI and background daemon
  Helpers/deadbolt-enclave   Secure Enclave Touch ID helper (signed bundle ID anomaly.deadbolt.enclave)
  Resources/Deadbolt.icns    red keyhole, generated headlessly

Two programs from one build, each with its own signature: the daemon tells the app from the CLI by code signature and path. Only deadbolt-ui has Rune, wgpu and the fonts in it; Helpers/deadbolt is the same headless binary as the CLI tarballs'. The CLI uses Apple's Helpers code-signing location: MacOS/Deadbolt and MacOS/deadbolt would collide on a case-insensitive Mac disk. Helpers/deadbolt-enclave is signed by crates/enclave/build.rs before its SHA-256 is embedded in deadbolt and deadbolt-ui (bundle.sh checks both pin what it ships), and is never re-signed by bundle.sh; the app checks it against that pin before trusting what it says about the daemon; Helpers/deadbolt is signed next, then the outer bundle. Fonts are embedded in the app binary. Rune currently has no bundle builder in its scripts or examples.

One rule decides which daemon runs, and the app and the CLI share it (deadbolt_client::ensure_running), so two builds never take turns replacing each other's daemon:

The running daemon's protocol What a client does
the same as its own reuses it, whatever build started it: the bundled helper, Homebrew or Cargo
older stops it cleanly, then starts its own binary
newer fails without stopping it, naming the daemon's program, version and pid, and suggests updating this copy or running deadbolt debug daemon stop

A bundled app always starts its own helper; if that's missing the app says it's damaged and should be reinstalled, rather than falling back to another install. The app's watch reconnection never starts a daemon. deadbolt debug daemon status shows which build is running, and whether it is locked.

In development, a rebuilt daemon of the same protocol isn't picked up while the old one runs. deadbolt debug daemon stop hands over to whichever build runs next; there's no override that replaces a compatible daemon. Tests use DEADBOLT_TEST_VERSION for another build and DEADBOLT_TEST_PROTOCOL for an older or newer daemon (crates/cli/tests/cli.rs, and fake daemons in crates/client); only debug builds read them.

The command offer lives in the vault. Nothing about the command appears before the vault opens: not over onboarding, the locked screen or a failure, and leaving the vault (a lock on sleep, say) closes it. Once the vault shows, a card at the bottom of the detail pane offers Install… when no deadbolt was found, or Repair… when the one found links to a Deadbolt that moved. Not now, or opening the install page, answers it for good: app-command-offered is written beside the daemon config. The same page stays under Settings at the end of the vault's key hints. The page replaces the vault with a Back button and its panel centred, like an onboarding step; Install creates the link, confirms it in place and shows the rm that undoes it. While Settings or the page is open it takes every key first (Escape closes it, Tab moves between its buttons); nothing reaches the search field or the list behind it. Copy buttons turn into "Copied" in place, then back. Headless scenes (command-offer, install-command, command-installed) never read or write the preference or install a real link.

The installer prefers writable ~/.local/bin, /opt/homebrew/bin, then /usr/local/bin directories on the app's PATH. Otherwise it prefers a writable user directory and supplies a copyable export PATH=… command. Finder's PATH may differ from the terminal's; the app doesn't execute shell startup files or change shell profiles. If the chosen directory needs administrator access, it shows an exact, quoted command to copy; it never invokes sudo.

It looks for an existing deadbolt in the same places the app looks for a daemon binary (binary::search_dirs): PATH, then ~/.local/bin, /opt/homebrew/bin, /usr/local/bin and ~/.cargo/bin, which a Finder launch's PATH lacks. Directories that can't be read count as not having one. The scan and the install run off the UI thread. What it finds is this app's link, a link to a moved Deadbolt, Homebrew (a Cellar link), Cargo (.cargo/bin), or another install. A link is ours by its target's shape, <anything>.app/Contents/Helpers/deadbolt, whether or not the target still exists; the installer repoints it at this app (a new link renamed over the old one) or gives the sudo ln -sfh to do so. No other file or symlink, including a dangling one, is replaced: remove the old command through its installer, then Check again. A copy running from a disk image (/Volumes) or under App Translocation refuses to link and says to move Deadbolt to Applications first.

Shipping the app

Build an ad-hoc-signed development bundle on a Mac worker:

hivemind run --kind cargo --fetch .lab-output -- bash crates/app/scripts/bundle.sh
# Universal, after installing aarch64-apple-darwin and x86_64-apple-darwin:
hivemind run --kind cargo --fetch .lab-output -- bash crates/app/scripts/bundle.sh --universal

The script builds deadbolt, deadbolt-ui (and the helper) with --locked, assembles into a temporary directory, generates the icon, signs ad hoc and checks the plist, signature, bundled CLI's --version and the app's headless --list-scenes (through MacOS/Deadbolt) before moving the bundle into .lab-output/Deadbolt.app. An optional final argument selects a fresh output path; an existing output is refused. Native is the default to reuse the build cache; universal builds both Rust targets and combines each executable with lipo. These bundles aren't distribution releases.

npm's darwin packages carry the release's signed, notarized headless deadbolt and deadbolt-enclave (the CLI tarball), not the app (releasing.md); deadbolt app from there opens a Deadbolt.app installed in Applications.

Releases are built by the Release workflow (releasing.md), which runs this script with --universal against a Developer ID-signed Touch ID helper (DEADBOLT_ENCLAVE_PREBUILT), then signs Contents/Helpers/deadbolt and the bundle inside-out with the Developer ID and hardened runtime, notarizes and staples the app, and publishes Deadbolt-<version>-macos-universal.zip (for an updater) and .dmg to the release service's desktop artifact, the GitHub release, and the Homebrew cask (brew install --cask anomalyco/tap/deadbolt). CFBundleVersion is numeric: a dev build's run number, or X.Y.Z as XXYYZZ.

Remaining work:

  • An update offer in the app itself. deadbolt update run from the bundled helper (or the command link to it) already replaces Deadbolt.app from the desktop manifest, requiring crates/app/update-requirement.txt of the new bundle, and restarts the daemon (releasing.md).
  • After installing or updating, point the browser's native messaging host (deadbolt browser install) at /Applications/Deadbolt.app/Contents/Helpers/deadbolt.
  • A Mac download button on deadbolt.pw, from the desktop manifest. Site publishing requires explicit approval.