Commit Graph

21 Commits

Author SHA1 Message Date
Jure
1006b1a1f0 Normalize theme tokens: accent-text, zap-text, remove hard-coded colors
- Add accent-text and zap-text tokens to all 7 themes for proper contrast
  on accent/zap-colored buttons (fixes white-on-light-accent in Catppuccin,
  Nord Frost, Hackerman, Sepia, Gruvbox)
- Replace text-white → text-accent-text on all accent buttons (20+ instances)
- Replace text-white → text-zap-text on zap buttons
- Replace hover:text-white → hover:text-accent-text on follow/action buttons
- Replace bg-blue-500 → bg-accent in FountainCard (theme-aware)
- Remaining text-white is correct: overlays on bg-black, danger badges
2026-04-02 17:33:59 +02:00
Jure
1fd613425d Harden accessibility: ARIA roles, semantic buttons, alt text, form labels
- Replace clickable divs with semantic <button> elements (NoteCard, SearchView)
- Add role="dialog", aria-modal, aria-labelledby on all modals (Login, Quote, Zap, Lightbox)
- Add role="presentation" on overlay backdrops (NoteCard menu, emoji pickers)
- Add aria-label to all icon-only buttons (close, nav arrows, context menu)
- Add aria-expanded to context menu toggle
- Add meaningful alt text to all 35+ images (avatars, covers, thumbnails, media)
- Add aria-label to form inputs (search, onboarding login)
2026-04-02 17:01:02 +02:00
Jure
c1029327e7 Fix React error #31 crash from malformed Nostr profiles
Malformed profiles with non-string fields (e.g. nip05: {}) crashed
React's entire render tree in production. Add typeof guards and
profileName() utility across all components that render profile data.
Add ErrorBoundary in main.tsx to show crash details instead of blank screen.
2026-04-01 12:09:57 +02:00
Jure
6ed0b50d33 Fix article bookmarks using note-style e tag instead of a tag
ArticleView was using addBookmark(eventId) which saves an e tag,
putting articles in the Notes tab. Now uses addArticleBookmark
with the 30023:pubkey:d-tag address so articles appear correctly
under the Articles tab in bookmarks.
2026-03-30 08:19:18 +02:00
Jure
5d94220e5d SQLite-backed caching for bookmarks and articles feed
Bookmarks load instantly from DB cache, then fetch missing notes
from relays in background. Articles feed shows cached kind-30023
events immediately on the latest tab. Both persist to SQLite for
instant load on next visit.
2026-03-29 20:46:18 +02:00
Jure
ef21667d9f Fix thread disappearing bug, improve article editor UX
Move selectedNote guard after hooks in ThreadView to fix React rules
of hooks violation that caused thread content to blank out. Article
editor gets inline image previews, readable toolbar labels, and
drag-and-drop image support. Thread reply textareas now auto-expand.
2026-03-25 12:01:47 +01:00
Jure
5b94162ce1 Auto-expanding textareas and proper article comment box
Add useAutoResize hook that grows textareas to fit content up to a max.
Applied to compose box, inline replies, thread replies, and article
comments. Article comment input changed from single-line input to a
multi-row textarea with Shift+Enter support.
2026-03-25 11:11:01 +01:00
Jure
4e04ad38c3 Image upload in replies, multi-image articles, UX fixes
Add image support to InlineReplyBox (paste, file picker), paste-to-upload
in article editor, multi-select for article image toolbar. Fix emoji picker
opening off-screen (right-align), enlarge emoji/attach buttons, make note
card names clickable to open profile.
2026-03-24 16:04:30 +01:00
Jure
b3e7ff7029 Add live feed subscription, timeouts on all relay fetches
Global feed now uses a persistent live subscription (closeOnEose: false)
so new notes stream in real-time instead of requiring manual refresh.
Inspired by Wisp's streaming architecture.

Every fetchEvents call across the entire codebase now uses
fetchWithTimeout with groupable: false — prevents NDK from
batching/reusing stale subscriptions. This fixes Articles, DMs,
Notifications, Zaps, and Trending hanging indefinitely.

Also adds since filters on global (2h) and follow (24h) feeds
to ensure relay freshness, and fixes ArticleFeed re-fetch bug
where follows changes wiped latest tab results.
2026-03-22 11:35:28 +01:00
Jure
04498aeb21 Add repost/comment to article view, redesign audio cards in feed
Article view:
- Repost button in header and footer (kind-6 repost)
- Comment button opens inline input, publishes note with naddr reference
- Footer comment scrolls to top to show input

Audio cards:
- Replace inline <audio> elements with styled play cards
- Clean filename display (decode URI, strip extension, humanize separators)
- Single click loads into persistent podcast player
- Eliminates buffering spinners from slow podcast CDNs
2026-03-21 14:46:18 +01:00
Jure
57630227e1 Add NIP-05 badges, hashtag pages, keyword muting, suggestion dismissal, notification poller
- Article cover: aspect-video replaces max-h-72 for consistent 16:9
- NIP-05 verification badge on note cards with 1-hour TTL cache
- Dedicated hashtag feed pages (clicking #tag opens live feed, not search)
- Keyword muting: word-boundary matching, applied across all feed views
- Follow suggestion dismissal: persistent "don't suggest again" per person
- Background notification poller (60s): mentions, zaps, new followers
- All notification types independently toggleable in settings
- Centralized notification firing (removed inline store notifications)
2026-03-20 12:09:11 +01:00
Jure
989ed01dfc Add syntax highlighting in code blocks and OS push notifications
Syntax highlighting: shared markdown renderer with highlight.js
(atom-one-dark theme), 12 language grammars registered (JS, TS,
Python, Rust, Go, Bash, JSON, YAML, SQL, CSS, HTML, Markdown).
Applied to both article reader and editor preview.

OS notifications: Tauri notification plugin for mentions, DMs, and
zaps. Per-type toggles in Settings with custom toggle switches.
Fires on new unread mentions/DMs; requests OS permission on first
enable. Notification utility at src/lib/notifications.ts.
2026-03-20 11:11:53 +01:00
Jure
93ca13cc51 Add zen writing mode and auto-save indicator with relay confirmation
Zen mode: fullscreen distraction-free writing via F11 or "zen" button;
hides all chrome, centers content in serif font at 17px, shows only
title + content + word count. Esc/F11 to exit, exits on unmount.

Auto-save indicator: shows "saved Xs ago" in editor header, updates
every 10s. After publishing, shows "published to N relays" confirmation
in green, or warning if zero relays confirmed.
2026-03-20 11:05:05 +01:00
Jure
afb8fed97b Bump to v0.8.2 — writing & reading polish, article TOC
- Remove 280-char note limit, soft warning at 4000
- Serif reading font (Georgia) at 17px for articles
- Reading progress bar on articles
- Article table of contents (floating right, scroll-aware)
- Connection indicator fix (data-aware, 25s grace)
2026-03-20 11:00:46 +01:00
Jure
d62cf73510 Writing & reading polish: remove 280-char limit, serif reader font, progress bar
- ComposeBox: remove hard 280-char post limit (Nostr has none); show counter
  only after 3000 chars with yellow/red warnings at 3500/4000
- Article reader: switch from monospace to serif font (Georgia stack) at 17px
  for comfortable long-form reading; article preview gets serif at 15px
- ArticleView: add 2px accent-colored reading progress bar (sticky top,
  scroll-driven, smooth transition)
- Connection indicator: data-aware checking (wraps fetchEvents), 30s recent-
  fetch grace period, 25s offline grace (5 checks) before marking disconnected
2026-03-20 10:50:33 +01:00
Jure
d993ae1131 Bump to v0.8.0 — polish, portability, discovery
Profile banner polish (hero height, click-to-lightbox, avatar overlap),
data export (bookmarks/follows/relays as JSON), relay recommendations
(discover from follows' NIP-65 lists), reading list tracking (read/unread
on bookmarked articles with sidebar badge), trending hashtags (clickable
pills on search idle screen). Updated CLAUDE.md and release notes.
2026-03-19 19:54:14 +01:00
Jure
092553ab9b Bump to v0.7.0 — writer tools, NIP-98 uploads, multi-draft, article bookmarks
- NIP-98 HTTP Auth for image uploads with fallback services (void.cat, nostrimg.com)
- Markdown toolbar (bold, italic, heading, link, image, quote, code, list) + Ctrl+B/I/K
- Multi-draft management with draft list, resume, delete, auto-migrate
- Cover image file picker in article meta panel
- Article bookmarks via NIP-51 'a' tags; Notes/Articles tabs in BookmarkView
- Removed Rust upload_file command; dropped reqwest/mime_guess deps
- Upload spinner, draft count badge, empty states
2026-03-18 18:36:08 +01:00
Jure
ef189932e6 Bump to v0.6.0 — article discovery, search, profile tab, reader polish
Article discovery feed with Latest/Following tabs, article search
(NIP-50 + hashtag for kind 30023), Notes/Articles tab on profiles,
reading time + bookmark + like buttons on article reader. Event
passed directly from card to reader to avoid relay re-fetch failures.
2026-03-17 21:47:24 +01:00
Jure
ab7af96c45 Add long-form article reader (Phase 1 #1, NIP-23)
- fetchArticle(naddr): fetches kind 30023 by d-tag + author pubkey
- fetchAuthorArticles(pubkey): for future profile articles tab
- ArticleView: cover image, title, italic summary, author row (avatar +
  name + date), tag pills, full markdown body (DOMPurify sanitized),
  zap author button in header and footer, copy nostr: link, njump.me
  fallback on fetch error
- prose-article CSS: reader-optimised typography (15px base, 1.8 line
  height, h2 border, styled blockquote/code/pre/links/images)
- NoteContent: naddr1 clicks for kind 30023 now open ArticleView
  instead of falling through to njump.me
- openArticle(naddr) added to UI store with previousView tracking

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 20:42:13 +01:00
Jure
f04cce744e Fix TypeScript errors blocking production build
- ArticleEditor: annotate map callback parameter as string
- ui.ts: prefix unused get parameter with _ to silence noUnusedLocals

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 19:37:43 +01:00
Jure
bf1d68bb93 Add long-form article editor (NIP-23)
- ArticleEditor with title, markdown body, summary, cover image, tags
- write/preview toggle with markdown rendering via marked
- Auto-save draft to localStorage
- Publish as kind 30023 with NIP-23 tags (d, title, published_at, etc.)
- 'write article' button in sidebar when logged in
- Article preview prose styles in CSS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 19:04:43 +01:00