Commit Graph

122 Commits

Author SHA1 Message Date
Gigi
20f37b94e1 fix(profile): enable reactive profile fetch via address loader lookup relays and improve fallback display\n\n- Configure createAddressLoader with common profile relays (purplepag.es, primal, nostr.band)\n- Avoid sticky 'Loading profile...' label; fallback to short pubkey until profile loads 2025-10-03 00:16:04 +02:00
Gigi
21890f002d chore(lint): fix hooks rule error by separating content resolver component and helpers
- Move shared helpers into src/utils/helpers.ts
- Add ContentWithResolvedProfiles component file to avoid hooks rule violation
- Use strong IconDefinition type in icon map
- Resolve linter warnings and errors
2025-10-03 00:12:40 +02:00
Gigi
7a5dd2f444 fix(applesauce): attach address/replaceable loaders so ProfileModel resolves reactively
- Use createAddressLoader from applesauce-loaders
- Set eventStore.addressableLoader and replaceableLoader
- Enables reactive profile fetching for logged-in user and mentions
2025-10-03 00:08:10 +02:00
Gigi
5495890204 feat(ui): improve logged-in user profile resolution
- Add debug logging to track profile loading
- Show 'Loading profile...' while profile data is being fetched
- Better handling of profile loading states
- Ensures user sees proper name instead of pubkey when available
2025-10-03 00:04:11 +02:00
Gigi
6d585dcef6 feat(ui): resolve nprofile strings to human-readable names
- Add extractNprofilePubkeys utility to parse nprofile strings from content
- Create ContentWithResolvedProfiles component using applesauce ProfileModel
- Replace nprofile strings with @displayName in bookmark content
- Update BookmarkItem to use resolved content rendering
- Improves readability by showing names instead of long nprofile strings
2025-10-03 00:02:22 +02:00
Gigi
0bae6674ce feat(ui): resolve author names using applesauce ProfileModel
- Import useEventModel and Models from applesauce-react
- Use ProfileModel to fetch author profile data for each bookmark
- Display author name/display_name/nip05 instead of raw pubkey
- Fallback to short pubkey if profile not available
- Improves readability by showing human-readable author names
2025-10-03 00:00:04 +02:00
Gigi
096509baf6 feat(ui): replace kind numbers with FontAwesome icons
- Import all kind-specific icons from FontAwesome
- Add getKindIcon mapping function based on kind-icons.txt
- Replace 'Kind: X' text with visual icon in bookmark-meta
- Add styling for kind-icon with blue accent color
- Fallback to file icon for unmapped kinds
2025-10-02 23:59:11 +02:00
Gigi
4c2626f3c4 feat(ui): add spinner to content loading state
- Replace text with FontAwesome spinner icon
- Add loading-spinner styles for proper alignment
- Improve visual feedback during content fetch
2025-10-02 23:54:19 +02:00
Gigi
70fa3bb6a8 fix(ui): left-align content and constrain images in content panel
- Force left alignment for HTML/Markdown content
- Constrain images to container width and 70vh height
- Improve readability of rendered articles
2025-10-02 23:52:12 +02:00
Gigi
719ddf3f0b feat(readability): render Markdown when proxy provides it
- Detect markdown blocks from r.jina.ai output
- Add react-markdown + remark-gfm for rendering
- Extend ContentPanel to render markdown or HTML
- Add styles for markdown content
2025-10-02 23:46:33 +02:00
Gigi
80408148fb feat: add react-markdown and remark-gfm for markdown rendering 2025-10-02 23:45:09 +02:00
Gigi
4163ffa4ba feat(ui): add READ NOW button to bookmark cards
- Shows when a bookmark has URLs
- Triggers onSelectUrl to load readability content in main panel
- Added styles for prominent call-to-action
2025-10-02 23:41:03 +02:00
Gigi
cf230623a4 chore: remove unused faLock import to satisfy linter 2025-10-02 23:39:04 +02:00
Gigi
9cd4b72f98 chore: commit pending changes 2025-10-02 23:37:13 +02:00
Gigi
eb57330915 feat(ui): add two-pane layout and styles for content panel
- Grid layout with sidebar and main pane
- Styled content panel and readable HTML area
- Sticky sidebar behavior
2025-10-02 23:34:47 +02:00
Gigi
96d93d0e17 feat(layout): add two-pane layout and content fetching pipeline
- Left: bookmark list; Right: content panel
- Selection triggers readability fetch via readerService
- ContentPanel renders title and HTML
- Wires selection from BookmarkItem -> BookmarkList -> Bookmarks
2025-10-02 23:34:21 +02:00
Gigi
1d10c10a44 feat: propagate URL selection through BookmarkList to parent 2025-10-02 23:33:42 +02:00
Gigi
dab35820b7 feat: add onSelectUrl to BookmarkItem and intercept URL clicks
- Adds optional onSelectUrl callback
- Prevents default navigation to open in main content panel
- Keeps middle-click/target blank behavior if no handler
2025-10-02 23:33:05 +02:00
Gigi
9d5e8c194b feat(ui): add ContentPanel component to render readable HTML
- Shows loading/empty states
- Renders title and HTML via dangerouslySetInnerHTML
- Minimal API for integration
2025-10-02 23:32:32 +02:00
Gigi
de32807995 feat(reader): add lightweight readability fetcher via r.jina.ai proxy
- Provide fetchReadableContent(url) returning simplified HTML
- Avoid heavy deps and CORS issues using proxy
- Extract <title> best-effort
2025-10-02 23:32:00 +02:00
Gigi
b671e0e259 feat: update bookmark icons to use fa-bookmark and fa-user-lock
- Replace faGlobe with faBookmark for public bookmarks
- Add faUserLock icon alongside faBookmark for private bookmarks
- Import faBookmark and faUserLock from FontAwesome
- Update CSS to handle icon spacing with flexbox and gap
- Private bookmarks now show both bookmark and user-lock icons
2025-10-02 23:23:57 +02:00
Gigi
e5d6fe99f3 fix: improve word-wrap for long strings and prevent overflow
- Add word-wrap, overflow-wrap, and word-break properties to content areas
- Apply to .parsed-content, .bookmark-content, .individual-bookmark
- Update .nostr-mention and .nostr-link for better long string handling
- Add overflow: hidden to .individual-bookmark container
- Ensures long nprofile strings and URLs break properly within containers
2025-10-02 23:20:09 +02:00
Gigi
9400faa00f feat: display URLs clearly in individual bookmarks
- Extract URLs from bookmark content using extractUrlsFromContent()
- Display extracted URLs in a dedicated section with proper styling
- URLs are clickable and open in new tabs
- Reuse existing CSS styles for consistent appearance
2025-10-02 23:11:22 +02:00
Gigi
5173a37b69 feat: remove 'EVENT' text from bookmark type labels
- Remove bookmark.type display next to lock/globe icons
- Keep only the visual icons for private/public indication
2025-10-02 23:10:42 +02:00
Gigi
50b32a66de feat(bookmarks): extract URLs from content into urlReferences for each item 2025-10-02 22:34:06 +02:00
Gigi
1b41b6e823 fix(timestamps): use seconds for created_at fallbacks; UI date formatting remains ms-converted 2025-10-02 22:30:31 +02:00
Gigi
2696bdb57a fix(bookmarks): dedupe individual bookmarks by id to avoid duplicates in UI 2025-10-02 22:28:47 +02:00
Gigi
e0b042b6c0 docs(readme): document Amethyst-style hidden bookmarks decryption and display flow 2025-10-02 22:05:35 +02:00
Gigi
1226124566 refactor(services): extract helpers and event processing; keep files <210 lines; lint+types clean 2025-10-02 22:03:47 +02:00
Gigi
8967963535 refactor(services): remove usages in bookmarkService, add type guards; lint clean 2025-10-02 21:42:51 +02:00
Gigi
b64fd6cedb chore(release): bump version to 0.0.3 v0.0.3 2025-10-02 21:39:14 +02:00
Gigi
c748f173b3 feat(bookmarks): surface manually decrypted hidden tags in UI; convert JSON tags via Helpers.parseBookmarkTags and include in private items immediately 2025-10-02 21:37:37 +02:00
Gigi
51f009a489 feat(bookmarks): try NIP-44 then NIP-04 for manual decryption; cache decrypted hidden tags for display/debug 2025-10-02 21:30:12 +02:00
Gigi
18d936e222 feat: add detailed debugging for decryption process
- Add logging for what content is being sent to browser extension
- Add fallback to try string conversion if object is passed
- Add parsing of extension error responses
- Help identify exact format expected by browser extension
2025-10-02 21:17:27 +02:00
Gigi
ce7fbdbdf3 feat: implement direct decryption for unrecognized event kinds
- Add manual decryption using signer's nip04 capabilities directly
- Parse decrypted content as JSON array of bookmark tags
- Cache decrypted content properly for getHiddenBookmarks to find
- Enable decryption of legacy bookmark events (kind 30001) with encrypted content
2025-10-02 21:08:20 +02:00
Gigi
6e6d43cb25 feat: add manual decryption for unrecognized event kinds
- Add fallback decryption for events with encrypted content but unrecognized kinds
- Temporarily change event kind to 10003 to use applesauce's standard decryption
- Enables decryption of legacy bookmark events (kind 30001) that contain private bookmarks
- Maintains compatibility with standard NIP-51 bookmark events
2025-10-02 20:59:19 +02:00
Gigi
0ed7c1497f feat: sort individual bookmarks by timestamp (newest first)
- Sort allBookmarks array by created_at timestamp in descending order
- Ensures newest bookmarks appear first in the UI
- Maintains chronological order with most recent bookmarks at the top
2025-10-02 20:56:34 +02:00
Gigi
a2c31b32de feat: increase bookmark loading timeout by 2x
- Increase timeout from 10s to 20s for bookmark fetching
- Increase timeout from 10s to 20s for event hydration
- Provide more time for slow relays to respond
2025-10-02 20:54:31 +02:00
Gigi
cdce972e72 feat: enhance bookmark debugging and fetch legacy formats
- Add detailed logging for events with content (potentially encrypted)
- Fetch legacy bookmark format (kind 30001) in addition to NIP-51 standards
- Show content preview for all events to identify encrypted content
- Help identify if private bookmarks are in different event formats
2025-10-02 20:51:20 +02:00
Gigi
00638410c0 feat: add more relays and fix logging for better bookmark debugging
- Add more popular relays for better bookmark discovery
- Fix variable scoping in bookmark event logging
- Enhanced debugging to see dTag and tag content structure
2025-10-02 20:50:07 +02:00
Gigi
2e5d0e3725 feat: add detailed logging to debug bookmark event structure
- Add logging for raw events before deduplication to see all fetched events
- Add detailed tag inspection for bookmark events including dTag and first few tags
- Help identify if private bookmarks are in separate bookmark sets (30003) or main lists (10003)
2025-10-02 20:48:16 +02:00
Gigi
a66c051444 fix: correct bookmark event kinds to match NIP-51 standards
- Fix bookmark list kind from 30001 to 10003 (kinds.BookmarkList)
- Fix bookmark sets kind from 30001 to 30003 (kinds.Bookmarksets)
- Update dedupeNip51Events to handle correct NIP-51 event kinds
- Now fetching the correct bookmark events that support hidden tags
2025-10-02 20:41:53 +02:00
Gigi
eb282fcbb0 fix: fix hidden bookmark detection by using applesauce's built-in logic
- Remove custom isEncryptedContent function that was too restrictive
- Use applesauce's hasHiddenContent() and hasHiddenTags() functions instead
- These properly detect encrypted content regardless of format
- Remove failing relay.snort.social from relay list
- Add detailed logging to show hidden content detection status
2025-10-02 20:38:46 +02:00
Gigi
d54313b015 fix: correct NIP-51 bookmark event kinds and deduplication
- Fix bookmark event kinds: use 30001 (BookmarkList) and 30003 (Bookmarksets) instead of incorrect 10003
- Update dedupeNip51Events to properly handle both bookmark lists and bookmark sets
- Add detailed logging to inspect bookmark event structure and content
- Should now properly detect Amethyst private bookmarks
2025-10-02 20:26:52 +02:00
Gigi
03c6a0c9c7 feat: add wot.dergigi.com relay for improved connectivity
- Add wot.dergigi.com as additional relay option
- Now using 6 relays total for maximum bookmark data availability
2025-10-02 20:09:41 +02:00
Gigi
dc36992199 feat: add relay.dergigi.com to relay list for better connectivity
- Add relay.dergigi.com as additional relay option
- Improve chances of fetching private bookmarks from multiple sources
2025-10-02 20:09:00 +02:00
Gigi
08fc541eaa fix: properly configure browser extension signer for hidden bookmarks
- Fix signer extraction for ExtensionAccount to use nip04/nip44 capabilities
- Add debug logging to understand hidden bookmarks unlocking process
- Ensure ExtensionAccount can be used as HiddenContentSigner for decryption
- Handle both ExtensionAccount and raw signer for maximum compatibility
2025-10-02 19:46:34 +02:00
Gigi
3eca2879ef fix: resolve all linting and type checking issues
- Fix empty catch blocks in BookmarkItem and bookmarkService
- Replace any types with proper NostrEvent interface
- Add proper error handling with console.warn
- Use eslint-disable for unavoidable any types in applesauce integration
2025-10-02 11:26:12 +02:00
Gigi
de428b8719 config: change dev server port from 3000 to 9802 2025-10-02 11:25:10 +02:00
Gigi
ac7f1007a7 feat(bookmarks): fetch all NIP-51 events; dedupe 10003/30001; unlock private via applesauce; hydrate ids; trim logs 2025-10-02 11:22:07 +02:00