Commit Graph

45 Commits

Author SHA1 Message Date
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 73fe985a65 Fixes tests 2026-01-13 15:49:08 -05:00
Vitor Pamplona ba5c86fbba Migrates rich text parser from jvm to commons 2026-01-13 15:31:26 -05:00
Vitor Pamplona 42bdd1c831 Emoji State to commons 2026-01-13 14:57:29 -05:00
Vitor Pamplona 7c1053df2d Moves reports to common
Adds support for additional information
2026-01-13 14:37:32 -05:00
Vitor Pamplona 9b7a83796b Moves private chatroom models to commons 2026-01-13 14:33:24 -05:00
Vitor Pamplona afe66cd55f Moves user actions to commons 2026-01-13 14:31:04 -05:00
Vitor Pamplona a8dd229fb2 Moves Channels (public chats, ephemeral channels and live streams) Account modules to commons 2026-01-13 14:30:51 -05:00
Vitor Pamplona 6d15e4861c Moves channels to commons and removes the dependency in the cache from Note 2026-01-13 12:22:40 -05:00
Vitor Pamplona 5241a6dfa7 Fixes missing cache after AI PR for the desktop app
Removes dependency on the Cache from User.
Updates interface methods to match.
2026-01-13 11:27:45 -05:00
Vitor Pamplona e9210872bd Improves performance by precaching signatures before sorting them
Fixes out of order crash when the same signature came back.
2026-01-12 15:29:33 -05:00
nrobi144 ec629ac3fe feat: Extract Card interface and CardFeedState to commons (B1)
- Create commons/ui/notifications/CardFeedState.kt with:
  - Card interface (createdAt, id)
  - CardFeedState sealed class (Loading, Loaded, Empty, FeedError)
  - DefaultCardComparator for sorting

- Update Android imports to use commons Card/CardFeedState:
  - DefaultFeedOrder.kt
  - AccountViewModel.kt
  - CardFeedContentState.kt
  - CardFeedState.kt (now only contains concrete card types)
  - CardFeedView.kt

Part of Phase B (Notifications Feed Extraction) for #1648

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 06:34:14 +02:00
nrobi144 6aacb8e654 move ThreadFilter to commons 2026-01-09 14:40:30 +02:00
nrobi144 a6f49665a7 feat: Extract drawReplyLevel modifier to commons
Move the thread reply level visualization modifier to shared commons
module for use by both Android and Desktop platforms.

- Add ThreadModifiers.kt to commons/ui/thread/
- Update Android ThreadFeedView to use shared modifier
- Add overload for non-State level parameter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 07:14:52 +02:00
nrobi144 9836a47f65 update Android imports 2026-01-09 07:01:36 +02:00
nrobi144 211305c572 A1 extract to commons 2026-01-09 07:01:35 +02:00
Vitor Pamplona 882cf6ee59 Moving OpenGraph parser to commons 2026-01-07 16:34:15 -05:00
Vitor Pamplona cba4d25424 Moves follows and publish to their own packages 2026-01-07 16:16:01 -05:00
Vitor Pamplona 96ae047271 Removes unnecessary file from commons 2026-01-07 14:31:23 -05:00
Vitor Pamplona 60dafd9267 Moves reactions to packages for their nips 2026-01-07 13:26:47 -05:00
Vitor Pamplona e3832ee19b Moves Filters from Common to Desktop 2026-01-07 12:06:28 -05:00
Vitor Pamplona ce01e8f70c moves keystore to commons to avoid unnecessary dependencies on Quartz 2026-01-07 11:09:45 -05:00
Vitor Pamplona 7a7ce69709 Fixes missing tagsAll 2026-01-07 10:54:09 -05:00
nrobi144 a9141763e1 previous PR fixes 2026-01-07 07:12:00 +02:00
nrobi144 2079493fc4 spotless 2026-01-05 13:43:54 +02:00
nrobi144 7d3ac9ec8a add avatars 2026-01-05 13:43:00 +02:00
nrobi144 64eec9844b bugfixes 2026-01-03 13:00:02 +02:00
nrobi144 f800e20b05 reuse some filtering logic 2026-01-03 06:15:37 +02:00
nrobi144 36bb89fd36 update desktop with refactored classes 2026-01-02 14:54:24 +02:00
nrobi144 2751855186 extract actions from amethyst 2026-01-02 13:29:55 +02:00
nrobi144 9b330164a7 use typealiases as references to reduce files changed 2026-01-01 12:41:13 +02:00
nrobi144 4bc7e86448 fixes imports 2026-01-01 07:55:31 +02:00
nrobi144 3750c7e26e fixes 2026-01-01 07:32:44 +02:00
nrobi144 eb47c19172 move models to commons 2026-01-01 07:26:39 +02:00
Vitor Pamplona c5133e98f8 - Fixes Preview Tag
- Fixes Email Pattern
2025-12-29 18:57:56 -05:00
nrobi144 b23ff488ed refactor: Polish shared commons components and fix formatting
- Improve RelayConnectionManager with better connection handling
- Refine UI components (LoginCard, ProfileInfoCard, RelayStatusCard)
- Update KeyInputField with improved layout
- Fix formatting in FeedHeader and AppScreen
- Add proper number formatting utilities
- Remove .claude config from version control

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:03:57 +02:00
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