Commit Graph

9183 Commits

Author SHA1 Message Date
M 4ecfbbb844 fix: add missing StateFlow import, merge duplicate KDoc blocks, and fix rebase conflicts
- Add missing 'import kotlinx.coroutines.flow.StateFlow' in SearchBarViewModel.kt
- Merge duplicate KDoc blocks on nameShowWithFallback in ElectrumXClient.kt
- Move NamecoinLookupException to ElectrumXServer.kt (avoid redeclaration)
- Remove duplicate NameShowResult/ElectrumxServer from ElectrumXClient.kt
- Fix ElectrumxClient -> ElectrumXClient renames in NamecoinNameService
- Extract namecoinElectrumxClient in AppModules.kt for NamecoinNameService.init()
- Update package paths from nip05.namecoin to nip05DnsIdentifiers.namecoin
2026-03-06 14:22:49 +11:00
M 050fd3a412 feat: propagate distinct error types from ElectrumX to search UI
Add NamecoinLookupException sealed class to distinguish:
- NameNotFound: name queried successfully but doesn't exist on blockchain
- NameExpired: name exists but expired (>36000 blocks since last update)
- ServersUnreachable: all ElectrumX servers failed with connection errors

Previously, all three cases returned null from nameShowWithFallback,
making it impossible for the UI to show meaningful feedback.

Changes:
- ElectrumxClient.connectAndQuery: throws NameNotFound/NameExpired
  instead of returning null for definitive blockchain answers
- ElectrumxClient.nameShow: lets NamecoinLookupException propagate
  (only catches connection/IO errors as null)
- ElectrumxClient.nameShowWithFallback: short-circuits on NameNotFound/
  NameExpired (no point trying other servers for definitive answers),
  throws ServersUnreachable when all servers fail with connection errors
- SearchBarViewModel: new namecoinSearchState flow with typed states
  (Idle/Loading/Resolved/NotFound/Expired/ServersUnreachable) for UI
  to show loading spinners, resolved profiles, and specific error
  messages. Derived namecoinResolvedUser from this flow.

Discovered while porting to notedeck (damus-io/notedeck#1314).
2026-03-06 14:15:11 +11:00
M ee418bdd0a fix: address race conditions and improve Namecoin NIP-05 resolution
Fixes discovered while porting Namecoin NIP-05 to Primal Android
(PrimalHQ/primal-android-app#934):

1. Race condition: stale intermediate lookups overwrite final result
   - Changed map to mapLatest in SearchBarViewModel so that previous
     in-flight ElectrumX lookups are cancelled when the query changes
   - Without this, typing 'd/testls' character by character causes
     stale results from 'd/test', 'd/testl' etc. to arrive after
     the correct 'd/testls' result and overwrite it with null

2. CancellationException swallowed in catch block
   - mapLatest cancels previous coroutines via CancellationException
   - The generic catch was catching it and emitting null, wiping the
     valid result. Now re-throws CancellationException

3. Root lookup fails when names object has no underscore key
   - extractFromDomainValue tried names[localPart] then names[underscore]
     which is the same thing for root lookups
   - Now falls back to first available entry for root lookups when
     no underscore key exists
   - Non-root lookups still fail correctly (no false matches)

4. Global Mutex serializes all lookups
   - Single Mutex in ElectrumxClient blocked unrelated lookups to
     different servers. A 25s timeout on one server stalled everything
   - Now uses per-server mutexes via ConcurrentHashMap

5. customServers set but never read
   - NamecoinNameService.setCustomServers() stored the list but the
     resolver was constructed with the default serverListProvider
   - Now wires customServers through to the resolver

6. resolveLive uses orphaned CoroutineScope
   - Now accepts an optional external scope parameter so callers can
     tie resolution to their own lifecycle

Adds 2 new tests: root fallback to first entry, non-root no-fallback.
2026-03-06 14:14:29 +11:00
Vitor Pamplona 0e124f3017 Merge pull request #1769 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-04 17:18:51 -05:00
Crowdin Bot 52ec6eded8 New Crowdin translations by GitHub Action 2026-03-04 22:09:54 +00:00
Vitor Pamplona 6be2c7cbdf Merge pull request #1768 from vitorpamplona/claude/add-drag-drop-reactions-43YJ2
Replace move buttons with drag-to-reorder in reactions settings
2026-03-04 17:08:14 -05:00
Claude c2384d2082 feat: add drag-and-drop reordering for reaction row items
Replace up/down arrow buttons with a drag handle icon that supports
long-press drag gestures for reordering reaction items in settings.
Items visually lift with elevation and scale during drag, and swap
positions when dragged past neighboring item thresholds.

https://claude.ai/code/session_01RYsPFgnoeJ3BmwjFPMvTuU
2026-03-04 21:32:09 +00:00
David Kaspar 13dadeda37 Merge pull request #1767 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-04 20:13:57 +00:00
Crowdin Bot 9f772b0e13 New Crowdin translations by GitHub Action 2026-03-04 20:12:55 +00:00
Vitor Pamplona 9b9c2a722a Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  New Crowdin translations by GitHub Action
2026-03-04 15:09:40 -05:00
Vitor Pamplona c95a9842a4 Adds the latin1 characters to the ascii block to avoid splitting words 2026-03-04 15:09:26 -05:00
David Kaspar 82ff8010c5 Merge pull request #1766 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-04 19:57:11 +00:00
Crowdin Bot 3a97f89199 New Crowdin translations by GitHub Action 2026-03-04 19:42:16 +00:00
Vitor Pamplona 2f94b3cb15 Adds the latin1 characters to the ascii block to avoid splitting words 2026-03-04 14:38:48 -05:00
Vitor Pamplona be5c1f4832 Removes encrypted data from search 2026-03-04 13:56:06 -05:00
Vitor Pamplona a536cc6f82 Merge pull request #1764 from greenart7c3/claude/reactions-settings-HhrO0
Add customizable reactions row settings screen
2026-03-04 13:35:03 -05:00
Vitor Pamplona 4839535355 Fixes test case for new class names 2026-03-04 13:29:09 -05:00
greenart7c3 4bd0ed97aa Explicit imports 2026-03-04 14:46:44 -03:00
Claude d2d887a782 feat: Add reactions row settings (enable/disable, order, show/hide counters)
Add a new Reactions Settings screen that allows users to:
- Enable or disable each reaction button (Reply, Boost, Like, Zap, Share)
- Reorder reaction buttons with up/down arrows
- Show or hide the counter for each reaction type

Changes:
- AccountSyncedSettingsInternal: Add ReactionRowAction enum, ReactionRowItem
  data class, and reactionRowItems field to AccountReactionPreferencesInternal
- AccountSyncedSettings: Wrap reactionRowItems in MutableStateFlow
- AccountSettings/Account: Add changeReactionRowItems methods
- AccountViewModel: Add reactionRowItemsFlow() and changeReactionRowItems()
- ReactionsRow: Add showCounter param to BoostReaction, LikeReaction,
  ZapReaction, ReplyReaction variants; refactor GenericInnerReactionRow to
  render dynamically based on settings
- New ReactionsSettingsScreen with per-button enable/counter toggles and
  move-up/move-down ordering
- Routes, AppNavigation, AllSettingsScreen: wire up new settings screen

https://claude.ai/code/session_01QizUFfWDeKjLK2SuhanipJ
2026-03-04 17:24:25 +00:00
Vitor Pamplona fbbc506e84 updates all dependencies 2026-03-04 12:19:57 -05:00
Vitor Pamplona 1fa93788db android target seems to be creating some issues between plugin dependencies after adding spm 2026-03-04 12:19:47 -05:00
Vitor Pamplona da01c6ccd1 Moves smp plugin to version catalog 2026-03-04 12:18:55 -05:00
Vitor Pamplona 67390bb8ec Updating Coil 2026-03-04 12:18:11 -05:00
Vitor Pamplona d662cd6b64 Merge pull request #1757 from KotlinGeekDev/kmp-completeness
KMP Completeness, Part 1.
2026-03-04 10:27:24 -05:00
Vitor Pamplona 089600d7f0 Fixes test case 2026-03-04 10:26:21 -05:00
Vitor Pamplona 8501c86663 Further organizes Calendar events 2026-03-04 10:25:51 -05:00
Vitor Pamplona d3bab2f8cb Separate generics functions 2026-03-04 10:19:10 -05:00
Vitor Pamplona b563ab44b0 Merge pull request #1762 from vitorpamplona/claude/nip52-calendar-compliance-yXoXR
Add NIP-52 Calendar event builders and tag helpers
2026-03-04 10:06:03 -05:00
Vitor Pamplona ac936dc673 minor adjustment 2026-03-04 10:02:23 -05:00
Vitor Pamplona 470b1680d0 Moves electrum client to the jvmAndroid scope 2026-03-04 10:00:33 -05:00
Vitor Pamplona 193561c336 Migrates to LruCache 2026-03-04 09:32:31 -05:00
Vitor Pamplona c10f7a0ef2 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  New Crowdin translations by GitHub Action
2026-03-04 09:32:20 -05:00
Vitor Pamplona 9abd61e2de Improves package layout for nip64 chess 2026-03-04 09:25:38 -05:00
Vitor Pamplona 46dcd105c8 Organizes Chess class and common tags 2026-03-04 09:19:39 -05:00
Vitor Pamplona 4060bef2be Lint 2026-03-04 09:19:21 -05:00
KotlinGeekDev ff7aa3df79 Merge branch 'vitorpamplona:main' into kmp-completeness 2026-03-04 14:40:12 +01:00
David Kaspar aab0785626 Merge pull request #1763 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-04 13:37:57 +00:00
Crowdin Bot af589afa4d New Crowdin translations by GitHub Action 2026-03-04 13:34:05 +00:00
Vitor Pamplona 01a45d3b65 Merge pull request #1761 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-04 08:30:46 -05:00
Vitor Pamplona ad578b394d Merge pull request #1759 from vitorpamplona/claude/refactor-nip64chess-structure-3iFIB
refactor: restructure nip64Chess to match nip88Polls pattern
2026-03-04 08:30:35 -05:00
Vitor Pamplona 0ebbd54498 Merge pull request #1734 from mstrofnone/feature/namecoin-nip05-resolution
feat: Namecoin NIP-05 identity verification via ElectrumX
2026-03-04 08:30:21 -05:00
Vitor Pamplona e065cbc63b Merge branch 'main' into feature/namecoin-nip05-resolution 2026-03-04 08:29:48 -05:00
Claude c00295f6f2 feat: implement full NIP-52 calendar spec compliance
- CalendarDateSlotEvent (31922): Add title, summary, image, geohash,
  hashtags, participants, references, multiple locations accessors and
  build() method with DSL builder pattern
- CalendarTimeSlotEvent (31923): Fix timezone bug (startTzId/endTzId
  were parsed as Long instead of String), add all accessors like
  DateSlot, rename startTmz/endTmz to startTzId/endTzId, add build()
- CalendarRSVPEvent (31925): Remove incorrect location/start/end
  accessors (not in spec), add status/freebusy/calendarEventAddress/
  calendarEventId/calendarEventAuthor accessors, update from outdated
  L/l label format to current status/fb tag format, add build()
- CalendarEvent (31924): Add title and calendarEventAddresses accessors,
  add build() method
- Create NIP-52 tag classes: LocationTag, RSVPStatusTag (with enum),
  FreeBusyTag (with enum)
- Create TagArrayBuilderExt.kt with DSL builder extensions for all
  four calendar event types

https://claude.ai/code/session_01UMXgE3tNftmqNZqcYwF2kL
2026-03-04 13:29:04 +00:00
Crowdin Bot a5fe5836e5 New Crowdin translations by GitHub Action 2026-03-04 13:28:27 +00:00
Vitor Pamplona 755df5e60e Merge pull request #1760 from nrobi144/feat/desktop-deck-layout
feat(desktop): multi-column deck layout with single-pane toggle
2026-03-04 08:26:32 -05:00
KotlinGeekDev 4cea4e4f5d Fix issues needing a fix caught by review. 2026-03-04 13:51:46 +01:00
KotlinGeekDev 7b6db9404c Merge branch 'vitorpamplona:main' into kmp-completeness 2026-03-04 13:21:27 +01:00
nrobi144 db530a6820 fix(desktop): audit fixes for deck layout
Critical:
- GlobalFeed now renders global feed (was identical to HomeFeed)
- DeckState uses atomic _columns.update{} instead of non-atomic .value=
- lastKnownWidth marked @Volatile for thread safety

Medium:
- save() debounced 500ms via coroutine (was sync disk I/O per drag frame)
- Width redistribution fills gaps after clamping on column remove
- Hashtag column pre-fills search query
- ColumnNavigationState.stack exposed as StateFlow not MutableStateFlow
- Settings column deduped (focuses existing instead of adding duplicate)
- Exceptions logged in save/load instead of silently swallowed

Low:
- Thread column icon fixed (was Home, now Article)
- Drag divider hit target widened to 12dp (visual stays 4dp)
- Horizontal scroll added for column overflow
- Auto-fit columns on first composition / window resize
- Column shortcuts limited to actual column count
- Deterministic default column IDs
- Overlay fallback shows message instead of blank

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:02:22 +02:00
nrobi144 73b8059b55 feat(desktop): collapsible info panel in chess deck column
Hide GameInfo/MoveHistory/Actions panel by default in deck view
with a chevron toggle to expand. Add Chess to AddColumnDialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 09:45:01 +02:00
nrobi144 991ac3b31b merge: integrate upstream main with chess PR #1702
Resolves merge conflicts in Main.kt, adds Chess column type
to deck layout (DeckColumnType, ColumnHeader, DeckColumnContainer,
DeckState, SinglePaneLayout, View menu). Updates DesktopMessagesScreen
calls for new relayManager/localCache params.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 09:33:44 +02:00