feat(nip46): activity feed + account clarity on the signer screen (Tier 2)

Give the user visibility into what the signer is doing:

- Nip46ActivityLog: a bounded, newest-first, in-memory feed of serviced
  requests (method + kind + client + ok/denied), fed from the service's
  onServiced hook (enriched to pass the full BunkerRequest so the event kind
  is available). Survives service restarts; not persisted (it's a live feed).
- The signer screen shows a "Recent activity" card (last 8, friendly labels
  like "Signed an event (kind 1)", green/red status dot, relative time) and a
  "Signing as npub1…" line so it's clear which account is the bunker.

onServiced now hands callers the BunkerRequest instead of just the method
string (CLI updated to match).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015FHr2mu5SiHwYNR7evYUuF
This commit is contained in:
Claude
2026-07-17 15:18:28 +00:00
parent 4676d176ec
commit f9d9691017
6 changed files with 197 additions and 7 deletions
@@ -203,9 +203,9 @@ object BunkerCommand {
transportSigner = ctx.signer,
processor = processor,
relays = relays,
onServiced = { method, client, error ->
onServiced = { request, client, error ->
val outcome = if (error != null) "error: $error" else "ok"
System.err.println("[bunker] $method from ${client.take(8)}… → $outcome")
System.err.println("[bunker] ${request.method} from ${client.take(8)}… → $outcome")
},
)