Commit Graph

95 Commits

Author SHA1 Message Date
Mary Kate Fain 872d319220 Fix compose modal closing when dismissing emoji picker on mobile
Prevent the compose modal from being accidentally dismissed when the user
taps the emoji/GIF picker overlay to close it.  On mobile this was very
easy to trigger, causing the draft to be lost.

Add onInteractOutside and onEscapeKeyDown handlers to the compose modal's
DialogContent that detect when a nested dialog (emoji picker) is open and
prevent the dismiss event from propagating to the parent modal.
2026-03-27 18:31:58 -05:00
Alex Gleason da27054a9b Fix file downloads and URL opening on Capacitor iOS
The <a download> and <a target="_blank"> patterns don't work in
WKWebView. Add downloadTextFile() and openUrl() utilities in
src/lib/downloadFile.ts that use @capacitor/filesystem and
@capacitor/share on native platforms, falling back to standard
browser behavior on web.

Update all call sites: onboarding key download (InitialSyncGate,
SignupDialog), image lightbox buttons (ImageGallery, ProfilePage).

Document Capacitor compatibility constraints in AGENTS.md.
2026-03-27 16:42:36 -05:00
Alex Gleason 3c54cd27fe Fix package-lock name 2026-03-27 15:41:39 -05:00
Alex Gleason c46e7b98e0 npm audit fix 2026-03-26 23:22:21 -05:00
Alex Gleason 58a5c470bd release: v2.1.0 2026-03-26 23:14:03 -05:00
Chad Curtis 51fffc0ae1 Merge branch 'envelope-inbox' into 'main'
Add Letters inbox page with full letter composing from lief

See merge request soapbox-pub/ditto!117
2026-03-27 03:59:48 +00:00
Alex Gleason cbbb576b26 Add release system with semver versioning, changelog, and release skill
- Switch from CalVer (date+SHA) to semantic versioning starting at v2.0.0
- Create release skill (.agents/skills/release/) with full AI-guided release workflow
- Add CHANGELOG.md with initial 2.0.0 entry
- Update CI tag regex to match semver tags (v2.0.0 instead of v2026.03.24-sha)
- Extract changelog content into GitLab release descriptions
- Update Android versionName to 2.0.0 in build.gradle
- Update iOS MARKETING_VERSION to 2.0.0 in pbxproj
- Expose VERSION (semver) and BUILD_DATE (ISO 8601) as build-time constants
- Display version and build date in Settings page footer
- Remove npm release script (releases are now done via the AI skill)
2026-03-26 21:15:35 -05:00
Chad Curtis 848ac15ef0 Fix CI: remove unused prop, centralize color helpers, extract constants, memoize Sets, move @types/dompurify to devDeps 2026-03-26 19:45:51 -05:00
Chad Curtis ae1f97eb08 Letters: bigger wax seals, adaptive text, inline labels, font loading, SVG sticker fix 2026-03-26 19:17:58 -05:00
Chad Curtis 865fabce98 Add Letters inbox page with full letter composing from lief
- Port letter protocol (kind 8211, NIP-44 encrypted) from lief
- LettersPage at /letters with inbox and sent tabs
- ComposeLetterSheet with full stationery, font, frame, sticker, drawing support
- LetterCard with expand-to-read animation and deletion
- LetterPreferencesSection stored in encrypted settings (NIP-78)
- /settings/letters route for letter preferences
- Letters added to sidebar nav
- All letter lib utilities: letterTypes, letterUtils, colorUtils extensions, sanitizeSvg, svgDrawing
- StationeryBackground, StationeryPicker, FramePicker, StickerPicker, DrawingCanvas all ported
2026-03-26 16:11:29 -05:00
Alex Gleason 264358c223 Upgrade @nostrify/nostrify 0.50.5 -> 0.51.0 and @nostrify/react 0.3.0 -> 0.3.1
Includes NRelay1 AUTH fix for correct NIP-42 challenge handling.
2026-03-25 01:37:07 -05:00
Alex Gleason 0666278a58 refactor: use @nostrify/react@0.3.0 for client-initiated NIP-46
Replace inline nostrconnect:// protocol logic with NLogin.fromNostrConnect(),
generateNostrConnectParams(), and generateNostrConnectURI() from upstream
@nostrify/react. Removes ~130 lines of code that is now in the library.
2026-03-24 16:21:00 -05:00
Chad Curtis 9ef6f085a0 Harsher arc curves and move bottom nav items up 2026-03-23 22:40:31 -05:00
Alex Gleason ca1b055dad Add iOS platform support with Capacitor and remote build script
- Add @capacitor/ios dependency and iOS Capacitor platform
- Configure capacitor.config.ts with iOS settings (scheme, background color, content inset)
- Add scripts/build-ios.sh for building iOS over SSH on Mac Mini (orcus.lan)
- Script supports simulator, device, archive, and open-in-Xcode modes
2026-03-23 20:27:13 -05:00
Dirk Rost c58c2f52a0 Revert NIP-46 workaround, bump @nostrify/react to 0.2.31 2026-03-22 23:27:46 +00:00
Alex Gleason 98b254e296 Upgrade @nostrify/nostrify to 0.50.5 and @nostrify/react to 0.2.30 2026-03-21 20:35:01 -05:00
Alex Gleason b28f6f1336 npm audit fix 2026-03-20 04:15:49 -05:00
Alex Gleason 8ea370067b Add screenshot lightbox modal to Zapstore app events 2026-03-19 18:10:36 -05:00
Mary Kate c3a4d8be57 Fix sticky tabs not scrolling to top on click or switch 2026-03-17 19:46:44 +00:00
Alex Gleason 9dbf364f37 feat: generate sitemap.xml at build time via PUBLIC_URL env var
Add a Vite plugin that writes a sitemap.xml containing all static
routes to the build output. Enabled by setting the PUBLIC_URL
environment variable (e.g. PUBLIC_URL=https://ditto.pub) in .env
or the shell. When PUBLIC_URL is not set, no sitemap is generated.

Also fix a pre-existing LSP type error caused by importing Plugin
from 'vite' while defineConfig came from 'vitest/config' (which
bundles a different vite version). Now both come from 'vite'.
Add explicit 'import process' for node:process.
2026-03-16 15:22:23 -05:00
Chad Curtis 7034c54bbb Fix zapstore publish version by injecting tag into zapstore.yaml 2026-03-16 03:34:50 -05:00
Alex Gleason 80a2d3d846 Remove 'View on njump.me' from profile dropdown menu 2026-03-15 04:33:14 -05:00
Chad Curtis b76bf7b198 Condense notifications and add per-type notification preferences
- Group reactions, reposts, and zaps on the same post into a single condensed
  row with stacked actor avatars (up to 5 + overflow count); single-actor
  interactions use the original compact layout
- Deduplicate actors by pubkey within groups
- Sum zap totals across all actors in a zap group
- Add notificationPreferences per-type settings (reactions, reposts, zaps,
  mentions, comments, onlyFollowing) to EncryptedSettings and Zod schema
- Per-type kind toggles and onlyFollowing applied at relay query level (kinds
  array + authors filter), not client-side; query key includes kindsKey and
  authorsKey so preference changes trigger a fresh fetch
- Default push notifications to enabled
- Notification settings UI matches ContentSettings exactly: section headers
  with accent underline, p-4 wrapper, broken border rows (border-b on outer
  wrapper div), sub-section labels, w-[52px] switch column, KindBadges
- Add 'Only from people I follow' toggle under Filter sub-section
- Filter and push notification prefs also respected in useNativeNotifications
  web push subscription via stable ref
2026-03-14 19:06:31 -05:00
Alex Gleason 6c67b34c60 npm audit fix 2026-03-13 17:08:49 -05:00
Dirk Rost b9c590598d Merge main into feature/development-feed and fix lint issues
Resolve merge conflicts from badges, books, help, and emojis rename.
Fix biome lint: add type="button" to all buttons, use template literals,
format new components with project conventions.
2026-03-13 16:34:36 -05:00
Alex Gleason 77d9375fca Upgrade to Vite 8 with Rolldown and switch to @vitejs/plugin-react v6
Replace Vite 6 (esbuild + Rollup) with Vite 8 (Rolldown), reducing
build times from ~12s to ~3.5s. Switch from the archived
@vitejs/plugin-react-swc to @vitejs/plugin-react v6 which uses Oxc
for React Refresh transforms.
2026-03-13 16:07:51 -05:00
Alex Gleason f4a0f3975a Add optional Plausible analytics via @plausible-analytics/tracker
Dynamically imports and initializes Plausible when the
VITE_PLAUSIBLE_DOMAIN env variable is set at build time.
When unset, the tracker code is never loaded.
2026-03-10 13:27:42 -05:00
Mary Kate Fain 405fcde5ad Add FAQ help tips to settings pages for confusing Nostr concepts
Create a reusable HelpTip component that shows a (?) icon popover with
FAQ content pulled from helpContent.ts, linking to the full Help page.

Place tips in settings where normie users are likely confused:
- Network settings: Relays and Blossom Servers section headers
- Wallet settings: NWC section header and zaps empty state
- Notification settings: next to 'zaps' in push notification description
- Profile settings: next to the Lightning address field
- Relay list manager: next to 'Your Relays' header (also remove NIP-65 jargon)
- Content settings: next to subtitle mentioning Nostr content types
2026-03-07 19:58:29 -06:00
Alex Gleason 57f9aab0a3 Remove welcome step from onboarding dialog 2026-03-07 18:52:05 -06:00
Chad Curtis c7f3211b7d Add user lists, follow packs, home feed tabs, and list-based feed filtering
- Add NIP-51 Follow Sets management (useUserLists, UserListsPage at /lists)
- Add Follow Packs support (useFollowPacks) for curated people lists
- Add FeedEditModal for creating/editing home feed tabs with author scope,
  kind picker, and list/pack author population
- Add AddToListDialog accessible from the note more-menu
- Unify home feed tab resolution with profile tabs via useResolveTabFilter,
  supporting $follows variable expansion
- Wire People filter in Search and FeedEditModal with list/pack picker
- Extract shared ScopeToggle, ListPackPicker, parseSelectedKinds primitives
  into SavedFeedFiltersEditor to eliminate duplication across three call sites
- Cache savedFeeds in AppConfig for instant tab render on load
- Strip orphaned profile-destination entries from encrypted settings on read
2026-03-06 17:23:47 -06:00
Alex Gleason 41eb5a4ef0 Add subdivision support with Wikipedia data, proper names, and thumbnail flags 2026-03-05 23:27:47 -06:00
Chad Curtis af3684fe40 Fix author filter: use profile search dropdown, only commit on selection
- Replace the raw text Input in the author filter with ProfileSearchDropdown
  so users get the same typeahead + avatar dropdown as the main search bar
- Add hideCountry prop to ProfileSearchDropdown to suppress country suggestions
  in contexts where they are irrelevant
- Author filter only writes to URL when a profile is explicitly selected from
  the dropdown (immediate commit) — typing alone never updates the URL, so
  slow per-keystroke relay queries no longer cause the filter to thrash
- Show a chip with the selected author's display name and an X to clear,
  replacing the dropdown while an author is active
- Add commitAuthor / clearAuthor helpers that keep the URL param and the
  display label in sync; resetFilters also clears the display label
2026-03-05 21:14:30 -06:00
Alex Gleason 35bc1a0438 Add configurable homepage route and show all items in mobile sidebar
- Add homePage config field (default: 'feed') that determines which
  sidebar item renders at the '/' route
- Any sidebar item can be set as the homepage via Feed settings
- The feed is always accessible at /feed when not configured as home
- Normalize sidebar item IDs: every item follows path === '/' + id
  (feed path changed from '/' to '/feed', emoji-packs renamed to emojis)
- Remove BOTTOM_NAV_ITEMS filter from MobileDrawer so all sidebar
  items are visible on mobile (feed, notifications, search included)
- Mobile bottom nav dynamically reflects the configured homepage icon
- Homepage setting syncs across devices via encrypted settings
- Add emoji-packs -> emojis migration for existing sidebar orders
2026-03-05 15:23:43 -06:00
Mary Kate Fain 706816478c Add Clear Sky Vibes theme preset with magenta primary and cyan text 2026-03-04 19:40:23 -06:00
Mary Kate Fain 8f140c4eaa Add bundled fonts and background images for all 8 new theme presets
Install Cinzel, Nunito, Quicksand, Courier Prime, and Comic Neue as
bundled fonts and register them in the font registry. Add Unsplash
background images to every new preset (Gothic, Cottage, Candy Heart,
Midnight, Hologram, Floret, Win 95, Plush).
2026-03-04 19:34:24 -06:00
Alex Gleason f5bc5fdbe4 Upgrade Nostrify (to fix NIP-05 signer issue) 2026-03-04 15:55:57 -06:00
Chad Curtis 8db2abe23b npm audit + npm dedupe + npx depcheck missing packages 2026-03-04 02:58:10 -06:00
Alex Gleason f1191299e8 Add Sentry integration with lazy loading and user-configurable DSN
Sentry SDK is loaded via dynamic import() only when a DSN is configured
and error reporting is enabled, keeping it out of the initial bundle.
Users can control error reporting via a toggle and DSN field in
Advanced Settings, with the DSN synced across devices via encrypted
NIP-78 settings. The ErrorBoundary now reports fatal crashes to Sentry
with component stack context, and a beforeSend hook censors nsec
private keys before any data leaves the browser.
2026-03-03 17:25:14 -06:00
Alex Gleason 80eac87a15 Upgrade @nostrify/nostrify to 0.50.3 and @nostrify/react to 0.2.28
Fixes race condition where NBrowserSigner would throw 'Browser extension
not available' when app code accessed signer.nip44 before the extension's
content script had injected window.nostr on page reload.
2026-03-03 17:14:10 -06:00
Chad Curtis 7aaa3e2587 Add interactive profile editor with live card, image crop, and onboarding integration 2026-03-03 07:31:06 -06:00
Chad Curtis 485e7cd1c9 refactor(photos): DRY up PhotosFeedPage by extending Lightbox instead of custom overlay
Replace the bespoke PhotoSlide / PhotoCard / PhotoDetailOverlay stack (~250 lines) with a
thin extension of the existing Lightbox component. Lightbox gains bottomBar, onNextEvent,
and onPrevEvent props; ImageGallery forwards them through. PhotosFeedPage now opens a plain
Lightbox with author info + reactions injected via bottomBar, and cross-event swipe/keyboard
navigation wired through onNextEvent/onPrevEvent. Page shrinks from 626 → ~300 lines.
2026-03-02 17:30:46 -06:00
Alex Gleason 53757a3886 Increase eoseTimeout to 300ms 2026-03-02 10:12:08 -06:00
Derek Ross addbece173 Add NIP-30 custom emoji picker support (kind 10030)
Integrate custom emojis from the user's kind 10030 emoji list into
the emoji picker, compose flow, reactions, and DMs:

Hook:
- useCustomEmojis: query kind 10030, extract emoji shortcode/url pairs

EmojiPicker:
- Accept customEmojis prop, render as dedicated 'Custom' tab via
  emoji-mart's custom categories feature
- Changed onSelect from string to EmojiSelection union type
  (native unicode | custom shortcode+url)

ComposeBox:
- Pass custom emojis to picker, insert :shortcode: on selection
- Scan content on publish for :shortcode: patterns, cross-reference
  against user's emoji list, add ['emoji', name, url] tags (NIP-30)

QuickReactMenu:
- Custom emoji reactions: content=':shortcode:', with emoji tag
- Optimistic cache update includes custom emoji URL/name

DMChatArea:
- Pass custom emojis to picker, insert :shortcode: text

Settings:
- Registered as 'Custom Emojis' in Other Stuff > Whimsy section
- showCustomEmojis toggle (default true) gates all custom emoji
  features — when disabled, no kind 10030 queries are made
- Fix pre-existing Bot icon missing import in sidebarItems
2026-03-01 20:28:08 -05:00
Alex Gleason 477257325c mew -> ditto 2026-03-01 17:50:50 -06:00
Chad Curtis 708dd23fc4 Add follows feed reply filter and fix feedSettings deep-merge for new keys 2026-02-28 20:27:03 -06:00
Alex Gleason fcd32f1bd4 Replace Twitter widgets.js with direct iframe embed, remove CSP exception 2026-02-28 18:46:25 -06:00
Mary Kate Fain 6598a0363a Fix lint errors: remove unused useEffect import, prefix unused schema
- ThemeSelector.tsx: remove unused useEffect import
- useBookInfo.ts: prefix OpenLibraryBookSchema with _ (only used for type inference)
2026-02-28 18:30:47 -06:00
Alex Gleason 7afe8efa21 Add profile preview at top of comment threads on person profiles
When viewing a kind 1111 comment thread where the root is a person
(kind 0 profile), show a compact profile preview card with avatar,
name, and NIP-05 at the top of the page, similar to how external
content previews are shown for URLs/books/countries.
2026-02-28 18:14:28 -06:00
Chad Curtis da1533bccf Unify sidebar icon/label sources of truth and rename items
- Create extraKindIcons.ts as single source of truth for extra-kind icons
- BUILTIN_ICON_COMPONENTS in SidebarNavItem covers system items only
- sidebarItemIcon() merges both maps; all pages/routes use it
- EXTRA_KINDS is now source of truth for labels and kind numbers in AppRouter, page titles, and onboarding (CONTENT_KINDS derived from EXTRA_KINDS)
- Remove themes from BUILTIN_SIDEBAR_ITEMS (it lives in EXTRA_KINDS)
- Delete dead SIDEBAR_ITEM_ICONS export
- Rename 'Theme' → 'Vibe', 'Colors' → 'Color Moments'
- Articles icon: FileText → BookOpen; Settings icon: Settings → Scroll
- Hide Vibe settings back button on non-mobile (md:hidden)
- Settings and Bookmarks page headers aligned to same structure
- Codex of Configuration opacity 40% → 60%
2026-02-28 03:12:51 -06:00
Alex Gleason 874c374434 Make flag emojis in post content clickable, linking to /i/iso3166:<CODE> pages 2026-02-28 00:19:36 -06:00