Commit Graph

8469 Commits

Author SHA1 Message Date
nrobi144 201acc8140 feat: Extract shared UI components to commons for Android/Desktop reuse
Extract reusable components from desktopApp to commons module:

Utilities (commonMain):
- NumberFormatters: countToHumanReadable, countToHumanReadableBytes
- PubKeyFormatter: toShortDisplay, toDisplayHexKey for key formatting

Utilities (jvmAndroid):
- TimeAgoFormatter: Human-readable time formatting for Nostr timestamps
- ZapFormatter: BigDecimal amount formatting with G/M/k suffixes

UI Components (commonMain):
- AppScreen enum for shared navigation
- LoadingState, EmptyState, ErrorState with refresh/retry support
- FeedHeader with relay status indicator
- NoteCard for displaying Nostr notes
- ActionButtons (AddButton, RemoveButton)
- RobohashImage for avatar display
- PlaceholderScreens (Search, Messages, Notifications)
- RelayStatusColors and shared color definitions

UI Components (jvmAndroid):
- LoginCard with key input field
- NewKeyWarningCard for new key backup warnings
- KeyInputField and SelectableKeyText
- ProfileInfoCard for account display
- RelayStatusCard for relay management

Core (jvmAndroid):
- AccountManager with login/logout/key generation
- RelayConnectionManager base class
- RelayStatus and DefaultRelays

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 15:12:04 +02:00
nrobi144 e5a064d0c3 feat: Add expect/actual for blurhash and base64Image in commons
- Create PlatformImage expect/actual abstracting Bitmap/BufferedImage
- Move pure blurhash algorithms (Base83, SRGB, CosineCache, BlurHashEncoder) to commonMain
- Rewrite BlurHashDecoder to return PlatformImage instead of Bitmap
- Add PlatformImage.toBlurhash() extension in commonMain
- Add platform-specific Bitmap.toBlurhash() and BufferedImage.toBlurhash()
- Add base64Image toPlatformImage() for both Android and JVM

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 12:48:32 +02:00
nrobi144 131252f19d feat: Convert commons module to Kotlin Multiplatform
- Rewrite build.gradle.kts for KMP with Android + JVM targets
- Restructure source sets: commonMain, jvmAndroid, androidMain, jvmMain
- Replace android.util.LruCache with androidx.collection.LruCache (KMP-ready)
- Replace android.util.Patterns with local regex constants
- Move shared code to commonMain (icons, hashtags, robohash, compose, etc.)
- Move JVM-shared code to jvmAndroid (richtext, base64Image detection)
- Keep Android-specific code in androidMain (blurhash, bitmap handling)
- Remove @Preview annotations from shared code (Android-only feature)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 07:52:45 +02:00
nrobi144 59eeb1ff0c fix: Use configured relays to initiate subscriptions
The FeedScreen was waiting for connectedRelays to be non-empty before
subscribing, but relays are only added to the NostrClient pool when
subscriptions request them. This created a deadlock where no relays
would ever connect.

Now uses relayStatuses.keys (configured relays) to initiate the
subscription, which triggers the NostrClient to add those relays
to its pool and connect to them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 14:10:02 +02:00
nrobi144 8c8a4ab9e8 feat: Add relay connections, login, and feed view to desktop app
- Add DesktopHttpClient and DesktopRelayConnectionManager for relay WebSocket connections
- Implement AccountManager with key generation and nsec/npub login support
- Create LoginScreen with key import and new key generation UI
- Build FeedScreen with live global feed subscription and note cards
- Add ProfileScreen showing account info and logout
- Update RelaySettingsScreen with connection status and relay management
- Configure JDK 21 toolchain for desktop builds
- Add shared UI analysis documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 14:02:44 +02:00
nrobi144 e441a67e2b fix: Correct compose compiler plugin alias
Use jetbrainsComposeCompiler alias to match version catalog.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 08:24:38 +02:00
nrobi144 82f8bc62a0 feat: Add Compose Multiplatform Desktop support foundation
- Add desktopApp module with JVM entry point and sidebar navigation
- Add Claude specs for AI-assisted development:
  - Agent definitions: nostr-protocol, kotlin-multiplatform, compose-ui, kotlin-coroutines
  - Skills: quartz-kmp conversion, compose-desktop patterns
  - Commands: desktop-run, nip, extract
- Update Gradle configuration with Compose Multiplatform 1.7.1 plugin
- Add coroutines and secp256k1 JVM dependencies to version catalog

Next steps:
- Convert Quartz library to full KMP (expect/actual for crypto)
- Implement relay connections in desktop app
- Share UI components between Android and Desktop

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 08:21:02 +02:00
Vitor Pamplona aa2f969be6 Faster event serializer -> sha256 -> id comparison without creating intermediary buffers. 2025-12-23 09:39:30 -05:00
Vitor Pamplona 01ea413afd Faster SQLLite DB with probabilistic hashvalues 2025-12-22 15:18:59 -05:00
Vitor Pamplona 79d6745ee6 Adds faster parsers for Messages and Commands
Unwraps inline runCatching because it seems faster for some reason.
2025-12-22 14:52:02 -05:00
David Kaspar 2de4d49fd8 Merge pull request #1620 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2025-12-22 20:30:10 +01:00
Crowdin Bot 94f1e45b9a New Crowdin translations by GitHub Action 2025-12-22 19:20:35 +00:00
Vitor Pamplona 10bba83ee3 Faster Event parsers 2025-12-22 14:18:59 -05:00
Vitor Pamplona 59413f3051 Moves type to the when clause 2025-12-22 12:25:07 -05:00
Vitor Pamplona 23a7e3b535 Fixes kind being a number 2025-12-22 12:23:34 -05:00
Vitor Pamplona 4c1fedddef Makes runCatching inline 2025-12-22 12:17:55 -05:00
Vitor Pamplona 14a6ba586a Fixes command parser 2025-12-22 11:19:25 -05:00
Vitor Pamplona 349625f748 simple refactoring 2025-12-22 11:18:28 -05:00
Vitor Pamplona e278982e6d Filters correct events 2025-12-22 11:17:43 -05:00
Vitor Pamplona c7038d695f Adds new tests for rumor and template serializer 2025-12-22 11:07:01 -05:00
Vitor Pamplona eefca1e3f4 Removes unnecessary tests 2025-12-22 08:11:55 -05:00
Vitor Pamplona 37158a83dc Adds a nextLong random method
Adds unbounded methods because they are faster.
2025-12-20 12:26:16 -05:00
Vitor Pamplona e4f3a56851 Removes the Statement cache since statements are not thread safe 2025-12-20 12:25:16 -05:00
Vitor Pamplona 8cbc5f1e93 Faster Array Deserializer 2025-12-19 18:57:12 -05:00
Vitor Pamplona 8d5f866ed0 Merge 2025-12-19 17:47:26 -05:00
Vitor Pamplona 62151727f2 Merge pull request #1619 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2025-12-19 17:45:47 -05:00
Vitor Pamplona 7e65f1afa7 Fixes the Imodule dependency 2025-12-19 17:45:31 -05:00
Crowdin Bot f6890e4e27 New Crowdin translations by GitHub Action 2025-12-19 22:34:14 +00:00
Vitor Pamplona 1dbb5f0c83 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  New Crowdin translations by GitHub Action
2025-12-19 17:31:37 -05:00
Vitor Pamplona 664f0d0d59 Adds a Benchmark to simulate a real use on storage operators 2025-12-19 17:29:23 -05:00
Vitor Pamplona 8d15f0478f Faster MurMur hash for 64bit results. 2025-12-18 17:30:53 -05:00
Vitor Pamplona fde5d57b16 Faster parseResult array builder 2025-12-18 12:08:05 -05:00
Vitor Pamplona 12beeea8ee Adds a module interface for the SQL Lite db with drop functions too 2025-12-18 12:01:17 -05:00
Vitor Pamplona 7840bc3318 Uses in memory DB because that's where the performance hits 2025-12-18 11:57:38 -05:00
Vitor Pamplona d3abc47365 Merge pull request #1618 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2025-12-18 09:40:43 -05:00
Crowdin Bot 26124ba10b New Crowdin translations by GitHub Action 2025-12-18 14:32:20 +00:00
Vitor Pamplona 34355121b1 Merge 2025-12-18 09:28:49 -05:00
Vitor Pamplona 5df019e485 adds kotlin ktx to benchmark 2025-12-18 09:21:40 -05:00
Vitor Pamplona 625a12f4e2 Better way to clear the test db 2025-12-16 18:03:50 -05:00
Vitor Pamplona 9069b11036 small refactoring 2025-12-16 18:03:26 -05:00
Vitor Pamplona 0fb64c5ff7 Fixes new generics on the benchmark classes 2025-12-16 16:57:02 -05:00
Vitor Pamplona 2b865ab56d Fixes assertions after using generics on event stores query 2025-12-16 15:24:59 -05:00
Vitor Pamplona 759971d139 Merge pull request #1614 from davotoula/cleaner-code-pt2
log boolean returned by .delete()
2025-12-16 11:15:52 -05:00
davotoula 3373d3a958 log boolean returned by .delete() 2025-12-16 17:08:44 +01:00
Vitor Pamplona 7c0e0c49d3 Merge pull request #1613 from davotoula/cleaner-code
cleaner code
2025-12-16 11:05:26 -05:00
davotoula aa4270883d correct way to clear collection 2025-12-16 17:00:00 +01:00
David Kaspar 8a5732cc47 Merge pull request #1612 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2025-12-16 15:24:36 +01:00
Crowdin Bot 128155714d New Crowdin translations by GitHub Action 2025-12-16 13:37:17 +00:00
Vitor Pamplona 7b453076db Merge pull request #1609 from davotoula/voice-notes
Create KIND 1222 (voice notes) in amethyst
2025-12-16 08:35:43 -05:00
Vitor Pamplona 769e92f49d Merge pull request #1610 from davotoula/get-identity-claim-fixes
minor bug fix: getIdentityClaimIcon
2025-12-16 08:33:58 -05:00