278 Commits
Author SHA1 Message Date
raucao 3e3d52ad8b Upload the account avatar to Blossom when it fills in for the picture
CI / Test (pull_request) Successful in 1m19s
Release Drafter / Update release notes draft (pull_request) Successful in 2s
When a profile has no usable picture, the account avatar is now cropped and uploaded to the configured Blossom server on save, and the returned URL is written to the profile, instead of publishing the account's own avatar URL. A failed upload fails the save.
2026-11-28 21:23:45 +04:00
raucao a350c52026 Explain the recommended media server list when setting one up
CI / Test (pull_request) Successful in 1m19s
Release Drafter / Update release notes draft (pull_request) Successful in 2s
Show a short hint above the media server list on first-time setup, mirroring the relay list hint.
2026-11-28 15:25:04 +04:00
raucao d288a69d5e Badge every auto-added relay and the auto-added display name
CI / Test (pull_request) Successful in 1m18s
When no relay list exists, all recommended relays are now marked as added, not just the site relay, with a short note explaining the default list. The profile editor likewise marks the display name as added when it is filled in from the account display name.
2026-11-28 15:14:38 +04:00
raucao 70faa4f329 Update the signer section in place instead of reloading the page
Disconnecting, cancelling and (when a key already exists) connecting now swap the Nostr Connect section via Turbo Streams, so the page's relay/profile/media lookups are not re-fetched. A replace still reloads because it changes the key, and a first-time connect reloads to reveal the pubkey and metadata.
2026-11-28 13:42:38 +04:00
raucao af70167ced Move the bunker option into the connect modal
CI / Test (pull_request) Successful in 1m21s
Show the bunker URI field in the remote signer connect modal instead of the settings page, and drop its waiting-for-signer placeholder text to keep the modal compact.
2026-11-28 12:29:24 +04:00
raucao d2d3b1c54d Offer the browser extension and signer app side by side when connecting a key
Replace the hidden 'No browser extension found' alert with a 50:50 two-column chooser on the Nostr settings page: the browser extension option (same copy as the login modal, enabled and swapped in when a NIP-07 extension is detected) next to Nostr Connect.
2026-11-28 12:09:27 +04:00
raucao 46409de526 Collapse the Nostr Connect section when the account has a key
On the Nostr settings page, fold the Nostr Connect section into a closed details/summary, marked with a green dot while a signer is connected. Without a linked key the section stays expanded so connecting stays prominent.
2026-11-28 11:37:49 +04:00
raucao 0364646d48 Show the browser extension login option disabled instead of hidden
CI / Test (pull_request) Successful in 1m51s
When no NIP-07 extension is detected, keep the option visible, greyed out and disabled, and let its description explain why. Drop the private-key line from the modal and say that Nostr login needs a key already linked to the account.
2026-11-27 20:02:37 +04:00
raucao e099d4c589 Polish the Nostr login options copy and spacing
Give each option's description a clearer gap from its title, and describe the Nostr Connect option as using a mobile or desktop signer app like Amber or Regent.
2026-11-27 18:51:47 +04:00
raucao 92b918a6b0 Fix browser extension login after the login chooser refactor
The nostr-login controller still referenced a loginButton target that was dropped when the login options moved into a modal, so connect() and login() raised "Missing target element" and the extension login did nothing. Target the extension option button instead, and cover the wiring with a component spec.
2026-11-27 18:25:24 +04:00
raucao d67e6e90dd Never silently change or orphan the account's Nostr key
Connecting a remote signer while a different account key already exists now asks for explicit confirmation instead of overwriting it, and every key change goes through a single LdapManager::SetNostrKey seam so step-up auth can be added in one place later. Removing the account key also disconnects the remote signer, since a signer session is bound to that key; disconnecting a signer still leaves the key intact.
2026-11-27 16:07:32 +04:00
raucao b57e253b72 Keep Nostr Connect listeners alive only while polling
Stop abandoned listeners after 60s without polling, re-enqueue from status polls with a throttle, and add a Start over action for stuck sessions.
2026-11-27 16:07:32 +04:00
raucao 5655390507 Add the Nostr login chooser modal 2026-11-27 16:07:32 +04:00
raucao b82682f2a6 Hide media server settings when no Blossom server is configured 2026-11-27 16:07:32 +04:00
raucao c43e26e035 Make the profile editor banner shorter on desktop 2026-11-27 16:07:32 +04:00
raucao 605ec24cfd Harden the continue-as reauth flow against stale sessions 2026-11-27 16:07:32 +04:00
raucao dc8c184656 Improve the mobile signer connect experience 2026-11-27 16:07:32 +04:00
raucao c1c02f9725 Add an Open with signer app option to the connect dialogs 2026-11-27 16:07:32 +04:00
raucao b419f9de09 Narrow the profile editor modal and use a responsive banner ratio 2026-11-27 16:07:32 +04:00
raucao a0efd34a69 Match the remote signer login screen to the app's normal typography 2026-11-27 16:07:32 +04:00
raucao 39fd823003 Send app name, URL, and icon in NIP-46 client metadata 2026-11-27 16:07:32 +04:00
raucao 8aa302da03 Give the remembered signer login its own screen 2026-11-27 16:07:32 +04:00
raucao 218267a04a Refine the connected remote signer status layout 2026-11-27 16:07:32 +04:00
raucao 3cb54f971f Fix retry visibility and expiry timing in the remote signer modal 2026-11-27 16:07:32 +04:00
raucao f62a95a1f4 Polish the remote signer connection modal 2026-11-27 16:07:32 +04:00
raucao ddd8d2136d Open remote signer connections in a settings modal 2026-11-27 16:07:32 +04:00
raucao fffd13b814 Fix remote signer QR sizing and expiry UI 2026-11-27 16:07:32 +04:00
raucao b8256ec388 Prevent queue buildup and expire abandoned NIP-46 listeners 2026-11-27 16:07:32 +04:00
raucao f0a06ce5e0 Remember NIP-46 connections automatically 2026-11-27 16:07:32 +04:00
raucao aea75c97ed Add continue-as flow for remembered NIP-46 sessions 2026-11-27 16:07:32 +04:00
raucao f136d8d8b1 Support disconnecting NIP-46 sessions with logout 2026-11-27 16:07:32 +04:00
raucao 0fa9f1d4c7 Add remember tokens and reauth state to Nostr signer records 2026-11-27 16:07:32 +04:00
raucao b873841644 Localize the remote signer connection timestamp 2026-11-27 16:07:32 +04:00
raucao 961e6d8597 Add remote signer connect and login UI 2026-11-27 16:07:32 +04:00
raucao 0f9f18343e Add NIP-46 remote signer services and jobs 2026-11-27 16:07:32 +04:00
raucao fd0f3d5850 Add models for NIP-46 signer sessions and signing requests 2026-11-27 16:07:32 +04:00
raucao 4a28731df9 Add NIP-44 v2 encryption for remote signing 2026-11-27 16:07:32 +04:00
raucao 5c7234e7d4 Purge expired RS authorization codes from a recurring job class
CI / Test (pull_request) Successful in 50s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
The recurring cleanup task used a `command:` string, which Solid Queue evals inside SolidQueue::RecurringJob. It failed in production with `uninitialized constant ...::RsAuthorizationCode` and is only visible in Mission Control as SolidQueue::RecurringJob. Move the cleanup into a regular Active Job class so the task is enqueued as PurgeRsAuthorizationCodesJob on the default queue, appears under its own name, and no longer depends on eval'ing a string.
2026-11-27 16:05:18 +04:00
raucao 97126c0684 Merge pull request 'Resolve relative icon URLs when attaching web app icons' (#273) from fix/app-catalog-relative-icon-url into master
CI / Test (push) Successful in 1m0s
Reviewed-on: #273
2026-11-23 19:10:21 +00:00
raucao 07b7dc9cec Resolve relative icon URLs when attaching web app icons
CI / Test (pull_request) Successful in 1m1s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
AppCatalogManager::UpdateMetadata built remote icon download URLs with
naive string concatenation, so a relative src such as
"./apple-touch-icon.png" produced a URL with a dot segment
(https://host/./apple-touch-icon.png). Servers that do not normalise dot
segments (e.g. 5apps/openresty) answer those with 404, so the icon was
never attached.

Resolve icon URLs against the web app URL with URI.join (RFC 3986), which
collapses dot segments and handles bare and absolute URLs correctly.

Bump manifique to ~> 1.1.1, which fixes the same class of bug for relative
web app manifest URLs ("./manifest.webmanifest"), and add service specs
covering manifest metadata loading and icon URL resolution.
2026-11-23 23:07:48 +04:00
raucao 71bc52e97e Merge pull request 'Nostr profile editor improvements' (#272) from feature/nostr-profile-fields into master
CI / Test (push) Successful in 1m6s
Reviewed-on: #272
2026-11-19 20:16:17 +00:00
raucao be133af6fa Upload avatar and header images from the Nostr profile editor
CI / Test (pull_request) Successful in 49s
Release Drafter / Update release notes draft (pull_request) Successful in 37s
The editor gains edit affordances over the avatar and header image and an upload panel that stores the image (previewing the server-cropped result) and records it as pending. Saving the profile signs a Blossom upload token, flushes the pending images, merges the returned URLs into the kind-0 content, and keeps pending state until the publish succeeds so a retry re-flushes.
2026-11-19 21:58:12 +04:00
raucao ab3c2bffd6 Process and relay Nostr profile images server-side
Add a server-side API for avatar and header images: uploads are cropped with Vips (400x400 and 1500x500, GIFs passed through, EXIF stripped, transparency flattened to white) and stored as one pending attachment per field. Saving the profile flushes them to the configured Blossom server, authorized by a user-signed kind-24242 token whose x tags cover the stored hashes.
2026-11-19 21:58:08 +04:00
raucao 0901e76dee Report and log why a Nostr event is rejected
CI / Test (pull_request) Successful in 48s
The publish endpoint collapsed every validation failure into a generic "Invalid event", making a real-world rejection impossible to diagnose. Return and log the specific reason instead: public key mismatch, non-integer created_at/kind, disallowed kind, invalid id/signature, stale created_at, content/tags too large, or a malformed request.
2026-11-19 19:27:23 +04:00
raucao e2ff905bdb Reuse the account avatar as the Nostr profile picture fallback
When the published profile has no usable `picture` (missing, blank, or not an http(s) URL), the editor previews the account avatar and writes its public URL into the profile on save. An existing valid picture is left untouched.

The component exposes the account avatar URL to the Stimulus controller, which applies it in `content()` only when `picture` is absent or not a URL, so the preview and the published content agree.
2026-11-19 18:50:50 +04:00
raucao 4d2e0aa2b6 Add about and website fields to the Nostr profile editor
CI / Test (pull_request) Successful in 46s
The profile editor only covered display name, NIP-05 and Lightning address. Add the bio (`about`) and `website` fields, read from the existing profile and written back on save (with `website` validated as an http(s) URL).

Lay the form out in a responsive two-column grid (single column on mobile) and align the submit button with the other account settings forms. Also fix the avatar size utility (`size:28` -> `size-28`), which left the avatar unsized on small screens and let it overlap the display-name label.

Avatar and banner image editing is still to come.
2026-11-19 17:49:21 +04:00
raucao 2a19aecf3e Avoid duplicate site entries in Nostr list editors
CI / Test (pull_request) Successful in 45s
Release Drafter / Update release notes draft (pull_request) Successful in 2s
The relay and media server editors compared the configured site URL
against existing event entries with raw string equality, so a trailing
slash or different case made the site entry look missing and it was
prepended again as a duplicate "added" row. Compare with
NostrManagerService.normalize_url instead, matching the status
components and the JS list editor.
2026-11-19 15:48:03 +04:00
raucao c1826a46f4 Handle all kind 0 display-name variants in the Nostr profile editor
CI / Test (pull_request) Successful in 51s
Release Drafter / Update release notes draft (pull_request) Successful in 6s
The editor read only `display_name`/`displayName` and wrote just `display_name` (deleting `displayName`), so profiles using `name` or the deprecated aliases were shown and updated incorrectly.

Read the first present of `display_name`, `displayName`, `name` and `username` (NIP-01/NIP-24 priority) with a fallback to the account display name, and write the edited value to every variant. The key list lives in `NostrManagerService::DISPLAY_NAME_KEYS` and is passed to the Stimulus controller so Ruby and JS stay in sync.
2026-11-19 15:14:29 +04:00
raucao f15d04d1a9 Fix discovery timeouts leaking Timeout::ExitException
FetchEvent wrapped its wait in Timeout.timeout and FetchLatestEvent
wrapped the relay loop in another one. The nesting leaked
Timeout::ExitException, which is neither a Timeout::Error nor a
StandardError, so it escaped the rescue and surfaced as a 500 on the
metadata endpoint.

- FetchEvent waits on the condition variable with a 5s timeout instead
  of Timeout.timeout, and wakes immediately when the relay errors
- FetchLatestEvent uses a monotonic deadline instead of Timeout.timeout,
  and skips a relay that raises, so one bad relay cannot abort discovery
- PublishEvent uses thread.join(TIMEOUT) instead of Timeout.timeout
2026-11-18 23:39:38 +04:00
raucao 2af8efde18 Unify the URL list editors and harden the metadata fetch 2026-11-18 22:19:46 +04:00