Commit Graph

2033 Commits

Author SHA1 Message Date
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
Gigi
4db147ddf3 feat(ui): add copy-to-clipboard icons for event id and author pubkey 2025-10-02 11:02:43 +02:00
Gigi
2eda8f3227 chore(debug): log per-event hidden/locked state; log unlock attempts and results 2025-10-02 11:01:23 +02:00
Gigi
64825175a7 fix(bookmarks): unlock based on applesauce hidden-tags state only; keep file compact 2025-10-02 10:59:06 +02:00
Gigi
5ee0f49b69 feat(bookmarks): hydrate event content for pointers; robust unlock (nip04->nip44); aggregate across events 2025-10-02 10:51:33 +02:00
Gigi
7d26372878 feat(ui): add FontAwesome globe/lock icons; render content identically for private/public 2025-10-02 10:44:06 +02:00
Gigi
ab00bd84e6 fix(bookmarks): hide encrypted ciphertext from title/preview; prefer plaintext content 2025-10-02 10:39:57 +02:00
Gigi
ec4473fc51 feat(bookmarks): aggregate list(10003) + set(30001); unlock hidden per-event; merge results 2025-10-02 10:35:07 +02:00
Gigi
0f57338866 fix(bookmarks): avoid unlock with empty ciphertext; require hidden tags + ciphertext 2025-10-02 10:32:02 +02:00
Gigi
a8cdeeaef2 feat(bookmarks): unlock hidden bookmarks via applesauce helpers and signer; reduce logs 2025-10-02 10:30:18 +02:00
Gigi
92d49468cd fix: resolve TypeScript type issues
- Update AccountWithExtension interface to be more flexible
- Add type guard for runtime type checking
- Change fetchBookmarks parameter to accept unknown type with validation
- All linting and type checks now pass
2025-10-02 10:23:01 +02:00
Gigi
a625203fe4 refactor: clean up bookmark service and use proper applesauce approach
- Remove unused imports and variables
- Keep the enhanced debugging for multiple bookmark list events
- Use native applesauce getHiddenBookmarks which should trigger browser extension
- This follows the applesauce models pattern for handling private bookmarks
2025-10-02 10:21:44 +02:00
Gigi
e3efcd4a7c debug: enhance private bookmark detection with detailed logging
- Check multiple bookmark list events for encrypted content
- Add detailed logging for signer availability and type
- Use native applesauce getHiddenBookmarks which should trigger browser extension
- This will help identify why private bookmarks aren't being detected
2025-10-02 10:20:55 +02:00
Gigi
ba76a6a9ef feat: enhance private bookmark detection
- Fetch multiple bookmark list events (limit 10) to find private bookmarks
- Check all events for encrypted content before selecting one
- Add detailed logging to identify which event has encrypted content
- This should help find your private bookmarks if they exist in a different event
2025-10-02 10:19:37 +02:00
Gigi
c5a32b911d debug: add detailed logging for bookmark content
- Check if bookmark list has encrypted content
- Log content preview to understand the structure
- This will help determine why browser extension isn't triggered
2025-10-02 10:15:34 +02:00
Gigi
610de95481 feat: improve private bookmark handling
- Use proper error handling for getHiddenBookmarks
- Add detailed logging to understand what's happening
- The browser extension should be triggered automatically when needed
- This follows the applesauce examples pattern for decryption
2025-10-02 10:14:16 +02:00
Gigi
82c63e5d18 revert: remove manual decryption approach
- Removed manual decryption implementation
- Back to using applesauce helpers directly
- The issue is likely that browser extension needs permission for decryption
- getHiddenBookmarks returns undefined because extension hasn't been triggered yet
- All linting passes
2025-10-02 10:11:13 +02:00
Gigi
b112520056 debug: enhance account signer debugging
- Added detailed logging for account signer capabilities
- Check if account has signer with decrypt method
- This will help identify if the ExtensionAccount has proper NIP-44 decryption capabilities
- Following applesauce examples pattern for signer usage
2025-10-02 10:06:37 +02:00
Gigi
06b15f3fe2 docs: update applesauce cursor rules
- Updated applesauce documentation reference
- Added guidance to use applesauce modules when possible
- Referenced examples directory for proper usage patterns
2025-10-02 10:05:11 +02:00
Gigi
4be8eff80a feat: add debugging for private bookmark decryption
- Added detailed logging to understand why getHiddenBookmarks returns undefined
- Check bookmark list content and encryption format
- Verify account has decryption capabilities
- Pass full account object with extension capabilities to applesauce helpers
- This will help diagnose the NIP-44 vs NIP-04 encryption issue
2025-10-02 10:02:50 +02:00
Gigi
559e7ee944 fix: handle applesauce bookmark structure correctly
- Added processApplesauceBookmarks function to handle applesauce return format
- Fixed processing of {notes: [], articles: [], hashtags: [], urls: []} structure
- Added ApplesauceBookmarks interface for proper typing
- Now correctly processes all bookmark types from applesauce helpers
- Should now show all 13 bookmarks (12 notes + 1 article) instead of just 1
- All linting and type checking passes
2025-10-02 09:46:04 +02:00
Gigi
7fd8e5341e chore: ignore applesauce directory in ESLint configuration
- Added 'applesauce' to ignorePatterns in package.json
- Prevents linting errors from dependency code
- Maintains focus on project-specific code quality
- ESLint now runs cleanly with 0 errors and 0 warnings
2025-10-02 09:44:57 +02:00
Gigi
211a89afbb refactor: eliminate code duplication with DRY principle
- Created processBookmarks helper function to eliminate duplication
- Reduced public/private bookmark processing from 32 lines to 3 lines
- Simplified isPrivate check logic
- Maintained all functionality while improving maintainability
- File reduced from 117 to 105 lines (10% reduction)
- All linting and type checking passes
2025-10-02 09:43:53 +02:00
Gigi
695d3509ac refactor: simplify bookmark service using applesauce helpers
- Removed custom event fetching logic in favor of applesauce helpers
- Use getPublicBookmarks and getHiddenBookmarks directly from applesauce-core
- Simplified code from 152 lines to 105 lines (31% reduction)
- Added proper TypeScript interfaces for type safety
- Enhanced logging to debug bookmark fetching
- All linting and type checking passes
2025-10-02 09:43:17 +02:00
Gigi
7bb037f12a feat: implement getHiddenBookmarks for private bookmarks
- Added getHiddenBookmarks from applesauce-core to fetch private bookmarks
- Created HiddenBookmarkData interface for proper typing
- Handle both array and object return types from getHiddenBookmarks
- Combine public and private bookmarks in the final result
- Maintain type safety with proper TypeScript interfaces
- All linting and type checking passes
2025-10-02 09:39:59 +02:00
Gigi
a7cfc802d1 fix: resolve linting and type checking issues
- Fixed TypeScript error by properly handling undefined activeAccount
- Removed unnecessary 'as any' type assertion
- All linting rules now pass with 0 warnings
- TypeScript compilation passes without errors
2025-10-02 09:38:32 +02:00
Gigi
465278742e refactor: simplify bookmark service and reduce code duplication
- Extracted fetchEvent helper function to eliminate duplication
- Simplified main fetchBookmarks function with cleaner logic
- Used Promise.all for parallel event fetching instead of sequential loops
- Consolidated private bookmark CSS styles and removed duplicates
- Reduced file from 140 to 102 lines while maintaining functionality
- Removed unused imports and simplified error handling
2025-10-02 09:37:41 +02:00
Gigi
79f83b214f feat: add private bookmarks support with NIP-51 and visual indicators
- Updated bookmark types to support private bookmarks with isPrivate and encryptedContent fields
- Enhanced bookmark service to detect encrypted content and mark bookmarks as private
- Added visual indicators for private bookmarks with lock icon and special styling
- Added CSS styles for private bookmarks with red accent border and gradient background
- Updated BookmarkItem component to show private bookmark indicators
- Maintained compatibility with existing public bookmark functionality
2025-10-02 09:36:46 +02:00
Gigi
170feb1bd7 fix: implement proper NIP-44 decryption using applesauce hidden-content helpers
- Replace direct signer method calls with applesauce hidden-content helpers
- Use unlockHiddenContent, getHiddenContent, and isHiddenContentLocked functions
- Add proper error handling for decryption failures
- This follows the correct applesauce pattern for NIP-44 decryption
2025-10-02 09:33:33 +02:00
Gigi
f37deefa36 chore: add applesauce directory to .gitignore
- Exclude applesauce/ directory from version control
- This directory likely contains examples or testing files that shouldn't be tracked
2025-10-02 09:31:40 +02:00
Gigi
ebdfa47bd8 debug: add signer method inspection for NIP-44 decryption
- Add logging to inspect available methods on the applesauce signer
- Try multiple possible method names for NIP-44 decryption
- This will help identify the correct method name for decryption
2025-10-02 09:27:28 +02:00
Gigi
6e57c6227c feat: add private bookmark fetching with NIP-44 decryption
- Update ActiveAccount interface to include signer property
- Modify fetchBookmarks to handle both kind 10003 (public) and kind 30001 (private) bookmark lists
- Implement NIP-44 decryption for private bookmarks using applesauce SimpleSigner
- Support both public tags and encrypted private content in categorized bookmarks
- Maintain backward compatibility with existing public bookmark functionality
2025-10-02 09:25:57 +02:00
Gigi
e0acd2f7e7 feat: change bookmarks display from grid to social feed list layout
- Update .bookmarks-list to use flex column layout with max-width
- Change .bookmarks-grid to flex column for individual bookmarks
- Add social media-like styling with shadows and hover effects
- Improve visual hierarchy and spacing for feed-like appearance
2025-10-02 09:21:42 +02:00
Gigi
2253172e04 refactor: extract components and utilities to keep files under 210 lines
- Extract types to src/types/bookmarks.ts
- Extract utility functions to src/utils/bookmarkUtils.tsx
- Extract BookmarkItem component to src/components/BookmarkItem.tsx
- Extract BookmarkList component to src/components/BookmarkList.tsx
- Extract bookmark fetching logic to src/services/bookmarkService.ts
- Reduce main Bookmarks component from 416 to 100 lines
- Maintain all functionality while improving code organization
- Pass all linting and type checking
2025-10-02 09:19:44 +02:00
Gigi
15d155c565 fix: resolve undefined timeoutId variable in fetchBookmarks function
- Move timeoutId declaration outside try block to make it accessible in both try and catch blocks
- Fixes ESLint no-undef error and TypeScript compilation error
2025-10-02 09:17:05 +02:00
Gigi
9c34e8d806 chore: bump version to 0.0.2
- Version bump for working bookmark fetching functionality
- Individual bookmark display is now working correctly
v0.0.2
2025-10-02 09:16:15 +02:00
Gigi
934043f858 fix: resolve loading state stuck issue
- Remove loading check from early return condition
- Add timeout to ensure loading state gets reset
- Clear timeout when function completes
- This should allow fetchBookmarks to run properly
2025-10-02 09:15:04 +02:00
Gigi
774ce0f1bf debug: add detailed logging to fetchBookmarks function
- Add console logs to track if fetchBookmarks is called
- Log early return conditions
- This will help identify why the function might not be executing
2025-10-02 09:14:24 +02:00
Gigi
6481dd1bed fix: remove unused NostrEvent import
- Fix TypeScript compilation error
- Remove unused import that was causing build issues
2025-10-02 09:13:43 +02:00
Gigi
d7b5b4f9b4 debug: add obvious console log to verify new code is running 2025-10-02 09:13:28 +02:00