ui: show the identity name in the approval dialog #14

Merged
raucao merged 1 commits from fix/approval-identity-name into main 2026-12-01 13:20:24 +00:00
Owner

The bug

An identity whose profile carries a display_name showed that name in the switcher, the Apps page and the Connect dialog, but the approval prompt said Identity key.

Why

The approval dialog's "Signing as" read SigningKey.name, which comes from the signer-side SignerConfig.names map — populated only from the vault label (UNNAMED = "Identity key" when the user typed nothing). Every other surface uses AppState::identity_label, which prefers the fetched profile name, so the two disagreed whenever a profile name existed.

The fix

Resolve the name through AppState::identity_label in the dialog. With nothing else reading it, drop the duplicate source of truth: SigningKey keeps only the public key, and SignerConfig.names plus its plumbing in runner.rs and headless.rs is gone. AppState::names() stays — the switcher and the identities/Apps/Activity views still enumerate keys with it.

Verification

  • cargo test --locked — 175 passed
  • cargo clippy --all-targets --locked -- -D warnings — clean
  • cargo deny check — ok
## The bug An identity whose profile carries a `display_name` showed that name in the switcher, the Apps page and the Connect dialog, but the approval prompt said `Identity key`. ## Why The approval dialog's "Signing as" read `SigningKey.name`, which comes from the signer-side `SignerConfig.names` map — populated only from the vault label (`UNNAMED` = "Identity key" when the user typed nothing). Every other surface uses `AppState::identity_label`, which prefers the fetched profile name, so the two disagreed whenever a profile name existed. ## The fix Resolve the name through `AppState::identity_label` in the dialog. With nothing else reading it, drop the duplicate source of truth: `SigningKey` keeps only the public key, and `SignerConfig.names` plus its plumbing in `runner.rs` and `headless.rs` is gone. `AppState::names()` stays — the switcher and the identities/Apps/Activity views still enumerate keys with it. ## Verification - `cargo test --locked` — 175 passed - `cargo clippy --all-targets --locked -- -D warnings` — clean - `cargo deny check` — ok
raucao added 1 commit 2026-12-01 13:18:31 +00:00
ui: show the identity name in the approval dialog
CI / test (push) Successful in 49s
CI / test (pull_request) Successful in 49s
9eb94e5d6e
The approval dialog's "Signing as" read the key's vault label directly, so an
identity whose profile carries a `display_name` appeared under that name in the
switcher, the Apps page and the Connect dialog — but as `Identity key` in the
approval prompt. The label was resolved on the signer side (SignerConfig.names),
where the fetched profile is not available.

Resolve it through `AppState::identity_label` — the single display rule (profile
`display_name` first, else the vault label) — so every surface agrees. With the
dialog no longer reading it, drop the second source of truth: `SigningKey` keeps
only the public key, and `SignerConfig.names` plus its plumbing in the runner
and headless is gone.
raucao added the bugui/ux labels 2026-12-01 13:20:21 +00:00
raucao merged commit fd4a043423 into main 2026-12-01 13:20:24 +00:00
Sign in to join this conversation.