Commit Graph
2315 Commits
Author SHA1 Message Date
Claude 2e32660d9b feat: roadstr-accurate road event rendering (kind 1315/1316)
Align Amethyst's road event cards with the roadstr reference clients
(https://github.com/jooray/roadstr) for both interoperability and a
richer presentation.

Interop:
- Match roadstr's exact emoji set: road_closure 🚫 (was ) and
  other ℹ️ (was 📍). The t codes and per-type TTLs already matched.
- Make the kind 1316 NIP-31 alt status-dependent ("Roadstr: event
  confirmed" / "Roadstr: event denied") per the spec, instead of a
  single "Roadstr: event confirmation".

Rendering:
- Colored teardrop map pin per category, using roadstr's exact color
  palette, with the category emoji on the head (new MapPinIcon).
- Freshness: fade the report pin to 0.6 under 25% of effective TTL and
  0.4 once effectively expired, matching roadstr's opacity rule.
- Subtitle meta line: "🕒 23m · expires in 1h" / "· Expired" on reports
  and "🕒 23m" on confirmations.
- Confirmations get a green  / red  status pin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tYbcy4UGWxqQbcycyL7Yd
2026-06-18 22:38:07 +00:00
Vitor PamplonaandGitHub 294be62fec Merge pull request #3272 from vitorpamplona/claude/stoic-lovelace-qv7vy8
Add Roadstr road event support (kinds 1315/1316)
2026-06-18 17:05:08 -04:00
Vitor PamplonaandGitHub e74b5ac308 Merge pull request #3271 from vitorpamplona/claude/quartz-fts-indexing-review-29o8us
Implement NIP-50 full-text search for additional event kinds
2026-06-18 17:03:15 -04:00
Claude ffe3af1035 feat: index direct message content (NIP-17 ChatMessageEvent)
ChatMessageEvent (kind 14) is the decrypted NIP-17 rumor; its content is the
plaintext message. Index it so DMs are locally searchable, consistent with
messaging-client search. Opt-in confirmed by the maintainer; private zaps
(9733) remain excluded.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 20:58:11 +00:00
Claude 4662cb75d0 refactor(roadstr): match NIP-88 polls architecture; register in LocalCache
Restructure the experimental roadstr events to mirror the nip88Polls
file layout, and wire the kinds into LocalCache (previously unhandled,
so they hit the "Event Not Supported" fallback and were dropped).

- Split into report/ and confirmation/ sub-packages, each with
  XEvent.kt + TagArrayBuilderExt.kt + TagArrayExt.kt + tags/, matching
  nip88Polls/{poll,response}. build() now uses eventTemplate + typed
  builder-ext functions; accessors delegate to TagArray ext functions.
- Bundle each enum into its tag class (RoadEventType in RoadEventTypeTag,
  RoadEventStatus in RoadEventStatusTag), like PollType in PollTypeTag.
- Add RoadReportTag (a GenericETag `e`-reference) mirroring PollTag, and
  have RoadEventConfirmationEvent implement EventHintProvider so the
  referenced report is linkable — parallel to PollResponseEvent.
- Shared lat/lon/geohash tag codecs live in roadstr/tags/ with generic
  builder/parse extensions.
- LocalCache: consume kinds 1315/1316 as regular events.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cn4Lk53CcXqYFYHMut4YfY
2026-06-18 20:57:41 +00:00
Claude a7bf23a00d feat: index zap comments (LnZap request/receipt, onchain zap, nutzap)
Zaps carry an optional human-readable message; index it cheaply:

- LnZapRequestEvent (9734): content (public zap comment). Private-zap messages
  live encrypted in the `anon` tag, not content, so they stay out.
- LnZapEvent (9735): the comment is in the embedded zap request, which init{}
  already parses into `zapRequest` unconditionally — so indexing
  `zapRequest?.content` adds no extra parse cost.
- OnchainZapEvent (8333): content (optional message).
- NutzapEvent (9321): content (nutzap message).

LnZapPrivateEvent (9733) is left out: its content is a decrypted *private* zap
message (same privacy class as DMs) — deferred to an explicit opt-in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 20:54:11 +00:00
Claude 61255198b3 feat(roadstr): add kind 1315/1316 road event support
Adds Quartz protocol support and Amethyst rendering for the Roadstr
decentralized traffic-reporting events (https://github.com/jooray/roadstr):

Quartz:
- RoadEventReportEvent (kind 1315) and RoadEventConfirmationEvent
  (kind 1316), registered in EventFactory.
- RoadEventType (13 categories with client-side effective TTLs) and
  RoadEventStatus enums; lat/lon/status tag codecs with 7-decimal
  coordinate formatting; NIP-40 expiration + NIP-31 alt + multi-precision
  geohash (4/5/6) tags.
- Generalize the GeoHash encoder/decoder into commonMain
  (nip01Core.tags.geohash.GeoHash); the Android module keeps only the
  Location <-> GeoHash glue.
- Unit tests for parsing, building, TTLs, coordinate formatting and the
  geohash prefix hierarchy.

Amethyst:
- RenderRoadEventReport / RenderRoadEventConfirmation cards wired into
  NoteCompose (feed) and ThreadFeedView/NoteMaster (thread), mirroring
  the Birdex renderer pattern; reverse-geocoded location line and
  localized category labels.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cn4Lk53CcXqYFYHMut4YfY
2026-06-18 20:22:08 +00:00
Claude 340916aa86 feat: make polls, code snippets, audio, git/torrent replies & interest sets searchable
Adds SearchableEvent to more text-bearing kinds:

- PollEvent (1068, NIP-88): question (content) + option labels
- CodeSnippetEvent (1337, NIP-C0): name, description + code
- GitReplyEvent (1622) and TorrentCommentEvent (2004): reply/comment content
- AudioHeaderEvent (1808): description (content)
- AudioTrackEvent (31337): subject
- InterestSetEvent (30015): title, description + public interest hashtags
  (private hashtags in NIP-44 content are not indexed)
- SoftwareReleaseEvent (30063): release notes (content) — note: kind 30063 is
  registered to NIP-51 ReleaseArtifactSetEvent in EventFactory, so this is for
  completeness and not exercised at runtime.

CommunityRulesEvent (34551) was intentionally left out: it is the NIP-9B
machine-readable rules companion; the human-readable community rules live on
CommunityDefinitionEvent.rules(), which is already indexed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 20:21:08 +00:00
Claude c5c5ef706f fix(quartz): de-flake NostrClientRepeatSubTest re-subscription test
The test asserted exactly two EOSEs (`assertEquals(2, eoseCount)`) and
looped `while (eoseCount < 2)`. But a re-REQ on the same subscription id
silently replaces the previous subscription (NIP-01), and
RelaySession.handleReq cancels the in-flight query coroutine without
emitting an EOSE for the superseded filter. So when both mid-stream
re-subscriptions get collapsed before reaching EOSE, only the final,
never-superseded filter emits one — the consumer loop then blocks on
receive() until the 30s timeout and the assertion fails.

Drain until the relay goes quiet (idle-gap timeout) instead of counting
on a fixed number of EOSEs, and assert only invariants that hold for
every interleaving: at least one EOSE arrives, every non-EOSE entry is a
valid 64-char id, the final advertised-relay-list filter actually
streamed its events, and the total stays under a sane upper bound.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018e1bfPf4HZDCvwcfiEHECk
2026-06-18 20:16:02 +00:00
Claude 79f6bf1b7c fix: drop label prefix from WikiNoteEvent FTS content
Missed in the earlier label-removal pass. Index bare title/summary/content.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 20:07:23 +00:00
Claude d184e4369c feat: make remaining text-bearing events searchable
Adds SearchableEvent to the rest of the event kinds that carry
human-readable fields, indexing only natural-language values (no structural
labels), consistent with the existing implementations.

Public/discovery: relay groups (NIP-29), file/media headers (NIP-94), web
bookmarks (NIP-B0), podcasts (NIP-F4 episode + show), static sites (NIP-5a),
live clips and meeting rooms (NIP-53), contact cards (NIP-85), and the
NIP-51 curation sets (article/video/picture/app curation, media starter
pack, release artifacts).

Personal lists (NIP-51): bookmark/labeled-bookmark/follow/people lists and
relay sets — indexes the list's own title/description so users can find
their lists by name.

Experimental: software apps (NIP-82), fundraisers, interactive stories,
workout records, birdex, attestations, NIP-95 file storage header, profile
gallery.

content is indexed only where it is confirmed human-readable prose
(file caption, podcast notes, clip caption, app/fundraiser/story/workout
body). It is excluded where content is HTML (static sites), base64 (NIP-95),
NIP-44 encrypted (contact cards), an encrypted/JSON private-tag blob (lists),
or always empty — those index their parsed tag fields only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 19:59:45 +00:00
Claude d87de452e6 refactor: drop structural labels from FTS indexable content
The "title: ", "summary: ", "name: ", "Subject: ", "Option: " etc. prefixes
were tokenized into the single FTS content column as literal words, so every
event of a type matched bare terms like "title" or "summary" and the index
carried useless tokens — the same field-name pollution we avoid for JSON
kinds. The FTS table has one content column and search is plain-text MATCH,
so the labels enabled no fielded search; they were pure noise.

Index bare field values instead (listOfNotNull(...).joinToString("\n")),
which also drops the "null" token the older one-liners produced for absent
fields. Applied across all SearchableEvent implementations for consistency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 19:41:09 +00:00
Claude e400a48dbf feat: index parsed JSON fields of profile/channel/app-handler events
Kinds 0 (profile), 40/41 (channel create/metadata) and 31990 (app handler)
store their data as JSON in content. Implement SearchableEvent on them by
parsing the JSON (via the existing UserMetadata/ChannelData/AppMetadata
accessors) and indexing only the meaningful fields — names, bio/about, and
the addresses people search by: nip05 email, lightning addresses
(lud06/lud16), and website/picture/banner URLs. This avoids indexing the
JSON keys and structural punctuation that raw-content indexing would add.

Updates the FsSearchTest "non-searchable" case to use an unknown kind, since
MetadataEvent is now searchable, and adds SearchTest coverage for profile
and channel JSON fields (name, about, email, lightning, URL).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 19:33:10 +00:00
Claude a689d5cb19 revert: keep original event_fts table design, drop FTS migration
Reverts the event_fts rowid-alignment refactor and the background reindex
that it required. Aligning the FTS rowid with event_headers.row_id was a
schema change, which forced a v2->v3 migration to rebuild the index from
~all cached events — and on large caches that reindex was the expensive,
risky part (slow startup, all-or-nothing transaction, resumability and
malformed-row concerns). The cleanup it bought (not tokenizing the numeric
foreign key into the index) isn't worth that cost.

Restores the original design: event_fts keeps its dedicated
event_header_row_id column, queries join on it, DATABASE_VERSION stays 2,
and there is no FTS migration or reindex at all.

Kept: the newly searchable event kinds (they implement SearchableEvent and
work unchanged with the original table) and their test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 18:47:37 +00:00
Claude 1027324da8 perf: run post-migration FTS reindex in the background
The v2->v3 upgrade previously rebuilt the entire full-text index inside
the migration transaction. With a large cache (e.g. 100k events) that
blocked every DB operation behind a single long transaction at startup:
the app appeared frozen, risked an ANR if reached on the main thread, and
— because it was all-or-nothing with the version bumped only on success —
a crash, kill, or one malformed cached row could roll everything back and
retry from scratch on every launch (worst case: an unrecoverable boot loop)
while the WAL ballooned.

Decouple the reindex from the migration:

- The migration now only recreates the empty FTS table and writes a
  persistent `fts_reindex` marker holding a progress cursor, then bumps the
  version. It is cheap and atomic.
- A background coroutine (Dispatchers.IO, cancelled on close()) backfills the
  index from event_headers in small committed batches via useWriter, so live
  relay inserts/queries interleave between batches instead of waiting.
- Backfill is idempotent (INSERT OR IGNORE), resumable (cursor persists, so a
  kill resumes on next launch), and resilient (a row that fails to parse/index
  is skipped while the cursor still advances — no stuck retries).

Search is merely degraded (partial results) until the backfill finishes,
never blocked. Adds a test covering backfill + marker clearing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 18:42:09 +00:00
Claude 8f6074e85b feat: index natural-language fields of more event kinds for FTS
Several event kinds carry human-readable text (titles, summaries,
descriptions, names, free-text content) but were never added to the
full-text search index. Implement SearchableEvent on them so their
natural-language fields become searchable, while keeping non-prose data
(hex ids, URLs, relay hints, hashtags, geohashes, JSON config) out of the
index.

Kinds added:
- Classifieds (30402): title + summary + content
- Calendar (31924) + date/time slots (31922/31923): title + summary + content
- Community Definition (34550): name + description + rules
- Live Activities (30311): title + summary + content
- Meeting Space (30312): room + summary
- Status (30315): content
- Picture (20) and Video (NIP-71, all variants): title + content
- Goal (9041): summary + content
- Torrent (2003): title + content
- Git Repository (30617): name + description
- Git Pull Request (1618): subject + content
- Git Patch (1617): content
- Badge Definition (30009): name + description
- Emoji Pack (30030): title + description
- Feed Definition (31890): title only (content is JSON config)

JSON-content kinds (profile, channel, app handler) are intentionally left
out for now since they require parsing the content JSON to extract only
the natural-language fields. Existing v2->v3 FTS reindex repopulates the
index for already-cached events of these kinds on upgrade.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 16:34:27 +00:00
Claude 6a2d8baf43 refactor: align event_fts rowid with event_headers.row_id
The FTS table declared event_header_row_id as a regular full-text column,
which means the numeric foreign key was tokenized into the searchable
index — a bare MATCH could match an event by its internal row id, and the
column wasted index space.

Drop the dedicated column and instead align the FTS table's implicit
rowid with event_headers.row_id at insert time, joining on it (rowid
joins are also the fastest possible). This works across fts3/4/5.

Also make FullTextSearchModule.drop() remove its trigger explicitly so
the module is self-contained, and add a v2->v3 migration that rebuilds
the FTS index in place from event_headers, preserving the cached events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 15:51:06 +00:00
Claude 1bef6ab2ed fix: index poll option text cleanly in ZapPollEvent FTS
ZapPollEvent.indexableContent() concatenated a List onto a String, so
String.plus(Any?) appended the list's toString() — leaking literal "[",
"]" and ", " separators into the full-text index
(e.g. "Best color?[\nOption: Red, \nOption: Blue]"). Build the string
explicitly so only the natural-language poll descriptors are indexed,
matching the buildString style used by the music events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
2026-06-18 03:48:07 +00:00
Claude 88a1755ae0 feat(cashu): add stop-receiving-nutzaps and delete-wallet actions
Adds two user-facing teardown options to the Cashu wallet settings:

- "Stop receiving nutzaps": replaces kind:10019 with an empty event (the
  durable signal, honored by every relay since it's a replaceable-event
  replacement) and then NIP-09 deletes it (best-effort, since deletions are
  optional on Nostr). The wallet and balance are untouched.
- "Delete wallet": withdraws the nutzap advertisement as above, then NIP-09
  deletes the kind:17375 wallet definition. Held kind:7375 proofs are not
  deleted (the ecash still exists at the mint), with a UI warning that any
  remaining balance / unredeemed nutzaps may become unrecoverable.

The on-disk backups of kind:17375 / kind:10019 are cleared when those events
are deleted, so a relaunch doesn't resurrect a deleted wallet from settings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXRAunSJS2dBx7B79qTMew
2026-06-17 22:31:57 +00:00
Vitor PamplonaandGitHub 93186a559c Merge pull request #3255 from vitorpamplona/claude/great-edison-nf92b4
fix(cashu): NUT-02 per-keyset input fees in melt/swap (fixes coinos send-LN)
2026-06-17 18:20:19 -04:00
Vitor PamplonaandGitHub 8282c5f609 Merge pull request #3254 from vitorpamplona/claude/beautiful-hawking-qfcq4w
Fix lone surrogates in truncated strings (emoji safety)
2026-06-17 18:15:37 -04:00
Claude 3ae9532efe fix: don't split surrogate pairs when truncating alt/summary tags
The NIP-31 "alt" summary for kind:1 notes was built with msg.take(50),
which counts UTF-16 code units. When the 50th unit landed between the two
halves of an astral character (e.g. the 🫡 emoji, U+1FAE1), it left a lone
surrogate at the end of the alt tag.

A lone surrogate is unencodable as UTF-8: it is kept in memory while the
event id is hashed (so the external signer signs that id), but it is
replaced by '?' the moment the event is serialized to a relay. Every relay
then recomputes a different id and rejects the event as having an invalid
id — making the affected note impossible to post.

Add a surrogate-aware String.takeKeepingSurrogatePairs() helper and route
TextNoteEvent's alt summary and the clink OfferClient description trim
through it. Adds regression tests covering the reported note and the helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTHsaW6FVjvPqnrSGiT5ee
2026-06-17 22:04:19 +00:00
Claude d6e1af20de Merge remote-tracking branch 'origin/main' into claude/great-edison-nf92b4 2026-06-17 22:03:38 +00:00
Claude 2cbdfe749b refactor(cashu): migrate token-redeem melt to NUT-05
MeltProcessor (the "Redeem received cashu token → my Lightning address"
button) was hand-coded against the deprecated pre-v1 Cashu API (POST /melt
and POST /checkfees with {pr, proofs}). Those endpoints are gone on CDK and
other modern mints, and the path never accounted for NUT-02 per-input fees,
so it failed on fee-charging keysets the same way the wallet melt did.

Route it through the same NUT-05 CashuMintOperations the NIP-60 wallet uses:
requestMeltQuote + meltProofs. A probe quote at the full token value reveals
the LN fee_reserve, to which we add inputFeeFor(proofs) before fetching the
real invoice for (total − fees) and melting. No change is requested — there
is no wallet to hold leftover proofs, so the unused reserve stays with the
mint, matching the legacy behavior.

Supporting changes in CashuMintOperations:
- meltProofs gains requestChange (default true) so the redeem path can melt
  without minting orphan change outputs.
- inputFeeFor(proofs) exposes the per-keyset NUT-02 fee for invoice sizing.

Also drops the dead empty melt(...) overload that was a stub with a TODO.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Ffjz3doZ5CtFtAWSpvmqR
2026-06-17 21:42:31 +00:00
Claude d9a9ecdc05 fix(cashu): reserve the melt's NUT-02 input fee in send-LN swap-down
meltToLightning selects proofs covering amount+fee_reserve and, on
overshoot, swaps them down to exactly that before melting. But the melt
mints its inputs on the active keyset and the mint then charges its own
NUT-02 input fee on them — which the swap-down target didn't include. On a
fee-charging mint (mint.coinos.io active keyset = 100 ppk) the melt was
left a sat short and threw "Inputs total X < required Y", so fixing the
per-keyset swap fee alone just moved the failure from the swap to the melt.

Reserve activeKeysetInputFeeFor(required) on top of amount+fee_reserve for
both proof selection and the swap-down target so the subsequent melt has
room for its input fee.

Also fix the reported fee in MeltCompleted: the pre-paid swap "keep" was
split off before the melt and never spent, so subtract it instead of
counting the whole selected total minus change (which overstated fees by
the keep amount in the swap path).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Ffjz3doZ5CtFtAWSpvmqR
2026-06-17 21:28:50 +00:00
Claude 32a30453f3 fix(cashu): price NUT-02 input fees per each input proof's own keyset
When melting/swapping Cashu proofs, the wallet computed the NUT-02 input
fee from the mint's currently-active keyset (`keyset.inputFeePpk`) for
every input. But NUT-02 charges the fee per the keyset each input proof
was minted under, which can be an inactive, rotated-out keyset with a
different fee.

On mint.coinos.io the old keyset (004f7adf2a04356c) charges 0 ppk and the
active keyset (007311aa2fa58cc8) charges 100 ppk. A wallet holding proofs
on the old keyset reserved a fee the mint never takes, leaving the swap
outputs one sat short — surfacing as "Mint Error (HTTP 400), inputs 84 -
fees 0 vs output (83) are not balanced" when sending over Lightning.

Fee is now `ceil(sum(input_fee_ppk_i) / 1000)` over each input's own
keyset, read from /v1/keysets (which lists inactive keysets too, unlike
/v1/keys). Applied in swap, swapToLocked, and meltProofs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Ffjz3doZ5CtFtAWSpvmqR
2026-06-17 21:06:46 +00:00
Claude 3ee699c555 feat: manage tracks (reorder/remove) inside the playlist editor
Add in-playlist track management to the music playlist composer: each track in
the working list shows its artwork/title/artist with move-up, move-down and
remove controls. The list is seeded from the loaded event when editing and
published in its new order on save. Adding new tracks still happens via the
per-song "Add to playlist" sheet.

- quartz: MusicPlaylistEvent.edit() now takes the ordered track list and resets
  the playlist's music-track `a` tags to it (preserving any non-track `a` tags,
  the d tag, custom hashtags and other metadata). Add MusicPlaylistEventEditTest
  covering reorder, removal, visibility switch, cover/description clearing and
  tag preservation.
- amethyst: NewMusicPlaylistViewModel gains the working track list plus
  moveTrackUp/moveTrackDown/removeTrackAt; NewMusicPlaylistScreen renders the
  editable track section; new string resources.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013oofoSH7eMXrs2TCU4uncS
2026-06-17 20:33:54 +00:00
Claude af8fffb989 feat: full-screen music playlist composer with cover image and metadata
Replace the name-only "new playlist" dialog with a full-screen create/edit
composer reachable via a dedicated route (Route.NewMusicPlaylist).

The composer surfaces a cover-image upload (same Blossom/NIP-96 pipeline as the
music-track composer), plus title, short description, long-form notes, a
public/private toggle and a collaborative toggle. An edit affordance now appears
on the user's own playlist cards.

- quartz: add MusicPlaylistEvent.edit() — updates the composer-owned metadata
  while preserving the track `a` tags and every other tag of the prior version.
- amethyst: NewMusicPlaylistViewModel + NewMusicPlaylistScreen (create/edit/
  delete); extract the shared cover-picker/placeholder/progress-banner into
  MusicComposerUploadUi so the track composer reuses them; FAB now navigates to
  the route; add edit icon on owned playlist cards; new string resources.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013oofoSH7eMXrs2TCU4uncS
2026-06-17 19:43:34 +00:00
Vitor PamplonaandClaude Opus 4.8 270d229d0a build: drive all module versions from the catalog
Make every module read its release version from gradle/libs.versions.toml
instead of carrying its own literal, so a release bump is a single-file edit.

- Move the Android versionCode out of amethyst/build.gradle.kts into the
  catalog as `appCode`; amethyst reads it via libs.versions.appCode.get().
- quartz publishes with version = libs.versions.app.get().
- geode generates a BuildConfig.VERSION from the catalog (new
  generateVersionFile task) and RelayInfo.VERSION reads it, so the NIP-11
  software version tracks releases.
- Update the root build comment to point at the appCode entry.

Version-neutral: everything still resolves to the current 1.12.0 / 448.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:19:52 -04:00
Claude 6de43dec2d feat: detect workouts from Health Connect and suggest a kind 1301 post
Adds foreground auto-detection of finished workouts on Android via Google
Health Connect — the single aggregator every Android health source funnels
into (Samsung Health/Galaxy Watch, Google Fit, Fitbit, Garmin, Strava), the
same Android path RUNSTR uses. On opening the Workouts screen, Amethyst scans
Health Connect for sessions the user hasn't handled and surfaces a banner that
opens the existing workout composer pre-filled, ready to publish as a NIP-101e
WorkoutRecordEvent (kind 1301).

- HealthConnectManager reads ExerciseSessionRecord + aggregated distance,
  calories, heart rate, steps and elevation, mapping each to DetectedWorkout.
- ExerciseTypeMapper maps Health Connect activity types to NIP-101e verbs.
- HealthConnectStore remembers handled sessions per account so each is
  offered once; 7-day foreground lookback, no background service.
- WorkoutSuggestions banner: connect prompt (on-demand permission request,
  never on cold start) or detected-workout rows on the Workouts screen.
- Route.NewWorkout carries optional pre-fill; NewWorkoutViewModel publishes the
  richer metrics (heart rate, steps, elevation, start time) with
  source=health_connect (new SourceTag constant in quartz).
- androidx.health.connect:connect-client (Apache-2.0) + read-only health
  permissions and the required privacy-rationale manifest entries.

Design notes in amethyst/plans/2026-06-16-health-connect-workout-detection.md;
background ~15-min polling + notification left as a documented future seam.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015qgqQKHSewRHVM8vSCLt9P
2026-06-16 22:19:58 +00:00
Vitor Pamplona 0572b0091c v1.12.0 2026-06-16 14:38:13 -04:00
davotoula 6a497ded78 fix logging of e
use lambda
2026-06-16 20:08:03 +02:00
Vitor PamplonaandClaude Opus 4.8 7b34438b04 fix: gate Tor-routed relay dials until Tor's SOCKS port is ready
Before Tor finishes bootstrapping, the relay pool dialed every Tor-routed
relay against the not-yet-listening SOCKS proxy. On a cold start this was
~580 doomed dials (all "SOCKS: Connection refused") concentrated in the
seconds before Tor went Active, churning sockets/CPU and inflating each
relay's backoff. The cost scaled with bootstrap latency, and the same
storm recurred on every network switch (which resets and re-bootstraps Arti).

Add an optional WebsocketBuilder.canConnect(url) gate (defaults to true,
so other implementors are untouched), checked at the top of
BasicRelayClient.connect() before the mutex/onConnecting/build — so a
gated relay opens no socket, fires no listener events, and grows no
backoff. The Android builder gates Tor-routed relays on
torManager.isSocksReady(); RelayProxyClientConnector already reconnects
them with ignoreRetryDelays=true the instant Tor flips to Active, so they
dial as soon as the transport is usable.

Measured on-device: pre-ready doomed Tor dials 581 -> 0 across cold starts
and WiFi<->Mobile switches; clearnet connections stay untouched and Tor
relays self-heal once Tor is Active.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 08:41:06 -04:00
Vitor Pamplona 3b233924ce Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2026-06-15 11:46:10 -04:00
Vitor Pamplona 0cfc324d87 Removes Threading checks on Commons since Main Threads don't exist over there.
Remove warnings
2026-06-15 10:41:40 -04:00
davotoula 33a7ef3be5 Code review:
- harden relay backoff fields for cross-thread access
- reuse EmptyConnectionListener in backoff test
- extract shared relay-client test fakes
2026-06-14 20:36:59 +02:00
davotoula 312f64dcc3 fix: don't reset relay reconnect backoff on momentary connections
A relay that accepts the WebSocket handshake and then immediately resets
the connection (e.g. essayist.decentnewsroom.com) defeated the exponential
reconnect backoff.
2026-06-14 18:25:26 +02:00
davotoula 5551f990a5 fix(quartz): remove write-only RelayStat liveness fields
The RelayStat.lastConnectAt / lastIncomingAt fields added in #3186 were
written on every connect and every incoming relay message (a TimeUtils.now()
call plus a volatile store on the Android hot path) but never read.
2026-06-13 19:43:02 +02:00
Claude 1f8ab1387a fix: remove comma from Kotlin Native test name in LnZapRequestAnonTagTest
Kotlin/Native (iOS) disallows commas in backtick-quoted function names,
which broke the iosSimulatorArm64MainKlibrary task.
2026-06-13 15:44:52 +00:00
Vitor PamplonaandGitHub fcb4b7a9ad Merge pull request #3202 from vitorpamplona/claude/sweet-shannon-smjotq
Redesign activity cards (reactions, zaps, nutzaps) with unified UI
2026-06-13 11:28:38 -04:00
Claude 74d394a7f7 Merge remote-tracking branch 'origin/main' into claude/beautiful-ride-n6y3s2
# Conflicts:
#	amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt
2026-06-12 22:52:57 +00:00
Claude 0b5f926dd8 docs: TODO for gift-wrap deletion requests (recipient-authored kind 5)
Captures the verified current behavior (author-keyed DeletionIndex, no
wrap→rumor cascade, accidental seal-id blocking) and the agreed design:
recipient special case in hasBeenDeleted, recipient field on HostStub,
and the reverse-lookup live cascade in LocalCache.

https://claude.ai/code/session_01B39MQmrT3dz137nfpXABvo
2026-06-12 22:52:15 +00:00
Claude 46b2147598 Merge remote-tracking branch 'origin/main' into claude/sweet-shannon-smjotq 2026-06-12 19:52:34 +00:00
Vitor PamplonaandGitHub c6ac3bebed Merge pull request #3197 from davotoula/fix/relay-log-diagnostics
Make relay failure logs diagnosable (exception class on null message, correct NIP-11 error label)
2026-06-12 13:42:31 -04:00
Vitor PamplonaandGitHub e0e21f4562 Merge pull request #3192 from vitorpamplona/claude/eager-ptolemy-rwso2r
Add NIP-89 app recommendation management UI
2026-06-12 13:33:38 -04:00
davotoula d2f0b717ba Code review:
- apply exception-class fallback to connect() too
- dedup message construction
2026-06-12 19:30:09 +02:00
davotoula 91a003d72d fix(quartz): include exception class in relay failure logs when message is null 2026-06-12 19:30:09 +02:00
Vitor PamplonaandGitHub 5d1e9d3a6e Merge pull request #3194 from vitorpamplona/claude/vibrant-feynman-awdqs4
Exclude metadata tags from text search
2026-06-12 13:21:11 -04:00
Claude 5263e3b1d9 fix: exclude p, e, a, and alt tags from note text search matching
Their values are ids or descriptions of other events, not content of
the event itself, so they shouldn't make an event match a text search.

https://claude.ai/code/session_01YMs6aXuvs5NaYjzyPH6Zqj
2026-06-12 15:37:16 +00:00
Claude 7f39a18a02 fix: exclude client tag from note text search matching
Searching for an app name (e.g. "Amethyst") was returning every event
published through that client, because the local-cache note search
matched the search term against all tag values including the NIP-89
["client", ...] tag. Skip the client tag when matching tag values in
findNotesStartingWith.

https://claude.ai/code/session_01YMs6aXuvs5NaYjzyPH6Zqj
2026-06-12 15:07:13 +00:00