Skip to content

feat(app): rebuild Settings as grouped cards with menus, and close with ⌘W from any page - #372

Open
kitlangton wants to merge 2 commits into
devfrom
app-ui-audit
Open

kitlangton wants to merge 2 commits into
devfrom
app-ui-audit

Conversation

@kitlangton

@kitlangton kitlangton commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Settings is now grouped cards with real pop-up menus and a shortcut field that fits its keys, and ⌘W closes the window from every page.
Every setting, its saved value and every existing key still work; ← → still step a choice without opening it. The other screens were already on this visual bar and are unchanged apart from two lines of copy in the ? sheet.

💡 Why
Settings was a flat list: values sat between ← and → arrows, the shortcut recorder was a fixed hollow box with two ghost buttons floating under it, a description that wrapped ran into the row below, and the selected row's highlight swallowed its control. Two headings said nothing ("Getting to it", and a "Keyboard" group holding one "Keyboard" row).

🆕 Now you can

  • Read Settings as five cards: Locking, Privacy, Quick access, Devices, Activity, with the title, headings and row text on one line down the page.
  • Pick a value from a menu: ↵ or Space opens it, ↑ ↓ ↵ choose, Esc closes only the menu.
  • See the quick panel's shortcut in a field exactly as wide as its keys and as tall as the selects, with Try again and Reset beside it as ordinary buttons (T and R still do the same).
  • Click around without a row staying lit behind the pointer. Only the keyboard shows which row it is on, and after a click the first key shows that row before any key changes a setting.
  • Read a hint bar that lists only what the current row accepts ("⏎ Turn off", "⏎ Record", "←→ Adjust" on choices only).
  • Read Recent activity as what was asked, who asked, and when.

❌ Before: ⌘W

  1. Open Settings, Recently Deleted, Security, the install page, the ? sheet or ⌘K's actions.
  2. Press ⌘W.
  3. ❌ Nothing happens. Each of those pages takes every key so none reach the vault behind it, and the window only closes when no page takes the key.

✅ After: ⌘W

  1. Press ⌘W anywhere in the main window: it closes.
  2. With unsaved changes in a form, it stays and asks first, as Esc does there. Before, the window closed and the edit was lost.
  3. While a new vault's 24 recovery words are showing, it stays and says to save them first: they are shown once, and closing the window quits. The close button and the Window menu's Close ask the same.
  4. In the quick panel, which has no title bar, ⌘W hides it as a click outside does. A request it was showing is cancelled, not denied, so the asker can try again.
- ⌘W -> Settings / Trash / Security / ? sheet / ⌘K take every key -> window stays open
+ ⌘W -> left alone before any page sees it -> the Window menu's Close runs
+       (a changed form or unsaved recovery words keep it and ask; the quick panel hides)
- choice row:  "←  8 hours  →"            ↵ and Space step to the next value
+ choice row:  [ 8 hours  ⌄ ] + menu      ↵ and Space open it, ←→ still step

📊 Proof

Before After
A choice's menu, open Light, with a shortcut another app holds

The after shot is taken in a taller window so every card shows; at the default size the page scrolls, as it did before.

⌘W pressed in… Before After
The vault, locked screen, onboarding ✅ closes ✅ closes
Settings, Recently Deleted, Security, install page ❌ nothing ✅ closes
? sheet or ⌘K actions open ❌ nothing ✅ closes
A form with unsaved changes ❌ closes, edit lost ✅ stays and asks
A new vault's recovery words ❌ closes, words lost ✅ stays and says why
The quick panel ❌ nothing ✅ hides

The first four ⌘W tests fail without the change (2 of 4, checked by removing the fix) and pass with it; two more cover the recovery words and a cancelled request. 70 unit and 284 integration tests pass, 1 ignored (it needs a real display).

👀 Read: crates/app/src/shortcut/recorder.rs. It is a port of the UI kit's shortcut-recorder state, kept here because the kit's control can only be drawn as a fixed-width 32-point box, which is the hollow box this removes; the right home for it is a "fit to keys" option in the kit. Then close_key in keys.rs, the whole of the ⌘W fix. The rest is routine.

🔍 From a review of the app's screens and two annotated screenshots · ⌘W seen in real use · three things deliberately left out: (1) the Rune pin is not bumped (127 commits behind), so the before and after shots compare on the same toolkit; (2) after deadbolt import --by-vault the daemon does announce the import and the app does re-read its list, but the app only ever lists the default vault, so items imported into other vaults never appear: that needs a vault switcher, not a refresh fix; (3) the empty vault's sidebar still repeats the main pane's "empty" message.

Checks run
  • cargo fmt --all -- --check: clean
  • cargo clippy -p deadbolt-app --all-targets -- -D warnings: clean
  • cargo test -p deadbolt-app: 70 unit passed; 284 integration passed, 0 failed, 1 ignored
  • bash scripts/file-size.sh: passes; files over 800 lines 21 → 20 (settings.rs 1,047 → under 800), warnings 28 → 27
  • sh crates/app/scripts/snap.sh: 174 stills rendered, exit 0; Settings, the ? sheet, the quick panel, the empty vault and Recently Deleted compared by eye against the 166 taken before

…th ⌘W from any page

Settings was a flat list whose values sat between ← and → arrows, whose
shortcut recorder was a fixed hollow box, and whose second-line
descriptions ran into the row below.

- Rows sit in titled cards (Locking, Privacy, Quick access, Devices,
  Activity) on one text line down the page. "Security", "Getting to it"
  and the Keyboard row are gone; ? still opens the sheet.
- A choice is a field with a menu: ↵ or Space opens it, ←→ still step it
  closed. The shortcut recorder is a field as wide as its keys and as
  tall as the selects, drawn here over a port of the kit's recorder
  state; Try again and Reset sit beside it as ordinary buttons.
- Only the keys draw the row they're on. A press lights nothing, and the
  next key shows where the keys are before any key changes a setting.
- The hint bar says what the row under the keys takes, and nothing else.
- Recent activity lists what was asked over who asked, with when at the
  end of the row.

⌘W is the Window menu's Close, which runs once no key handler takes the
key. Settings, Recently Deleted, Security, the install page, the ? sheet
and ⌘K's actions each took every key, so the window stayed open there.
The key is now left alone before any of them sees it; a changed form
keeps it and asks first, and the quick panel, which has no title bar,
closes as Esc closes it.
…on unsaved recovery words

- A choice's menu is confined to the page's scroll, so it no longer hangs
  over the hint bar; the wheel over the page closes it, and a press that
  chooses or closes leaves no row lit.
- The window's close (⌘W, the close button, the Window menu) keeps a new
  vault's recovery words on screen and says why, as a changed form does.
- ⌘W on the quick panel cancels an Ask it shows instead of denying it.
- A menu whose row the daemon's status took away closes with it.
- ↵ on the shortcut row focuses the recorder, and any end of a capture
  gives the keys back to the row.
- "Choose another…" and Recent activity scroll to what they open, durations
  keep the unit that says them exactly, the hint bar fades instead of
  clipping, and T and R show the row first after a press.

This branch has not been deployed

No deployments
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