Commit Graph

226 Commits

Author SHA1 Message Date
Vitor Pamplona 7212e9a879 Adds Relay Url to the Rich Text viewer 2026-03-01 12:45:47 -05:00
Claude 304c348736 feat: add RelayUrlSegment for ws:// and wss:// relay URIs
Adds a new RelayUrlSegment type to RichTextParser that detects and
labels relay URIs (ws:// and wss:// schemes) as a distinct segment
type, separate from generic LinkSegments.

https://claude.ai/code/session_01U21sGdEEMLo4hY8dwxNzPr
2026-03-01 16:33:58 +00:00
Vitor Pamplona 678a97d01b Merge pull request #1727 from kojira/fix/multibyte-url-terminators
fix: treat multibyte characters as URL terminators in RichTextParser
2026-03-01 11:00:21 -05:00
kojira fd28d354e7 fix: treat multibyte characters as URL terminators in RichTextParser 2026-03-01 23:54:12 +09:00
Claude 1efcaefe94 fix: render audio MIME types in imeta tags as playable media
Audio URLs with `audio/*` MIME types in NIP-92 imeta tags were silently
dropped (createMediaContent returned null) because only `image/` and
`video/` prefixes were checked. They now map to MediaUrlVideo, which
Media3/ExoPlayer already handles correctly for audio playback.

Also adds common audio extensions (ogg, wav, flac, aac, opus, m4a) to
the extension-based fallback so audio files without imeta tags are also
detected.

Fixes https://github.com/vitorpamplona/amethyst/issues/1701

https://claude.ai/code/session_01YSi64eXRokSy2GzYHoNFES
2026-02-28 00:34:32 +00:00
Vitor Pamplona 591c32ceb3 Solving some more stability issues 2026-02-25 16:53:50 -05:00
Vitor Pamplona b1fd450c91 Merge branch 'main' into feat/desktop-private-dms 2026-02-24 17:50:48 -05:00
Vitor Pamplona bdc708e658 Fixes stability of the feedstate 2026-02-24 17:01:25 -05:00
nrobi144 78aa7962e9 feat(desktop): add DM broadcast status banner and audit fixes
- Show relay confirmation URLs in broadcast banner
- Add relayUrls field to DmBroadcastStatus.Sent
- Wire send progress tracking with per-relay confirmations
- Fix empty chatroom Loading state transition
- Improve NewDmDialog npub metadata resolution
- Harden sendAndWaitForResponse timeout handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 06:53:53 +02:00
nrobi144 35a15f0462 feat(desktop): add DM broadcast banner and fix empty room loading
- Fix ListChangeFeedViewModel stuck on Loading for empty chatrooms by
  adding invalidateData() call in init block
- Add DmBroadcastStatus sealed class and DmBroadcastBanner composable
  in commons for relay send progress display
- Add DmSendTracker using sendAndWaitForResponse for confirmed delivery
- Wire send tracking through DesktopIAccount into ChatPane banner
- Fix audit risks: unsubscribe DMs on account change, wait for relay
  connect before subscribing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 12:20:04 +02:00
nrobi144 5d983c5d27 fix(desktop): wire gift wrap broadcast for DM reactions
The sendWrappedReaction function was creating NIP-17 gift wraps via
NIP17Factory but never broadcasting them. Added sendGiftWraps() to
IAccount interface with implementations in both Desktop and Android.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:34:33 +02:00
Vitor Pamplona 2c3ca7f906 - Finishes the transition to EventHint objects for building events.
- Removes the "a-tag" dependency on Addressable interface because the `a` can have different names in different objects.
2026-02-18 10:45:50 -05:00
nrobi144 5d81da2486 feat(desktop): add encrypted DMs with split-pane layout (NIP-04/NIP-17)
Full desktop DM implementation with shared components extracted to commons:
- Relay layer: DM relay state, filter construction, subscription coordinator
- Shared: ChatroomFeedFilter, ChatroomFeedViewModel, ChatNewMessageState
- Shared UI: ChatBubbleLayout, ChatMessageCompose, ChatroomHeader, ChatTheme
- Desktop: split-pane (conversation list + chat), keyboard shortcuts, hover reactions
- IAccount extended with signer, sendNip04/17, chatroomList, isAcceptable

Refs: vitorpamplona/amethyst#1704

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:19:46 +02:00
Vitor Pamplona c755908db5 Removes string-concat compiler argument since it is not supported anymore 2026-02-17 19:02:53 -05:00
Vitor Pamplona 713e91185b Merge pull request #1702 from nrobi144/feat/chess-pgn-display-878
chess: live chess game implementation with Jester protocol
2026-02-17 16:12:26 -05:00
Vitor Pamplona f665bec63d adds basic support for NIP85 Polls 2026-02-17 16:00:54 -05:00
nrobi144 5f15f0c3b1 fix: address Copilot review comments
- ChessPosition: include all fields in equals/hashCode
- AcceptedGamesRegistry: add thread safety with synchronized
- ChessEventBroadcaster: use valid filter for connection trigger
- ChessEventBroadcaster: fix misleading relayResults
- Remove println debug logging from ChessSubscription/Broadcaster
- UserProfileScreen: use proper JSON parsing via MetadataEvent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:39:24 +02:00
nrobi144 8d098cf86d feat(chess): focused polling, promotion fix, and game end celebration
- Add focused game mode to ChessPollingDelegate: when viewing a game,
  only that game is polled instead of all active games
- Fix pawn promotion by parsing promotion suffix in publishMove
  (e.g., "e8q" -> "e8" + QUEEN)
- Add game end overlay with victory/defeat/draw celebration
- Remove all debug println statements for production readiness

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:14:34 +02:00
nrobi144 3c89c442bc feat(chess): add slim ViewModels and shared broadcast banner (Steps 7-10)
Step 7: ChessViewModelNew.kt - Slim Android ViewModel (~130 lines)
- Delegates all business logic to ChessLobbyLogic
- Exposes StateFlows from logic.state
- Platform adapter creation only

Step 8: DesktopChessViewModelNew.kt - Slim Desktop ViewModel (~120 lines)
- Same pattern as Android, delegates to ChessLobbyLogic
- UserMetadataCache for profile display
- External CoroutineScope injection

Step 9: ChessBroadcastBanner.kt - Shared Compose banner in commons
- Uses ChessBroadcastStatus from ChessLobbyState
- Works on both Android and Desktop via Compose Multiplatform
- Shows broadcasting progress, sync status, errors

Step 10: UI consumers ready for migration
- New ViewModels use ChessChallenge (enriched display data)
- Shared banner ready to replace Android-only ChessStatusBanner
- Existing screens continue to work with old ViewModel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:14:34 +02:00
nrobi144 42b33ca04c feat(chess): add platform adapters and enhance lobby state (steps 5-6)
- Add ChessLobbyState with completedGames, replaceGameState(), moveToCompleted()
- Add challengerAvatarUrl to ChessChallenge
- Add CompletedGame data class for game history

Platform Adapters:
- AndroidChessAdapter: AndroidChessPublisher, AndroidRelayFetcher, AndroidMetadataProvider
- DesktopChessAdapter: DesktopChessPublisher, DesktopRelayFetcher, DesktopMetadataProvider

Shared Infrastructure:
- ChessRelayFetchHelper for one-shot relay queries
- IUserMetadataProvider interface for platform-specific metadata
- ChessFilterBuilder with simple filter methods for fetchers
- ChessSubscriptionController interface for subscription management

Fix ChessSubscription.kt to remove broken dataSources().chess reference
(subscriptions now managed by ChessLobbyLogic)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:14:34 +02:00
nrobi144 e0d0e33408 refactor impl 2026-02-10 12:14:05 +02:00
nrobi144 607cdf0c17 refactor(commons): migrate chess UI to KMP commonMain
- Move chess UI components from src/main/java to src/commonMain/kotlin
- Add consume functions for chess events in LocalCache
- Resolve merge conflicts with main branch KMP migration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:10:38 +02:00
nrobi144 06accf5831 full chess implementation 2026-02-10 11:58:00 +02:00
nrobi144 18c8156ab2 integrate chess events 2026-02-10 11:56:43 +02:00
nrobi144 19c36c2979 initial nip64 implementation 2026-02-10 11:54:36 +02:00
Vitor Pamplona eb66182211 - Updates several libraries
- Reformats code to the newest Klint
- Fixes isEmpty bug on Filters
2026-02-09 14:06:07 -05:00
Vitor Pamplona 710f15f790 - Fixes copyright using KDoc patterns instead of simpler comments
- Moves spotless and git-hooks to hidden folders
2026-02-09 13:06:41 -05:00
Vitor Pamplona 6125394354 Migrates to AGP 9 2026-02-08 16:33:39 -05:00
Vitor Pamplona 913b694f78 Clean up on unnecessary methods on Note 2026-02-08 11:35:26 -05:00
Vitor Pamplona aa4cfdc237 Small refactoring 2026-02-07 18:54:48 -05:00
Vitor Pamplona 571fb6af4b Moves the new observables to commons 2026-02-07 18:20:50 -05:00
Vitor Pamplona 838fb3ed7e Groups zaps in profile by user
Moves author's zap cache to the Profile viewmodel
Redesigns composables to match.
Updates Notifications to not use the old zap cache.
2026-02-07 17:52:26 -05:00
Vitor Pamplona ea34125fad Moves relays used by each user cache to the new architecture 2026-02-07 14:29:03 -05:00
Vitor Pamplona 03e8316db4 Moves lud06 to lud16 mapping to Quartz 2026-02-07 12:29:13 -05:00
Vitor Pamplona 4e39a531b7 Moves metadata methods from User to UserCache object 2026-02-07 10:18:13 -05:00
Vitor Pamplona 823624f8f2 adds a longer crop for npubs so that we can see vanity keys better when they don't have nip05s or statuses 2026-02-07 10:17:37 -05:00
Vitor Pamplona bab881e75d Moves status to a user property to avoid searching on scrolling 2026-02-06 18:15:12 -05:00
Vitor Pamplona ec629ff081 Migrates contact list management to addressable notes
Creates new observable flows for LocalCache.
2026-02-06 16:12:11 -05:00
Vitor Pamplona 4ced055035 Switches the metadata relay for the relay being used with the most amount of posts to be the relayhint 2026-02-04 17:38:01 -05:00
Vitor Pamplona e6f7a543cd Migrates Desktop App to the new metadata cache. 2026-02-04 15:38:16 -05:00
Vitor Pamplona d2f77ed521 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst: (48 commits)
  Use accountViewModel.viewModelScope instead of rememberCoroutineScope() to allow download/share to finish even when controls auto-close.
  Add content parameter to allow sharing of video from video player
  New Crowdin translations by GitHub Action
  - use a valid hex key - check the value of the tags
  Fixed NullPointerException when filter contain tags
  Fix assertEquals order
  fix Jackson deserialization for empty Filters and add regression test
  New Crowdin translations by GitHub Action
  Consume File.delete() return values Extract duplicated "https://" literal into a private const val HTTPS_PREFIX
  New Crowdin translations by GitHub Action
  New Crowdin translations by GitHub Action
  New Crowdin translations by GitHub Action
  Load and save payment targets
  refactor(commons): migrate from Moko to Compose Multiplatform Resources
  feat(broadcast): Enhance retry, multi-broadcast UI, and post tracking (#1682)
  wip: Add BroadcastTracker to AccountViewModel (#1682)
  feat(broadcast): Add transparent event broadcasting feedback (#1682)
  Enabled the reactions expand control for zapraisers even when there are no zaps
  New Crowdin translations by GitHub Action
  refactor to reduce complexity encodePcmToAac
  ...

# Conflicts:
#	amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedState.kt
2026-02-04 14:35:35 -05:00
Vitor Pamplona 7bc7265757 Refactors the old NIP-05 code on Quartz
New Caching system for User metadata
New Caching system for NIP-05 verifications
2026-02-04 14:31:30 -05:00
Vitor Pamplona c3f09987aa Merge pull request #1676 from nrobi144/nrobi144/phase-2A
Desktop: Basic Search + Bookmarks + Zaps
2026-01-26 09:53:35 -05:00
nrobi144 71e68dc35b refactor(commons): migrate from Moko to Compose Multiplatform Resources
Remove Moko Resources dependency that blocks AGP 9.0 migration.
Migrate to built-in Compose Multiplatform Resources which is compatible
with the new KMP Android plugin.

- Remove moko-resources plugin and libraries from commons module
- Move strings.xml from moko-resources/ to composeResources/values/
- Update imports from SharedRes.strings.* to Res.string.*
- Add compose.components.resources dependency to desktopApp
- Configure resource package as com.vitorpamplona.amethyst.commons.resources

Closes #1675

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:29:55 +02:00
nrobi144 d08aed47e8 Merge upstream/main into nrobi144/phase-2A
Resolved import conflicts caused by package reorganization:
- upstream moved classes to amethyst/service/relayClient/*
- upstream moved models to commons/model/*
- kept our desktop additions (zaps, bookmarks, search)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:04:13 +02:00
nrobi144 8155cfee9d update metadata loading 2026-01-20 15:18:11 +02:00
nrobi144 8f6de1d304 zap updates 2026-01-19 16:32:01 +02:00
davotoula 505a6583ee remove unused imports 2026-01-15 14:20:05 +01:00
Vitor Pamplona 6097a0b5b7 Removes the need for an extra object for the tag array in the custom emoji nip 2026-01-13 17:32:38 -05:00
Vitor Pamplona 04ac40fa1a moves test as well 2026-01-13 16:07:03 -05:00