Extend relay filter chunking to route #p tags to inbox/read relays,
matching the existing outbox/write routing for authors. Remove debug
console.log statements across the codebase while preserving error-level
logging. Delete unused logger utility. Expand test coverage for all
chunking scenarios.
Uncomment kind 10051 in kinds registry with NIP-EE attribution and add
it to the relay list editor so users can manage MLS KeyPackage relays.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spellbook URLs only queried hardcoded aggregator relays, missing events
published to other relays. Now fetches the author's kind:10002 relay list
and includes their outbox relays when loading kind:30777 spellbook events.
Extract useUserRelays hook from inline pattern and refactor
useRepositoryRelays to use it.
* feat: add Educational Resource (kind 30142) with AMB metadata support
- Add feed and detail renderers for AMB Educational Resource events
- Add amb-helpers library with cached helper functions and tests
- Handle broken thumbnail images with BookOpen placeholder fallback
- Surface primary resource URL prominently in both renderers (bookmark-style)
- Register kind 30142 with GraduationCap icon in kind registry
- Link NIP-AMB badge to community NIP event (kind 30817)
* fix: address PR #260 review comments for Educational Resource renderers
- Rename Kind30142*Renderer to EducationalResource*Renderer (human-friendly names)
- Localize language names with Intl.DisplayNames via shared locale-utils
- Use ExternalLink component for license and reference URLs
- Localize ISO dates with formatISODate, fixing UTC timezone shift bug
- Remove # prefix from keyword labels in both feed and detail renderers
- Remove image/thumbnail from feed renderer
- Extract getBrowserLanguage to shared locale-utils, reuse in amb-helpers
* fix: mock getBrowserLanguage in tests for Node < 21 compat
Tests were directly mutating navigator.language which doesn't exist
as a global in Node < 21, causing ReferenceError in CI.
* feat: centralize publish flow with RxJS-based PublishService
Create a unified PublishService that:
- Provides consistent relay selection (outbox + state + hints + fallbacks)
- Emits RxJS observables for per-relay status updates
- Handles EventStore integration automatically
- Supports both fire-and-forget and observable-based publishing
Refactor all publish locations to use the centralized service:
- hub.ts: Use PublishService for ActionRunner publish
- delete-event.ts: Use PublishService (fixes missing eventStore.add)
- publish-spell.ts: Use PublishService with relay hint support
- PostViewer.tsx: Use publishWithUpdates() for per-relay UI tracking
This lays the groundwork for the event log feature by providing
observable hooks into all publish operations.
* feat: add LOG command for relay event introspection
Add an ephemeral event log system that tracks relay operations:
- EventLogService (src/services/event-log.ts):
- Subscribes to PublishService for PUBLISH events with per-relay status
- Monitors relay pool for CONNECT/DISCONNECT events
- Tracks AUTH challenges and results
- Captures NOTICE messages from relays
- Uses RxJS BehaviorSubject for reactive updates
- Circular buffer with configurable max entries (default 500)
- useEventLog hook (src/hooks/useEventLog.ts):
- React hook for filtering and accessing log entries
- Filter by type, relay, or limit
- Retry failed relays directly from the hook
- EventLogViewer component (src/components/EventLogViewer.tsx):
- Tab-based filtering (All/Publish/Connect/Auth/Notice)
- Expandable PUBLISH entries showing per-relay status
- Click to retry failed relays
- Auto-scroll to new entries (pause on scroll)
- Clear log button
- LOG command accessible via Cmd+K palette
* fix: prevent duplicate log entries and check relay OK response
- EventLogService: Check for existing entry before creating new one
when handling publish events (prevents duplicates from start/complete)
- PublishService: Check response.ok from pool.publish() to detect
relay rejections instead of assuming success on resolve
- Update test mock to return proper publish response format
* feat: keep relay selection in call site, compact logs
* chore: cleanup
* fix: make Timestamp component locale-aware via formatTimestamp
Timestamp was hardcoded to "es" locale. Now uses formatTimestamp()
from useLocale.ts for consistent locale-aware time formatting.
Added Timestamp to CLAUDE.md shared components documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: improve event-log reliability, add ERROR type and per-relay timing
Service improvements:
- Fix notice$ duplicate logging with per-relay dedup tracking
- Remove dead Array.isArray code path (notice$ emits strings)
- Increase relay poll interval from 1s to 5s
- Clean publishIdToEntryId map on terminal state, not just overflow
- Immutable entry updates (spread instead of in-place mutation)
- Extract NewEntry<T>/AddEntryInput helper types for clean addEntry signature
- Clear lastNoticePerRelay on log clear
New capabilities:
- ERROR log type: subscribes to relay.error$ for connection failure reasons
- RelayStatusEntry with updatedAt timestamp for per-relay response timing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: improve EventLogViewer with virtualization, timing, and error display
- Virtualize log list with react-virtuoso for 500-entry buffer performance
- Add ErrorEntry renderer for new ERROR log type (AlertTriangle icon)
- Show per-relay response time (e.g. "142ms", "2.3s") in publish details
- Make all entry types expandable (connect/disconnect now have details)
- Show absolute timestamp in all expanded detail views
- Group ERROR events under Connect tab filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: prevent duplicate PUBLISH log entries from completion event
PublishService emits publish$ twice: once at start, once on completion.
The eager publishIdToEntryId cleanup in handleStatusUpdate fired before
the completion emission, causing handlePublishEvent to create a second
entry. Removed eager cleanup — overflow eviction is sufficient.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Removes ~45 lines of identical relay resolution boilerplate duplicated
across 6 renderers (Issue, Patch, PR - feed and detail views).
The hook encapsulates the 3-tier fallback: repo relays → owner outbox →
aggregators, and also returns the repository event needed for
getValidStatusAuthors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(editor): replace DOM manipulation with React node views and floating-ui
- Convert all inline node views (emoji, blob attachment, event preview) from
imperative document.createElement() to React components via ReactNodeViewRenderer
- Replace tippy.js with @floating-ui/react-dom for suggestion popup positioning
- Create useSuggestionRenderer hook bridging Tiptap suggestion callbacks to React state
- Extract shared EmojiMention, SubmitShortcut, and inline node extensions to separate files
- Extract types (EmojiTag, BlobAttachment, SerializedContent) to editor/types.ts
- Extract serialization logic to editor/utils/serialize.ts
- Remove redundant DOM keydown listener from RichEditor (handled by SubmitShortcut extension)
- Remove tippy.js dependency (-1045 lines net, RichEditor 632→297, MentionEditor 1038→354)
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* fix(editor): fix suggestion popover positioning, scrolling, and profile click behavior
- Replace UserName component in ProfileSuggestionList with plain text display
so clicking a suggestion autocompletes instead of opening their profile
(UserName has an onClick that calls addWindow and stopPropagation)
- Add react-virtuoso to ProfileSuggestionList for efficient lazy rendering
of up to 20 search results with fixed item height scrolling
- Add profile avatars with lazy loading and initial-letter fallback
- Fix SuggestionPopover positioning with autoUpdate for scroll/resize tracking
- Add size middleware to constrain popover max-height to available viewport space
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* refactor(editor): convert emoji suggestion from grid to scrollable list with Virtuoso
Replace the 8-column grid layout with a vertical list matching the profile
suggestion style — each row shows the emoji preview alongside its :shortcode:
name. Uses react-virtuoso with fixedItemHeight for lazy rendering and smooth
keyboard-driven scrolling through large emoji sets.
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* fix(editor): set mentionSuggestionChar to ':' for emoji nodes
When backspacing over a mention-based node, Tiptap inserts the node's
mentionSuggestionChar attribute as undo text. The EmojiMention extension
inherits Mention's default of '@', so deleting an emoji left '@' instead
of ':'. Fix by explicitly setting mentionSuggestionChar: ':' in the emoji
command's attrs for both RichEditor and MentionEditor.
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* test(editor): add comprehensive test suite for custom TipTap extensions
Tests all 8 custom extensions using headless TipTap Editor instances in
jsdom environment (TipTap has no official testing package):
- EmojiMention: schema, renderText (unicode vs custom), mentionSuggestionChar
attribute handling, backspace behavior regression test
- BlobAttachmentRichNode/InlineNode: schema (block vs inline), attributes,
renderText URL serialization, parseHTML selectors
- NostrEventPreviewRichNode/InlineNode: schema, renderText encoding for
note/nevent/naddr back to nostr: URIs
- SubmitShortcut: Mod-Enter always submits, Enter behavior with
enterSubmits flag
- FilePasteHandler: media type filtering (image/video/audio), non-media
rejection, mixed paste filtering, edge cases (no files, no callback)
- NostrPasteHandler: bech32 regex matching (npub/note/nevent/naddr/nprofile),
nostr: prefix handling, URL exclusion, node creation (mention vs preview),
surrounding text preservation, multiple entities
- Serialization: formatBlobSize, serializeRichContent (emoji tag extraction,
blob dedup, address refs), serializeInlineContent (mention→nostr: URI,
emoji→shortcode, blob→URL, event preview encoding)
90 new tests total.
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* fix(editor): paste handler and serialization bugs found via adversarial testing
NostrPasteHandler fixes:
- Punctuation after bech32 now matches (npub1..., npub1...! etc.)
Changed trailing lookahead from (?=$|\s) to (?=$|\s|[.,!?;:)\]}>])
- Fixed double-space between entities — unconditional " " after every
entity caused doubled spaces. Now only adds trailing space when entity
is at the very end of pasted text (for cursor positioning).
- Tightened regex character class from [\w] to [a-z0-9] to match actual
bech32 charset (rejects uppercase, underscore)
- Wrapped dispatch in try/catch to handle block-node-at-inline-position
errors gracefully (falls back to default paste)
Serialization fix:
- serializeRichContent now guards blob collection with `url && sha256`
matching the defensive checks already in serializeInlineContent.
Previously null sha256 would corrupt the dedup Set and null url would
produce invalid BlobAttachment entries.
Added 22 new edge case tests:
- Paste handler: punctuation boundaries, double-space regression,
malformed bech32 fallback, uppercase rejection, error resilience
- Serialization: empty editor, null sha256/url blobs, invalid pubkey
fallback, missing mention attrs, inline dedup, multi-paragraph
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* fix(editor): raise suggestion search limits for profiles and emojis
Both suggestion dropdowns use Virtuoso for virtualized rendering, so
they can handle large result sets without performance issues. The
previous limits (20 profiles, 24 emojis) were too restrictive — users
with many custom emojis sharing a substring or large contact lists
couldn't scroll to find the right match.
Raised both limits to 200 to allow thorough browsing while still
bounding the result set.
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* refactor(chat): rework emoji picker to scrollable list with search
Replace the fixed 1-row grid (8 emojis) with a scrollable virtualized
list matching the editor's EmojiSuggestionList look & feel:
- Search box at top with magnifying glass icon
- Virtuoso-backed scrollable list (8 visible items, unlimited results)
- Each row shows emoji icon + :shortcode: label
- Keyboard navigation: arrow keys to select, Enter to confirm
- Mouse hover highlights, click selects
- Frequently used emojis still shown first when no search query
- Narrower dialog (max-w-xs) for a compact picker feel
https://claude.ai/code/session_01CzeTFzSETs9wSPH2feDE6u
* fix: add address field to EmojiTag in editor types, fix GroupMessageOptions
- Add optional `address` field to EmojiTag in editor/types.ts to match
NIP-30 changes from main (30030 emoji set address)
- Extend GroupMessageOptions with MetaTagOptions to fix type error in
GroupMessageBlueprint's setMetaTags call
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(editor): restore address attr, fix serialization, UserName, no-scroll
- Restore `address` attribute in shared EmojiMention extension (emoji.ts)
that was dropped during refactor — required for NIP-30 emoji set tracking
- Extract `address` from emoji nodes in both serializeRichContent and
serializeInlineContent so it makes it into published events
- Fix MentionEditorProps.onSubmit signature: use EmojiTag[] (not the narrower
inline type) so address field flows through to callers
- Restore UserName component in ProfileSuggestionList for proper display
with Grimoire member badges and supporter flame
- Remove scrollbar when all items fit: set overflow:hidden on Virtuoso when
items.length <= MAX_VISIBLE (profile list, emoji list, emoji picker dialog)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
NIP-30 allows an optional 4th tag parameter specifying the source emoji
set address (e.g. "30030:pubkey:identifier"). This threads that address
through the full emoji pipeline so it appears in posts, replies, reactions,
and zap requests.
- Add local blueprints.ts with patched NoteBlueprint, NoteReplyBlueprint,
GroupMessageBlueprint, and ReactionBlueprint that emit the 4th param;
marked TODO to revert once applesauce-common supports it upstream
- Add address? to EmojiWithAddress, EmojiTag, EmojiSearchResult, and
EmojiTag in create-zap-request
- Store address in EmojiSearchService.addEmojiSet (30030:pubkey:identifier)
- Thread address through both editor serializers (MentionEditor, RichEditor)
and the emoji node TipTap attributes
- Fix EmojiPickerDialog to pass address when calling onEmojiSelect and
when re-indexing context emojis
- Update SendMessageOptions.emojiTags and sendReaction customEmoji param
to use EmojiTag throughout the adapter chain
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(settings): add relay lists management section
- Fetch additional relay list kinds (10006, 10007, 10050) on login
- Add "Relays" tab to Settings with accordion UI for each relay list kind
- Support NIP-65 relay list (kind 10002) with read/write markers
- Support blocked relays (10006), search relays (10007), DM relays (10050)
- Add/remove relays with URL sanitization and normalization
- Explicit save button publishes only modified lists as replaceable events
https://claude.ai/code/session_01JHirYU56sKDKYhRx6aCQ54
* docs: add plan for honoring blocked & search relay lists
Detailed implementation plan for:
- Kind 10006: filter blocked relays from all connection paths
- Kind 10007: use search relays for NIP-50 queries
https://claude.ai/code/session_01JHirYU56sKDKYhRx6aCQ54
* refactor(settings): extract relay list logic into tested lib, fix UX issues
Extract parseRelayEntries, buildRelayListTags, sanitizeRelayInput, and
comparison/mode helpers into src/lib/relay-list-utils.ts with 52 tests
covering roundtrips, normalization, edge cases, and mode conversions.
UX fixes:
- Replace RelayLink (navigates away on click) with static RelaySettingsRow
- Remove redundant inbox/outbox icons (mode dropdown is sufficient)
- Always-visible delete button instead of hover-only opacity
- Per-accordion dirty indicator (CircleDot icon) for modified lists
- Discard button to reset all changes
- Read-only account explanation text
- Human-friendly descriptions (no NIP references or kind numbers)
- Separator between relay list and add input
- Larger relay icons and text for readability
https://claude.ai/code/session_01JHirYU56sKDKYhRx6aCQ54
* feat(settings): use KindBadge and NIPBadge in relay list accordions
Replace plain text kind names with KindBadge (full variant showing icon,
name, and kind number) and add NIPBadge next to each list description.
This gives power users the protocol context they expect.
Also document KindBadge and NIPBadge as shared components in CLAUDE.md.
https://claude.ai/code/session_01JHirYU56sKDKYhRx6aCQ54
* feat(settings): add favorite relays list (kind 10012) to relay settings
Add kind 10012 (Favorite Relays / Relay Feeds) to the settings UI and
account sync fetching. Uses "relay" tags like other NIP-51 lists.
https://claude.ai/code/session_01JHirYU56sKDKYhRx6aCQ54
* fix(kinds): use semantic icons for blocked and search relay lists
- Kind 10006 (Blocked Relays): Radio → ShieldBan
- Kind 10007 (Search Relays): Radio → Search
These icons propagate to KindBadge, settings accordions, and event
renderers via getKindInfo(). Generic relay kinds (10002, 30002, etc.)
keep the Radio icon.
https://claude.ai/code/session_01JHirYU56sKDKYhRx6aCQ54
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add NIP-85 Trusted Assertions feed & detail renderers
Add support for NIP-85 Trusted Assertion events (kinds 30382-30385) and
the Trusted Provider Declaration (kind 10040) with kind constants,
helper library, and feed + detail renderers.
- Add kind entries for 10040, 30382, 30383, 30384, 30385 to EVENT_KINDS
- Create src/lib/nip85-helpers.ts with cached helpers for parsing
assertion data (user, event, address, external) and provider lists
- Create shared TrustedAssertionRenderer for all 4 assertion kinds with
rank bar, subject display, and compact metrics preview
- Create TrustedAssertionDetailRenderer with full metrics table,
rank visualization, topics, and raw tag fallback
- Create TrustedProviderListRenderer/DetailRenderer for kind 10040
with provider table and encrypted entries indicator
- Register all renderers in kinds/index.tsx
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* refactor: extract NIP-73 helpers and shared ExternalIdentifierDisplay
Move getExternalIdentifierIcon() and getExternalIdentifierLabel() from
nip22-helpers.ts into a new nip73-helpers.ts since they are NIP-73
utilities, not NIP-22 specific. Add inferExternalIdentifierType() and
getExternalIdentifierHref() helpers.
Create shared ExternalIdentifierDisplay components (inline + block
variants) that use proper NIP-73 type-specific icons (Globe for web,
BookOpen for ISBN, Podcast for podcasts, Film for ISAN, etc.) instead
of a generic ExternalLink icon.
- Kind 1111 renderer now uses ExternalIdentifierInline for root scope
- Kind 30385 assertion renderer uses ExternalIdentifierInline (feed)
and ExternalIdentifierBlock (detail) for NIP-73 subjects
- nip22-helpers.ts re-exports from nip73-helpers for compatibility
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* fix: UI polish for NIP-85 renderers
Address review feedback across all NIP-85 components:
Icon: Replace BarChart3 with ShieldCheck for assertion kind constants
(30382-30385) — communicates "verified trust data" vs generic analytics.
Feed renderer: Subject is now the visual anchor (ClickableEventTitle)
with kind label as a small outline Badge above it. Rank bar widened to
w-32, color-coded green/yellow/red by score threshold. Fix "Zaps Recd"
abbreviation to "Zaps In".
Detail renderer: Metrics grouped into Activity, Zaps, Moderation
sections with uppercase section headers. Kind 30384 addresses now
show "Kind X by <UserName> / d-tag" instead of raw hex. ExternalMetrics
type badges now show NIP-73 icons + friendly labels (getExternalTypeLabel)
instead of raw k-tag values like "podcast:item:guid".
Provider list: Feed uses compact Badge for kind:tag + count summary.
Detail uses stacked cards instead of 3-column table for narrow panels.
ExternalIdentifierBlock: Linked blocks now show dotted underline on
label + ExternalLink icon for clear click affordance.
Add getExternalTypeLabel() to nip73-helpers for k-value display names.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* fix: use Progress component for rank bars, consistent sats formatting
Replace custom rank bar divs with the existing Progress UI component
(with new indicatorClassName prop for color-coded fills).
Make sat amount displays consistent with zap receipt renderer pattern:
value and "sats" unit are rendered as separate elements — numeric value
in font-medium, unit in smaller muted text — matching how Kind9735
displays amounts across the app.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* fix: use RelayLink for relay URLs, remove redundant kindTag, add relay hints
Provider list renderers now use RelayLink instead of raw relay URL
strings — shows favicon, insecure ws:// warning, opens relay detail
on click.
Remove kindTag display from provider cards — it's an internal
protocol detail redundant in the UI context.
Pass relay hints from provider entries to UserName so profiles can
be fetched from the relay the provider actually publishes to.
Add UserName relayHints prop (forwarded to useProfile).
Add RelayLink and UserName to Shared Components section in CLAUDE.md
so they're consistently used across the codebase.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* docs: expand shared components section in CLAUDE.md
Add BaseEventContainer, ClickableEventTitle, RichText, QuotedEvent,
and CustomEmoji to the shared components reference. These are the
core building blocks used across all kind renderers — documenting
them prevents re-implementation and ensures consistent patterns.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* docs: trim shared components list in CLAUDE.md
Remove BaseEventContainer and QuotedEvent — these are internal
patterns that kind renderer authors already know from context,
not general-purpose components that get misused or forgotten.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* feat: show metric type labels in trusted assertion feed view
Add Label components to the assertion feed renderer so you can see at a
glance which metrics an assertion carries (Followers, Posts, Zaps, etc.)
instead of just numeric values. Also swap Badge → Label for the kind
indicator for visual consistency.
Replace hardcoded green/yellow/red rank colors with theme variables
(success/warning/destructive) in both feed and detail renderers so the
rank bar works correctly across all themes.
Add Label to CLAUDE.md shared components list (22 imports across the
codebase).
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* feat: show provider kind tag in trusted provider list renderers
Add Label with formatKindTag() to both feed and detail views so each
provider row shows what it provides (e.g. "User Assertion: Rank").
Also swap Badge → Label for consistency with the assertion renderers.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
* fix: stabilize relayHints in useProfile to prevent fetch abort loop
relayHints was used directly in the useEffect dependency array, so
callers passing a new array literal (e.g. [p.relay]) on every render
caused the effect to re-run each cycle — aborting the previous network
fetch before it could complete. The IndexedDB fast-path masked this in
the feed view (profiles already cached), but the detail view showed
raw pubkeys because profiles were never fetched from the network.
Wrap relayHints in a JSON.stringify-based useMemo (same pattern as
useStableArray) so the effect only re-runs when the actual relay
values change.
https://claude.ai/code/session_01XjwLaShFSVPR5gNA7iUjuB
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor: extract relay auth manager into standalone package
Decouple NIP-42 relay authentication from Grimoire internals into a
generic, framework-agnostic package at packages/relay-auth-manager/.
The new package uses dependency injection for pool, signer, and storage
(localStorage-like interface), making it reusable in any applesauce-based
app. Fixes the bug where auth prompts appeared even when the signer
couldn't sign events - now only emits pending challenges when a signer
is available.
Key changes:
- New package with RelayAuthManager class, pure auth state machine,
and comprehensive test suite (103 tests)
- Grimoire's relay-state-manager now delegates all auth logic to the
package, retaining only connection/notice tracking
- Auth preferences moved from Dexie to localStorage via pluggable storage
- Reactive signer lifecycle: auto-auth re-evaluates when signer appears
- Pool relay lifecycle via add$/remove$ observables (no polling)
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
* fix: prevent auth prompts when signer is unavailable
Three bugs fixed:
1. Race condition in emitState(): states$ was emitted before
pendingChallenges$, so relay-state-manager's states$ subscriber
would read stale pendingChallenges$.value. Now pendingChallenges$
is emitted first for consistent reads.
2. relay-state-manager only subscribed to states$, missing
pendingChallenges$ changes. Now subscribes to both.
3. canAccountSign used constructor.name which is fragile under
minification. Now uses account.type !== "readonly" (stable
property from applesauce-accounts).
Added 3 regression tests verifying pendingChallenges$.value
consistency when observed from states$ subscribers.
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
* fix: migrate auth preferences from Dexie to localStorage
One-time migration preserves existing user preferences: reads from
Dexie relayAuthPreferences table, writes to localStorage, injects
into the running manager, then clears the Dexie table. Skips if
localStorage already has data (idempotent).
Removes the DexieAuthStorage adapter — sync/async impedance mismatch
made it fragile. localStorage is the right fit for the sync
getItem/setItem interface.
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
* docs: add README for relay-auth-manager package
Covers constructor options, observables, methods, auth lifecycle,
preferences, storage interface, state machine, and dependency
interfaces.
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
* fix: address 3 bugs in relay-auth-manager
1. State machine: authenticated + CHALLENGE_RECEIVED with "never"
preference now correctly auto-rejects instead of entering a dead
challenge_received state that nobody acts on.
2. Auto-auth error handlers now guard with `status === "authenticating"`
before overwriting state, preventing a late-resolving promise from
clobbering a valid state transition (e.g. disconnect → "none").
3. API no longer leaks mutable internal references. getRelayState(),
getAllStates(), getAllPreferences(), and states$ emissions all return
shallow copies. Previously, consumers holding a reference to a
previous emission would see it silently mutate.
All three fixes include regression tests (110 tests, up from 103).
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
* feat: make relay-auth-manager production-ready
- authenticate() now waits for authenticated$ confirmation via
firstValueFrom(race(...)) — resolves only when relay confirms,
rejects on disconnect. Uses Promise.all to avoid unhandled rejections.
- Add retry() for relays stuck in "failed" state.
- Add removePreference() to prevent unbounded preference growth.
- Add normalizeUrl option for custom URL normalization — preferences and
session rejections now consistently normalized via normalizeForKey().
- Wire Grimoire's normalizeRelayURL as the normalizer in relay-auth.ts.
- Update README with new methods, normalizeUrl option, retry lifecycle.
- 123 package tests passing.
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
* chore: prepare relay-auth-manager for npm publishing
- Point exports/main/types to dist/ for correct npm resolution
- Add tsconfig.build.json for emitting ESM JS + declarations
- Add build/clean/prepublishOnly scripts
- Add LICENSE, description, keywords, author, files field
- Add Vite resolve alias + tsconfig paths for workspace dev
(resolves source directly, no pre-build needed for dev)
- Fix TypeScript strict errors in test file
- Clean npm pack output: dist/, README.md, LICENSE only
https://claude.ai/code/session_01XqrjeQVtJKw9uC1XAw6rqd
---------
Co-authored-by: Claude <noreply@anthropic.com>
Kind 11 events are thread roots (NIP-7D) with an optional title tag.
Previously they reused the Kind1Renderer (short text note). Now they
get a dedicated ThreadRenderer that shows the title as a clickable
heading (via ClickableEventTitle) when present, followed by the
content rendered with RichText.
https://claude.ai/code/session_01SQLhrJfeQHceRAS1MjYHrN
Co-authored-by: Claude <noreply@anthropic.com>
* feat(kind-1111): show root scope and parent context per NIP-22
The Kind 1111 renderer previously only showed the immediate parent reply,
missing the root scope that defines what a comment thread is about. Now
shows both the root item (blog post, file, URL, podcast, etc.) and the
parent reply (when replying to another comment), giving full threading
context.
- Add NIP-22 helper library using applesauce pointer helpers
(getEventPointerFromETag, getAddressPointerFromATag,
getProfilePointerFromPTag) for tag parsing
- Support external identifiers (I-tags) with NIP-73 type-specific icons
- Unified ScopeRow component for consistent inline display
- Only show parent reply line for nested comments (not top-level)
https://claude.ai/code/session_01Dxedi6VWdZG8nFpba211oR
* fix(kind-1111): unify scope row styling, fix redundant icons and link style
- Replace separate NostrEventCard/ExternalScopeCard with children-based
ScopeRow so root and reply rows look identical
- Remove redundant icons: root events show only KindBadge, replies show
only Reply arrow — no double icons
- External URLs now use the standard link style (text-accent + dotted
underline on hover) matching UrlList, with ExternalLink icon
- Children are direct flex items for proper gap spacing
https://claude.ai/code/session_01Dxedi6VWdZG8nFpba211oR
* fix(kind-1111): match icon sizes and make external URLs clickable
- Set KindBadge iconClassname to size-3 so it matches Reply and
ExternalLink icons (was size-4 by default)
- Use the I-tag value itself as href when it's a URL and no hint is
provided — most web I-tags only have the URL in value, not in hint
https://claude.ai/code/session_01Dxedi6VWdZG8nFpba211oR
* fix(kind-1111): use muted style for external link rows
Match the muted-foreground + dotted underline style used by other
scope rows instead of accent color.
https://claude.ai/code/session_01Dxedi6VWdZG8nFpba211oR
---------
Co-authored-by: Claude <noreply@anthropic.com>
StatusIndicator was stuck showing a loading spinner indefinitely when no
status events existed, because the useTimeline observable never completes
for live Nostr subscriptions. Default to showing "Open" immediately and
update reactively when status events arrive.
https://claude.ai/code/session_01UAjKegpi8uWyLdjgRpNeEJ
Co-authored-by: Claude <noreply@anthropic.com>
* fix: disable smooth scroll on initial chat load
The chat viewer was using smooth scrolling for all followOutput events,
including when first loading the message list. This caused a slow,
animated scroll towards the latest messages on initial load.
Fix by tracking whether initial render is complete and only enabling
smooth scrolling for subsequent followOutput events (new incoming
messages). The ref is reset when switching between conversations.
https://claude.ai/code/session_0174r1Ddh5e2RuhHf2ZrFiNc
* fix: use instant scroll instead of disabling scroll on initial load
The previous fix returned `false` which disabled scrolling entirely,
causing incorrect scroll position. Changed to return "auto" which
scrolls instantly (no animation) while still positioning correctly.
https://claude.ai/code/session_0174r1Ddh5e2RuhHf2ZrFiNc
* fix: buffer NIP-29 messages until EOSE to prevent partial renders
The loadMessages observable was emitting on every event as they streamed
in before EOSE, causing multiple re-renders with partial message lists.
This resulted in incorrect scroll positions during initial chat load.
Now uses combineLatest with a BehaviorSubject to track EOSE state and
only emits the message list after the initial batch is fully loaded.
New messages after EOSE continue to trigger immediate updates.
https://claude.ai/code/session_0174r1Ddh5e2RuhHf2ZrFiNc
---------
Co-authored-by: Claude <noreply@anthropic.com>