Document the multi-identity UI in AGENTS.md
This commit is contained in:
1 file changed
+30
-3
@@ -34,6 +34,7 @@ src/signer/policy.rs the auto-approval rate limit
|
||||
src/store/apps.rs the registry of approved applications + their permissions
|
||||
src/store/audit.rs the activity log (metadata only, mode 0600)
|
||||
src/store/keys.rs identity + device keys; listing without reading secrets
|
||||
src/store/profiles.rs cached kind-0 display names (read-only)
|
||||
src/ui/approval.rs approval dialogs
|
||||
src/ui/apps_view.rs the apps page (permission table + revoke)
|
||||
src/ui/activity_view.rs the activity page
|
||||
@@ -41,6 +42,7 @@ src/ui/kind.rs human names for the common event kinds
|
||||
src/ui/plain.rs plain-text rows/banners/dialogs (markup off)
|
||||
src/ui/keys_view.rs the keys page (identity list + management)
|
||||
src/ui/signer_view.rs the signer page (pairing string, QR, state)
|
||||
src/ui/switcher.rs the header identity switcher
|
||||
src/ui/qr.rs QR → GdkTexture
|
||||
data/ desktop, metainfo, gschema, icons, resources (ui/*.blp, style.css)
|
||||
```
|
||||
@@ -135,9 +137,9 @@ data/ desktop, metainfo, gschema, icons, resources (ui/*.blp, sty
|
||||
|
||||
- **The invariant:** the responder resolves a request **only** from the app's
|
||||
stored identity (`App.identity`). The UI's *current identity*
|
||||
(GSettings `current-identity`) is never read at request time — it only scopes
|
||||
pages (M7b) and sets the **default for new pairings**. Switching it therefore
|
||||
never re-identifies an existing app.
|
||||
(GSettings `current-identity`) is never read at request time — it scopes the
|
||||
Apps and Activity pages and sets the **default for new pairings**. Switching
|
||||
it therefore never re-identifies an existing app.
|
||||
- Each approved app is bound to one identity at pairing. NIP-46 clients mint a
|
||||
client keypair per connection, so the same app can be paired under two
|
||||
identities in parallel (two client pubkeys → two registry entries). A client
|
||||
@@ -167,6 +169,31 @@ data/ desktop, metainfo, gschema, icons, resources (ui/*.blp, sty
|
||||
current identity). Serving resolves per app, so headless needs no single
|
||||
"active" key.
|
||||
|
||||
### The multi-identity UI (M7b)
|
||||
|
||||
- **Header identity switcher** (`ui/switcher.rs`, Fractal's account-switcher
|
||||
pattern): a `GtkMenuButton` showing the current identity's initials avatar,
|
||||
opening a popover with one row per key (avatar, `display_name` or key label,
|
||||
short npub, a check on the current), then "Manage identities…" (jumps to Keys).
|
||||
Hidden on the **Keys** page and when there are no keys; rebuilds on key and
|
||||
selection changes.
|
||||
- **Pages are scoped to the selected identity:** Apps lists only that identity's
|
||||
approvals (the title names it) and its "Forget all" is scoped; Activity filters
|
||||
to the identity and "Clear this identity's activity" keeps the rest. Pre-M7
|
||||
audit rows (no identity) show under every scope.
|
||||
- Signer page: a "New connections" row names the identity a pairing will use.
|
||||
- **Profiles** (`store/profiles.rs`): kind-0 is fetched best-effort from the
|
||||
configured relays and cached in `profiles.json` (0600). Only `display_name` is
|
||||
shown — never nip05 as verified, since kind-0 is attacker-publishable. Avatars
|
||||
are initials only (no image downloads). The fetch uses a fresh **ephemeral**
|
||||
client, never the device/identity key, so a relay cannot link an identity to
|
||||
this signer. Our relays are NIP-46 relays, so "no profile" is normal.
|
||||
- `AppState::identity_label` is the single display rule: profile `display_name`
|
||||
first, else the user's key label.
|
||||
- Adding a key never switches the selection. A key refresh never clobbers a pick
|
||||
made while it was in flight (the live selection wins over the settings
|
||||
snapshot), and the post-pairing "Client paired" dialog names the identity used.
|
||||
|
||||
## Headless mode and CLI pairing (M6)
|
||||
|
||||
- `regent --headless` runs the signer with **no window** (and no display): it is
|
||||
|
||||
Reference in new issue
Block a user