Commit Graph

10114 Commits

Author SHA1 Message Date
davotoula 42db03790a added progress and test plan to doc 2026-03-25 10:23:38 +01:00
davotoula 60b7c6bd0d fix: delete abandoned compressed video when larger than original
fix: eagerly delete intermediate temp files in upload pipeline
fix: delete temp file from MediaCompressorFileUtils after image compression
refactor: simplify temp file cleanup logic
- Remove TOCTOU anti-pattern (file.exists() before file.delete())
- Consolidate double deleteTempUri calls into single conditional
- Remove restating comments
2026-03-25 10:19:16 +01:00
davotoula 390edf311d analysis for temporary files 2026-03-25 09:29:48 +01:00
davotoula 26fb6fead4 Merge branch 'main-upstream' into claude/review-cache-cleanup-Yr2P6 2026-03-25 09:18:53 +01:00
nrobi144 e037254b39 fix(highlights): shared store, context menu, link rendering, publish, profile tabs
- Share DesktopHighlightStore and DesktopDraftStore at app level instead
  of per-column to fix cross-deck reactivity and draft persistence
- Replace broken clipboard-based highlight creation with
  LocalContextMenuRepresentation that piggybacks on Copy to get selected text
- Render highlights as highlight:// links instead of bold/italic markers
- Add collapsible highlights panel in article reader with edit/delete/publish
- Publish highlights to relays as NIP-84 events via HighlightPublishAction
- Add Reads tab (kind 30023) and Highlights tab (kind 9802) to profile
- Rewrite MarkdownToolbar with MarkdownEditorState for selection-aware
  toggle, Material icons, and keyboard shortcuts (Cmd+B/I/E/K)
- Wire DraftsScreen "New Draft" button to ArticleEditorScreen navigation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 06:59:41 +02:00
Claude 403351610b feat: implement NIP-45 HyperLogLog for probabilistic event counting
Add client-side HyperLogLog support as specified by NIP-45:
- HyperLogLog object with merge, estimate, encode/decode, and
  computeOffset for deterministic filter-based offset calculation
- Add hll ByteArray field to CountResult for relay HLL data
- Update CountResultKSerializer to serialize/deserialize hll hex field
- Add queryCountMergedHll extension for multi-relay HLL merging
- 20 unit tests covering HLL operations and serialization round-trips

https://claude.ai/code/session_01CQzygEkwckLCiXzSRPMpBa
2026-03-25 03:43:47 +00:00
Claude 36af9e2346 feat: add NIP-89 client tag to all signed events via NostrSignerWithClientTag decorator
Introduces a signer decorator that automatically appends the NIP-89
client tag to every event before signing, ensuring all events carry
client identification without modifying individual event creation sites.
Works transparently with internal, external (NIP-55), and remote (NIP-46) signers.

https://claude.ai/code/session_01WRtuk1ySCfqXzfFrieKsDs
2026-03-25 03:24:49 +00:00
Claude c3c9bd016e feat: separate favorite relay feeds into their own category in nav popup
Relay feeds were previously grouped under the generic "Feeds" category
in the top nav bar filter dialog. This adds a dedicated "Relays" group
so users can more easily find their favorite relay feeds.

https://claude.ai/code/session_016gjbPgYRXrQCoY1zKPz5PX
2026-03-25 02:59:40 +00:00
M a4953f628d doc: verify .onion ElectrumX cert via Tor, document pinning
Connected to the .onion hidden service via Tor SOCKS proxy and
confirmed it serves the SAME certificate as electrumx.testls.space:
  SHA-256: 53:65:D5:BB:26:19:F5:40:1C:D8:8E:FC:AF:FB:A5:B2:...

The .onion cert is already covered by the first pinned cert entry.
Added comments documenting this relationship and instructions for
fetching .onion certs via Tor for future updates.

The .onion still uses onionSslFactory() (trust-all) as the primary
path — this is correct since Tor provides its own authentication.
The pinned cert serves as defense-in-depth.
2026-03-25 12:13:49 +11:00
M 3afe0c9978 fix: bypass cert pinning for .onion ElectrumX servers
Tor hidden services are authenticated by their onion address (the
public key hash), making TLS certificate verification redundant.

The .onion server in TOR_ELECTRUMX_SERVERS was going through
pinnedSslFactory() but its cert isn't in the pinned list (and can't
be fetched without Tor). This would cause .onion connections to fail
with SSLHandshakeException when Tor mode is active.

Fix: .onion addresses now use a dedicated onionSslFactory() with
trust-all, which is safe because:
1. Tor provides end-to-end encryption
2. The onion address IS the server identity proof
3. Samsung Knox trust-all rejection doesn't apply to proxied sockets
2026-03-25 12:10:45 +11:00
M b8b51db0b5 feat: TOFU cert pinning for custom ElectrumX servers
When a user adds a custom ElectrumX server and runs Test Connection,
the server's TLS certificate is automatically captured and pinned
(Trust On First Use). This allows custom servers with self-signed
certificates to work on Samsung/Xiaomi/OnePlus devices.

Changes:
- ElectrumXClient: addPinnedCert(), setDynamicCerts() for runtime
  cert management; testServer() now captures server cert PEM and
  SHA-256 fingerprint from SSL session
- NamecoinSharedPreferences: persist pinned certs to DataStore
- AppModules: load pinned certs on startup, sync to ElectrumXClient
- NamecoinSettings: custom servers always set trustAllCerts=true
  (ElectrumX servers almost universally use self-signed certs)
- UI: shows cert fingerprint in test results, auto-pins on success
- ServerTestResult: new serverCertPem + certFingerprint fields

Flow: Add server → Test Connection → cert auto-captured and pinned →
future connections trust that cert even on Samsung Knox devices.
2026-03-25 12:05:05 +11:00
Vitor Pamplona f42881a48e v1.06.3 2026-03-24 20:55:04 -04:00
Vitor Pamplona 6fc72f47bb Highlights when arriving at the reply message 2026-03-24 20:53:22 -04:00
M 49698de99c feat: add Test Connection diagnostics to Namecoin settings
Add per-server connection testing with detailed error reporting:
- Test Connection button tests each ElectrumX server individually
- Shows streaming results:  success with response time,  failure
  with human-readable error (TLS handshake failed, connection refused,
  timeout, DNS failed, invalid response, etc.)
- Diagnostic card shows: last test timestamp + success count, device
  info (manufacturer/model/Android/API), TLS version negotiated
- ElectrumXClient.testServer() method for single-server diagnostics
  with TLS version capture from SSL session

This gives users (and bug reporters) immediate visibility into why
Namecoin resolution may be failing silently on their device.
2026-03-25 11:52:05 +11:00
Vitor Pamplona 041c788e21 Improvements to anonymous replies 2026-03-24 20:42:06 -04:00
M 15a2d77a0f fix: pin ElectrumX server certs instead of trust-all TrustManager
Samsung One UI 7 (Android 16) silently rejects TLS connections that use
a no-op X509TrustManager which accepts all certificates. This breaks
Namecoin resolution on all Samsung devices running One UI 7, including
Galaxy A15 (SM-A156E) and Galaxy S24 Ultra (SM-S938B).

Replace trustAllSslFactory() with pinnedSslFactory() that:
- Pins the actual self-signed certificates of known ElectrumX servers
- Also includes system CA certificates for servers with real certs
- Uses a proper TrustManagerFactory chain that Samsung Knox accepts

Additional OEM compatibility hardening:
- Cache the SSLSocketFactory (avoid expensive rebuild per connection)
- Request TLSv1.2 explicitly (Xiaomi MIUI/HyperOS and OnePlus ColorOS
  Conscrypt forks may default to TLS 1.0 for raw socket upgrades)
- Enforce TLSv1.2+ enabled protocols on the SSLSocket
- KeyStore fallback to PKCS12 if default type fails (Xiaomi)
- Defensive try/catch on system CA cert re-insertion (some OEMs return
  certs that cannot be added to a new KeyStore)

Tested on Android 16 (API 36) emulator — all ElectrumX servers connect
(hostname, IP-address, factory reuse) and .bit resolution works E2E.

Pinned certs:
- electrumx.testls.space:50002 (expires 2027-05-04)
- nmc2.bitcoins.sk:57002 (expires 2030-10-22)
2026-03-25 11:41:12 +11:00
Vitor Pamplona 1f2e24bc1f v1.06.2 2026-03-24 19:36:30 -04:00
Vitor Pamplona cfd6577029 no message 2026-03-24 19:36:19 -04:00
Vitor Pamplona 976de28ece Fixes routes for AppDefinition events. 2026-03-24 19:25:01 -04:00
Vitor Pamplona bc9b6dc912 fixes client tags 2026-03-24 19:24:33 -04:00
Vitor Pamplona c6fd65dbac Merge pull request #1935 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-24 18:35:47 -04:00
Crowdin Bot b3f190410f New Crowdin translations by GitHub Action 2026-03-24 22:33:27 +00:00
Vitor Pamplona 6f7c550034 Clears some inconsistencies in translations 2026-03-24 18:31:10 -04:00
Vitor Pamplona fb976d168a Simplifies report feed in the user profile 2026-03-24 18:30:52 -04:00
Vitor Pamplona be4a6d4fc4 Merge pull request #1932 from vitorpamplona/claude/add-anonymous-reply-dkdSJ
feat: activate anonymous reply by tapping user picture
2026-03-24 17:55:46 -04:00
Claude d90c868f32 feat: activate anonymous reply by tapping user picture instead of bottom button
Replace the bottom bar AnonymousPostButton with a tap-on-avatar activation scheme.
Tapping the user picture enables anonymous mode and shows the incognito icon in its
place. Tapping the incognito icon toggles back to normal mode.

https://claude.ai/code/session_013MaeT2T9Bg4HaVe2ACNADy
2026-03-24 21:49:15 +00:00
Vitor Pamplona e4f55c11f1 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  perf: move cache lookups from NavHost route lambdas into screen composables
2026-03-24 17:45:46 -04:00
Vitor Pamplona 71242e50d2 Merge pull request #1933 from vitorpamplona/claude/improve-navhost-performance-AE9WZ
perf: move cache lookups from NavHost route lambdas into screen composables
2026-03-24 17:42:34 -04:00
Vitor Pamplona 5d0f9ac866 Cleaning up residue from removing the need for rfc 3986 and smpForKmp 2026-03-24 17:41:20 -04:00
Vitor Pamplona ad9596ab92 Fixes flow value and improves tor binding lifecycle. 2026-03-24 17:32:24 -04:00
Vitor Pamplona d847c06979 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  New Crowdin translations by GitHub Action
2026-03-24 17:23:31 -04:00
Vitor Pamplona 0d8b4e8baa merge 2026-03-24 17:21:52 -04:00
Vitor Pamplona 70d034e50c Merge pull request #1930 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-24 17:20:31 -04:00
Vitor Pamplona f11172216d Improvements to the status of attestations. Validity first, then Processing status. 2026-03-24 17:20:11 -04:00
Claude 2ef8be8fdc perf: move cache lookups from NavHost route lambdas into screen composables
Route lambdas in NavHost run during navigation composition and should be
kept lightweight. Cache lookups (getNoteIfExists, checkGetOrCreateNote,
getOrCreateAddressableNote) and object construction (RoomId,
RelayUrlNormalizer) are now deferred to the screen composables themselves,
either via remember {} or inside LaunchedEffect blocks.

Affected screens: PublicChatChannelScreen, LiveActivityChannelScreen,
EphemeralChatScreen, GeoHashPostScreen, HashtagPostScreen,
ReplyCommentPostScreen, NewProductScreen, LongFormPostScreen,
ShortNotePostScreen, NewPublicMessageScreen,
ImportFollowListPickFollowsScreen.

https://claude.ai/code/session_01NrVHL4zdCghQvqE8xmi4Gf
2026-03-24 21:18:40 +00:00
Crowdin Bot cc850c5b7f New Crowdin translations by GitHub Action 2026-03-24 21:17:34 +00:00
Vitor Pamplona 728ff9a4cd Merge pull request #1926 from vitorpamplona/claude/reply-click-navigation-7lKuO
feat: scroll to replied message when clicking reply preview in chat
2026-03-24 17:16:16 -04:00
Vitor Pamplona 6f9fc23a64 Merge pull request #1929 from vitorpamplona/claude/relay-info-dialog-uuE8W
feat: make profile relay rows open relay info dialog
2026-03-24 17:16:01 -04:00
Claude bcdaf8630c feat: make relay rows clickable to open relay info dialog on profile page
Adds onClick parameter to RelayCompose and navigates to RelayInformationScreen
when a relay row is tapped in the profile relay tab.

https://claude.ai/code/session_01PBFQz53xzXoFsEHD5Ghyqr
2026-03-24 20:34:01 +00:00
Vitor Pamplona 2d25bb2592 Sorts followers into a set to avoid LazyColumn key conflicts. 2026-03-24 14:23:21 -04:00
Vitor Pamplona 405d1d0519 Merge pull request #1928 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-03-24 13:42:23 -04:00
Crowdin Bot 88042f06d4 New Crowdin translations by GitHub Action 2026-03-24 17:40:05 +00:00
Vitor Pamplona 8437a819f8 Merge pull request #1909 from KotlinGeekDev/kmp-completeness
Kmp completeness, part 3 - adios, Swift bridge.
2026-03-24 13:38:44 -04:00
Vitor Pamplona cef07a2460 Fixes single label domains with non ascii chars around them 2026-03-24 13:33:14 -04:00
Vitor Pamplona 2a2c61973e Avoids crashing the app in weird urls. 2026-03-24 13:30:36 -04:00
KotlinGeekDev 349781d9be Use uri-reference-kmp in commonMain. Remove platform-specific implementations. 2026-03-24 16:34:13 +01:00
KotlinGeekDev 334aabbf02 Merge branch 'upstream-main' into kmp-completeness 2026-03-24 16:12:14 +01:00
KotlinGeekDev 2933454fb6 Merge branch 'main' of https://github.com/vitorpamplona/amethyst into upstream-main
# Conflicts:
#	quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/URLs.ios.kt
2026-03-24 16:11:04 +01:00
Vitor Pamplona 09054d6ac5 Fixes pool rendering when one label is large and the other is small 2026-03-24 10:58:59 -04:00
Claude 4d8be5e272 feat: scroll to replied message when clicking reply preview in chat
When a user clicks on the reply preview (inner quote) in a chat message,
the chat feed now scrolls to the original replied-to message in the same
screen instead of doing nothing.

https://claude.ai/code/session_01UF4VxoWGvvvwtLYBLBYw9w
2026-03-24 14:51:39 +00:00