Commit Graph
10 Commits
Author SHA1 Message Date
raucao fca9851d8f Go back to the alert-style add/import dialogs, in a taller window
The plain `AdwDialog`s with the accept button in the header bar are not
wanted; restore the `AdwAlertDialog` versions of "Create an identity key" and
"Import an identity key".

The clipping they were meant to fix was the window height, not the dialog
style: the identities window is a fixed size and GTK never resizes a mapped
window, so its default has to fit the first-run empty state and the dialogs.
Keep the taller window (420x560); the width goes back to the original 420.

Reverts most of the previous commit.
2026-11-28 15:18:58 +04:00
raucao ab09201a2e Fit the identities window and its add/import dialogs
The identities window is a fixed size and GTK never resizes a mapped window,
so its default has to fit the first-run empty state. At 420x480 it did not:
the `AdwStatusPage` overflowed (its buttons were cut off), and so did the
"Create an identity key" / "Import an identity key" dialogs, which are
presented as overlays inside the same window.

- Size the window 480x560. 480 wide also drops the empty state's description
  from four lines to three.
- Rebuild create/import as plain `AdwDialog`s in the "Connect an app" shape: a
  header bar with Cancel and the accept button over a scrolling body. An
  `AdwAlertDialog`'s message area only *propagates* its natural height
  (`adw-alert-dialog.c`), so a form taller than the window grows past it and is
  clipped instead of scrolling. The new dialog's body scrolls and its buttons
  stay pinned.
- Keep the dialog open when creating/importing fails, so a passphrase mismatch
  can be corrected (the old alert closed before reporting the error).

Rename/export/remove stay `AdwAlertDialog`s: they are single-field or one-line
and fit.
2026-11-28 15:01:12 +04:00
raucao 2299966237 Give the identities window a sensible fixed height
640 was taller than the list ever needs, leaving a lot of dead space, and the
size is fixed besides — GTK never resizes a mapped window, so the window takes
whatever it had when it was first shown. 480 fits the empty state and a handful
of keys better; the page's own scroller handles a longer list.
2026-11-26 18:06:29 +04:00
raucao e2785afa37 Widen the approval dialog and narrow the rest
The approval dialog set AdwDialog:content-width, which an AdwAlertDialog
ignores — it uses internal breakpoints, and a breakpoint-using AdwDialog has
no minimum size, so the dialog rendered 300px wide however large the request.
Pin it with a width-request instead (plain::alert_width), which the dialog
honours exactly.

With that working, drop the shared dialog width from 560 to 480 and shrink
the main window to 560x740 so both dialogs sit comfortably inside it.
2026-11-26 12:12:32 +04:00
raucao 13a7f74c48 Widen the main window and put the switcher, lock and menu in place 2026-11-24 20:58:38 +04:00
raucao fa744e23f6 Add M10: identities in their own window, Preferences, first-run mode 2026-11-24 16:30:12 +04:00
raucao 3c196afa0c Remove the signer page's state banner 2026-11-24 15:44:16 +04:00
raucao 2bbb6c4259 Add the NIP-46 responder and a signer page
The responder subscribes to kind:24133 events p-tagged to the device key,
decrypts (NIP-44, falling back to NIP-04), parses the request envelope by hand,
and answers NIP-44 encrypted, signed with the device key while events are signed
with the identity key.

The window is now a view switcher with a keys page and a signer page showing the
bunker:// connection string and its QR code. Every request is still answered
without asking; the UI banner says so until M4.

Adds build-aux/acceptance.sh, which covers the keyring round-trip, a nak
loopback against the responder, and the app starting the signer end to end.
2026-11-13 15:10:37 +04:00
raucao f8249c89a1 Add key storage and a keys page
KeyStore keeps one Secret Service item per key: the identity key (the nsec,
used only for signing) and a generated device key used for NIP-46 transport,
so the transport key can be rotated without touching the identity.

Includes NIP-49 export/import, zeroizing of in-memory copies, the tokio/main-loop
bridge that the relay work will reuse, and an ignored test that round-trips
everything against a real Secret Service.
2026-11-13 14:47:59 +04:00
raucao c864abc5cd Add application skeleton
Window, GSettings-backed config, Blueprint UI in a GResource, and the
packaging metadata (desktop entry, AppStream metainfo, schema, icons).

Built with gtk4-rs and libadwaita against the host toolchain; Meson drives
cargo and installs the GResource under $datadir/org.kosmos.raucao.Regent.
2026-11-13 14:22:57 +04:00