Commit Graph

9296 Commits

Author SHA1 Message Date
Vitor Pamplona be09cc8aa3 Merge pull request #1783 from vitorpamplona/claude/improve-urldetector-readability-lqyci
refactor: improve URLDetector readability
2026-03-08 09:57:56 -04:00
M 55c45480b4 feat: add custom ElectrumX server settings for Namecoin resolution
Add a 'Namecoin Resolution' section that lets users configure custom
ElectrumX servers for .bit / d/ / id/ name resolution. When custom
servers are configured, they are used EXCLUSIVELY — the hardcoded
public defaults are completely ignored. This gives privacy-conscious
users full control over which servers observe their name lookups.

Server format: host:port (TLS default) or host:port:tcp (plaintext).
Supports .onion addresses for Tor-routed lookups.

New files:
  NamecoinSettings.kt
    Immutable settings data class with server string parsing/formatting.

  NamecoinSharedPreferences.kt
    DataStore-backed persistence following the TorSharedPreferences
    pattern. Provides a synchronous snapshot for the serverListProvider
    lambda and observable StateFlow for the UI.

  NamecoinSettingsSection.kt
    Compose UI: enable/disable toggle, active server display with
    DEFAULT/CUSTOM badge, add/remove servers with validation, reset.

  NamecoinSettingsTest.kt
    Unit tests for parsing, formatting, round-trips, and edge cases.

Integration:
  AppModules.kt — added namecoinPrefs (NamecoinSharedPreferences) and
  wired customServersOrNull into the existing serverListProvider so
  user-configured servers take priority over the Tor/default logic.

Refactored from an earlier patch to avoid duplicating code already in
main. The quartz-layer ElectrumXClient, NamecoinNameResolver, and
supporting types are reused unchanged.
2026-03-08 16:16:22 +11:00
M 8456b38dea feat: import follow list with Namecoin resolution during signup
Add a new signup step that lets users bootstrap their feed by importing
another profile's follow list. Supports all identifier types:

  - npub1... (NIP-19 bech32)
  - 64-char hex pubkey
  - alice@example.com (NIP-05 HTTP)
  - alice@example.bit / d/name / id/name (Namecoin blockchain)

Flow: Enter identifier → Resolve → Fetch kind 3 → Preview with
select/deselect → Apply follows → Done. Users can search multiple
profiles before continuing.

Changes to existing files:
  - NamecoinNameResolver: add resolveDetailed() + NamecoinResolveOutcome
  - NamecoinNameService: add resolveDetailed(), resolvePubkey()
  - AccountSessionManager: add isNewAccount flag, finishNewAccountSetup()
  - AccountScreen: route new accounts to ImportFollowListSection

New files:
  - FollowListImporter: identifier resolution + kind 3 fetch + parsing
  - ImportFollowListViewModel: state machine for the import flow
  - ImportFollowListScreen: UI with preview, select/deselect, search again
  - FollowListImporterTest: 14 unit tests
2026-03-08 15:38:54 +11:00
Claude 233d0bf089 feat: improve Zap Settings UI with sections, chips, and animations
- Organize zap settings into three clear sections with primary-colored
  headers: Quick Zap Amounts, Zap Privacy, and Nostr Wallet Connect
- Replace plain Buttons with InputChip for amount selection — each chip
  shows a lightning bolt, the amount, and a close icon to remove it
- Add animateContentSize() to the chips FlowRow so adding/removing
  amounts animates smoothly
- Add descriptive sub-text under each section header explaining what
  the control does
- NWC section: show an animated "Connected / Not Connected" status badge
  (green CheckCircle vs grey RadioButtonUnchecked) that cross-fades via
  AnimatedContent when the connection state changes
- NWC section: add animateColorAsState for the status color transition
- Replace the bare icon-only Add button with an OutlinedButton labelled
  "Connect Wallet" for better discoverability
- Move the manual pubkey/relay/secret fields into a collapsible
  "Advanced" row animated with AnimatedVisibility (expandVertically +
  fadeIn/fadeOut). The section auto-expands when a connection already
  exists or when a QR/clipboard import populates the pubkey field
- Add 9 new string resources for the new UI copy

https://claude.ai/code/session_01QzBq319fsxhrT91bGxws6N
2026-03-08 02:09:28 +00:00
Claude 812f465608 refactor: improve URLDetector readability
- UrlDetector: simplify space handler in readDefault() — both branches
  of if/else were calling the same readEnd(InvalidUrl), making the
  conditional dead code; now we always call readEnd after attempting
  to read the domain
- UrlDetector: remove redundant inner buffer.isNotEmpty() check in
  readEnd(), already guarded by the outer condition
- UrlDetector: rename processColon() parameter from length to
  startLength to eliminate the var length = length self-shadowing
- UrlDetector: replace ArrayList<Url>() with mutableListOf<Url>()
  for idiomatic Kotlin
- DomainNameReader: replace lastSection.deleteRange(0, lastSection.length)
  with lastSection.clear() which expresses the intent directly
- DomainNameReader: move isDotPercent() and isXn() extension functions
  from inside the class body to private file-level functions — extension
  functions defined on a class instance are unusual and confusing

https://claude.ai/code/session_01Pci2AC45yQxQw6F6g7jWdd
2026-03-08 00:54:38 +00:00
David Kaspar 46d54d2826 Merge pull request #1782 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-07 22:09:58 +00:00
Crowdin Bot e94985c614 New Crowdin translations by GitHub Action 2026-03-07 22:03:53 +00:00
Vitor Pamplona 9054e45310 Fixes test case 2026-03-07 16:55:12 -05:00
Vitor Pamplona 2059f46c42 Make Urls Stable 2026-03-07 16:55:04 -05:00
Vitor Pamplona e6e697a5f8 Adds the full list of URLs to the Desktop app 2026-03-07 16:54:47 -05:00
Vitor Pamplona 0e3ca7ac35 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst: (35 commits)
  New Crowdin translations by GitHub Action
  fix chess tests
  Replace subsequent checks with '!isNullOrEmpty()' call
  use forEach: no intermediate list created.
  Use filterIsInstance to avoid dual iteration
  Lambda argument should be moved out of parentheses
  replace null checks with Elvis
  merge call chain with flatMap (slight performance improvement)
  New Crowdin translations by GitHub Action
  New Crowdin translations by GitHub Action
  update cz, pt, de, sv
  was this meant to be withContext?
  add names to boolean params
  remove unused imports
  Explicit type arguments can be inferred
  remove redundant modifiers
  correct package name
  If-Null return/break/... foldable to '?:'
  Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
  Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
  ...

# Conflicts:
#	amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/ReactionsSettingsScreen.kt
2026-03-07 16:47:16 -05:00
Vitor Pamplona 966d02d89e Removes top level domain number of char limitations to accept nostr: uris 2026-03-07 16:41:11 -05:00
Vitor Pamplona e3f99051db Applies new UrlDetector to the RichTextViewer 2026-03-07 16:38:25 -05:00
Vitor Pamplona 030921c963 Adds treatment for the transition between ASCII and non-ASCII in the middle of urls 2026-03-07 15:19:24 -05:00
Vitor Pamplona 5e1a193f78 only http for the url previews 2026-03-07 11:08:38 -05:00
Vitor Pamplona 109a5e7cd7 Adds single label domains to parse nostr: urls too 2026-03-07 10:51:19 -05:00
David Kaspar 864555bc0f Merge pull request #1781 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-07 07:31:54 +00:00
Crowdin Bot ec0fca24c6 New Crowdin translations by GitHub Action 2026-03-07 01:23:23 +00:00
Vitor Pamplona feeba9bf90 Merge pull request #1780 from davotoula/lint-fixes-pt2
Lint fixes pt2
2026-03-06 20:21:54 -05:00
Vitor Pamplona 6318c54214 Merge pull request #1779 from davotoula/quartz-fix-jvm-chess-tests
fix chess tests
2026-03-06 20:21:12 -05:00
davotoula 5658b14ad4 fix chess tests 2026-03-06 23:26:40 +01:00
davotoula b713b01af1 Replace subsequent checks with '!isNullOrEmpty()' call 2026-03-06 22:47:29 +01:00
davotoula f8187bad14 use forEach: no intermediate list created. 2026-03-06 22:38:05 +01:00
davotoula 03171f97a5 Use filterIsInstance to avoid dual iteration 2026-03-06 22:21:03 +01:00
davotoula 6bfb508ddc Lambda argument should be moved out of parentheses 2026-03-06 22:17:32 +01:00
davotoula d7d9352a90 replace null checks with Elvis 2026-03-06 22:09:19 +01:00
davotoula 4e614a3179 merge call chain with flatMap (slight performance improvement) 2026-03-06 21:51:26 +01:00
David Kaspar a89bfd0b05 Merge pull request #1778 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-06 20:47:40 +00:00
Crowdin Bot 3bf79355b8 New Crowdin translations by GitHub Action 2026-03-06 20:46:29 +00:00
David Kaspar b61ba78eb3 Merge pull request #1777 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-06 20:45:03 +00:00
Crowdin Bot 82fd15272d New Crowdin translations by GitHub Action 2026-03-06 20:43:36 +00:00
David Kaspar 069a19b3f5 Merge pull request #1776 from davotoula/update-translations
update cz, pt, de, sv
2026-03-06 20:42:07 +00:00
Vitor Pamplona 5d9687fb47 Merge pull request #1771 from mstrofnone/namecoin-nip05-improvements
fix: address race conditions and improve Namecoin NIP-05 resolution
2026-03-06 15:13:20 -05:00
Vitor Pamplona 976a9d5c77 Merge pull request #1774 from davotoula/lint-fixes
Lint fixes
2026-03-06 15:12:43 -05:00
Vitor Pamplona 1729a55add Merge pull request #1775 from davotoula/potential-bug-note-compose
Typo / potential bug?
2026-03-06 15:12:19 -05:00
davotoula 8d212b8f03 update cz, pt, de, sv 2026-03-06 21:04:26 +01:00
davotoula aec0101769 was this meant to be withContext? 2026-03-06 20:10:35 +01:00
davotoula 7f0b2c500f add names to boolean params 2026-03-06 19:59:20 +01:00
davotoula 582153b193 remove unused imports 2026-03-06 19:59:20 +01:00
davotoula 8868b1b0e6 Explicit type arguments can be inferred 2026-03-06 19:59:20 +01:00
davotoula bd71e9ae8f remove redundant modifiers 2026-03-06 19:59:20 +01:00
davotoula 8329184d99 correct package name 2026-03-06 19:46:48 +01:00
davotoula c8c42b5d70 If-Null return/break/... foldable to '?:' 2026-03-06 19:46:47 +01:00
davotoula 34e1ea92b2 Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable. 2026-03-06 19:46:47 +01:00
davotoula 99e8ffcdeb Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable. 2026-03-06 19:46:47 +01:00
davotoula 7de098063f Specifying : ExoPlayer makes the contract explicit 2026-03-06 19:46:47 +01:00
davotoula 953e8c1749 supress false positive 2026-03-06 19:46:47 +01:00
davotoula 5ac8b9ad62 Prefer mutableLongStateOf instead of mutableStateOf 2026-03-06 19:46:47 +01:00
davotoula 80fb171e0a Unnecessary; SDK_INT is always >= 26 2026-03-06 19:46:47 +01:00
davotoula 8876c3c1d7 use multi-dollar string interpolation
avoid default locale
2026-03-06 19:46:47 +01:00