Use bare app name for NIP-46 in production builds #124

Merged
raucao merged 1 commits from chore/nostr_app_identity into master 2026-11-23 19:50:57 +00:00
Owner

Remote signers such as Amber truncate the client name in their saved-session list, and the space in Marco (host) is rendered as a literal + there. Production builds now introduce themselves as just Marco. The host suffix is kept for non-production builds, where distinguishing dev and self-hosted instances is useful.

The canonical url and the icon are still derived from the origin in both modes, so a session stays identifiable on the signer's approval screen.

buildNostrAppMetadata() reads import.meta.env.PROD (the same build flag app/config/environment.js already uses) and takes an optional { production } argument so both branches are covered by unit tests.

Tests: pnpm test (469 passing) and prettier/eslint on the changed files.

Remote signers such as Amber truncate the client name in their saved-session list, and the space in `Marco (host)` is rendered as a literal `+` there. Production builds now introduce themselves as just `Marco`. The host suffix is kept for non-production builds, where distinguishing dev and self-hosted instances is useful. The canonical `url` and the icon are still derived from the origin in both modes, so a session stays identifiable on the signer's approval screen. `buildNostrAppMetadata()` reads `import.meta.env.PROD` (the same build flag `app/config/environment.js` already uses) and takes an optional `{ production }` argument so both branches are covered by unit tests. Tests: `pnpm test` (469 passing) and prettier/eslint on the changed files.
raucao added 1 commit 2026-11-23 19:40:29 +00:00
Use bare app name for NIP-46 in production builds
CI / Lint (pull_request) Successful in 53s
CI / Test (pull_request) Successful in 1m12s
Release Drafter / Update release notes draft (pull_request) Successful in 15s
6c3715ffff
Remote signers truncate the app name in their connection list, and Amber turns the space in "Marco (host)" into a literal plus sign. Keep the host suffix only outside of production builds, where distinguishing dev and self-hosted instances is useful.
raucao added the enhancementnostr labels 2026-11-23 19:41:41 +00:00
raucao merged commit 0471a06be6 into master 2026-11-23 19:50:57 +00:00
raucao deleted branch chore/nostr_app_identity 2026-11-23 19:50:57 +00:00
Sign in to join this conversation.