Commit Graph

11585 Commits

Author SHA1 Message Date
Claude 06c49874ea Merge unified EmojiPackCard grid into integration branch 2026-04-20 23:57:58 +00:00
Claude 99e911e914 feat(emoji): unified EmojiPackCard with dense grid layout
Introduce a shared EmojiPackCard composable that renders each pack as a
compact 3x2 emoji preview with title and count, using the emojis as the
visual identity. Cover image (when present) is shown as a small 24dp
corner-badge so it doesn't steal focus from the emoji grid.

Wire the card into three consumers and switch them all from vertical
lists to LazyVerticalGrid(Adaptive, minSize=160dp):
- ListOfEmojiPacksScreen (owned packs)
- MyEmojiListScreen (selected/subscribed packs)
- BrowseEmojiSetsScreen (kind 30030 discovery feed)

For owned packs, cover is suppressed so the top-right corner stays clear
for the edit/delete overflow menu. For My Emoji List, the remove button
is placed on top-start to avoid clashing with the cover badge.

Drop EmojiPackItem.kt (replaced entirely by EmojiPackCard + wrappers).
BrowseEmojiSetsScreen now bypasses the generic note renderer and drives
the feed's grid directly while keeping the subscription/filter wiring
untouched.

https://claude.ai/code/session_01SNG3nj8ZZDChggTsg1qznn
2026-04-20 23:55:07 +00:00
Claude 91117ca57d refactor(emoji): drop dead code and descriptive comments from metadata VM
- Delete createOrUpdate(): retained as "backward compatibility" with no callers
- Delete clearPickedMedia(): unused, direct assignment used everywhere
- Delete accountViewModel field: only written, never read after removing createOrUpdate
- Strip descriptive kdoc that restates what well-named identifiers already say
2026-04-20 23:18:29 +00:00
Claude fc804e7f80 Merge modern emoji metadata screen into integration branch 2026-04-20 22:20:49 +00:00
Claude fc29454b9c Merge Browse Emoji Sets feed into integration branch 2026-04-20 22:20:42 +00:00
Claude f0e224473b feat(emoji): add Browse Emoji Sets screen for kind 30030 discovery
Introduce a drawer-accessed feed that lists other users' EmojiPackEvents
with a top-nav hashtag filter bar mirroring the Polls browse screen.

- New route Route.BrowseEmojiSets wired in AppNavigation
- Drawer entry placed next to "My Emoji Packs"
- Feed filter + data source + sub-assembler under emojipacks/browse/
  following the PollsScreen / BadgesScreen architecture
- Filter semantics reuse kind3GlobalPeopleRoutes so the chips match
  the user's followed hashtag list from Polls
- Per-relay Global / AllFollows / Authors / MutedAuthors / Hashtag
  sub-assembly helpers request kind 30030 events (optionally scoped
  by #t tag) - geohash intentionally omitted since emoji packs are
  not location-scoped
2026-04-20 22:12:20 +00:00
Claude e23f02d72d feat(emoji): modernize pack metadata screen (hero image, inline upload)
Replaces the plain stacked-form EmojiPackMetadataScreen with the badge-
definition layout: a large square hero preview at the top, Name and
Description fields below, and a single Create/Save action.

Picking an image now launches the gallery directly (no URL paste step).
If the user submits with a freshly picked local image, the ViewModel
uploads to the account's default file server first, then publishes the
EmojiPackEvent with the uploaded URL in `image`. Existing remote URLs
keep rendering as the hero until replaced. The signer contract and
ownedEmojiPacks create/update calls are unchanged.
2026-04-20 22:11:34 +00:00
Claude 0d1f5f0ed8 Rename drawer entry: Manage Emoji Packs → My Emoji Packs 2026-04-20 21:44:56 +00:00
Claude a365ddcad2 Merge emoji image uploader into integration branch 2026-04-20 21:44:38 +00:00
Claude 1e2efcdefc feat(emoji): upload emoji image inline in AddEmojiDialog
Adds a gallery-picker icon as the leadingIcon of the URL field in
AddEmojiDialog. The uploader uses the same NIP-96/Blossom pathway as
BookmarkGroupMetadataViewModel — the upload function and progress
state live on EmojiPackViewModel so the dialog stays composable-only.

On upload success the returned URL is written back to the dialog's
local url state, leaving the user's shortcode entry and private
toggle intact, so the existing validation flow (EmojiUrlTag.isValidShortcode
+ supportingText error) keeps working.

https://claude.ai/code/session_01SNG3nj8ZZDChggTsg1qznn
2026-04-20 20:51:56 +00:00
Claude 298e912594 feat(emoji): upload cover image in emoji pack metadata screen
Reuses the NIP-96/Blossom uploader plumbing from BookmarkGroupMetadata —
the cover image field now shows a gallery-picker icon on its leading
side and populates the URL on upload success. The manual URL input
still works as before.

https://claude.ai/code/session_01SNG3nj8ZZDChggTsg1qznn
2026-04-20 20:51:36 +00:00
Claude 92ece0da1f Merge My Emoji List selection editor into integration branch 2026-04-20 20:05:07 +00:00
Claude efe0a8b130 Merge emoji private-toggle UI into integration branch 2026-04-20 20:05:00 +00:00
Claude 8b2eac72c3 feat: add My Emoji List screen for managing kind 10030 selection
Adds MyEmojiListScreen under emojipacks/membershipManagement/, reachable
from the "My Emoji List" header row in ListOfEmojiPacksScreen (which
previously had a no-op click handler).

The screen enumerates every pack address referenced by the user's kind
10030 selection event and renders each with title, author name, pack
thumbnail, and a preview of its emojis. A trailing delete icon calls
account.removeEmojiPack(note) which republishes the 10030 without that
pack's `a` tag; downstream consumers (reaction menu, `:` autocomplete in
composers) refresh automatically since they share the same flow.

Tapping a row routes to Route.EmojiPackView(dTag) when the pack is
self-authored, and to Route.Note(addressTag) otherwise. EmojiPackView is
backed by OwnedEmojiPacksState, which filters to the logged-in user's
authored packs, so selected packs authored by other users must use the
generic thread viewer (which already renders kind 30030 via
RenderEmojiPack).

Reordering is intentionally deferred: it would require a new
EmojiPackSelectionEvent.reorder(...) builder in Quartz (none exists
today) and a drag affordance that doesn't conflict with tap-to-view /
tap-to-delete. The header's `openMyEmojiList` callback remains the only
nav entry point, so adding reorder later is a pure follow-up.
2026-04-20 19:58:43 +00:00
Claude cd2793b2e3 feat(emoji): add public/private toggle to add emoji dialog
Adds a FilterChip toggle to AddEmojiDialog letting users choose whether a
new custom emoji is written to the public `emoji` tags or to the encrypted
`.content` (NIP-51 private tags) of their kind 30030 EmojiPackEvent.

Because the downstream consumers (`:` autocomplete via EmojiSuggestionState
and the reaction menu via RenderEmojiPack) currently read public tags only
through EmojiPackState.mergePack / EmojiPackEvent.taggedEmojis(), private
emojis are NOT surfaced end-to-end yet. Rather than silently shipping a
half-broken surface (which would also only work for self-owned packs since
foreign packs cannot be decrypted anyway), the dialog now shows an honest
explainer describing exactly what "private" means today: stored encrypted,
visible only to the pack owner in this screen.

EmojiPackScreen already rendered both lists; the grid now distinguishes
private entries with a small lock badge overlay and updates the
long-press deletion path to pass isPrivate through so removeEmoji removes
from the correct location (encrypted content vs public tags).
2026-04-20 19:46:20 +00:00
Claude 8444b943f7 fix: show emoji-list action (not bookmark) for kind 30030 notes
Three-dots menu on an EmojiPackEvent now offers Add/Remove from my emoji
list (kind 10030) and navigates to EmojiPackSelection. The regular
Manage bookmarks row is hidden for emoji packs so they can't end up in
the bookmark list by mistake. Closes #2426.
2026-04-20 17:58:33 +00:00
Claude 2c6b8596ec feat: add emoji pack management screens
Add screens under ui/screen/loggedIn/emojipacks/ mirroring the bookmarkgroups
layout:
 - list/ListOfEmojiPacksScreen plus EmojiPackItem for the pack feed, with a
   "My Emoji List" row at the top that surfaces kind 10030 selection count.
 - list/metadata/EmojiPackMetadataScreen(+ViewModel) for create/edit form.
 - display/EmojiPackScreen(+ViewModel) rendering the emoji grid, FAB to add,
   long-press to delete. AddEmojiDialog validates the shortcode live against
   EmojiUrlTag.isValidShortcode.
 - membershipManagement/EmojiPackSelectionScreen providing a single toggle
   for the user's kind 10030 selection.

New routes EmojiPacks, EmojiPackView, EmojiPackMetadataEdit, and
EmojiPackSelection wired through AppNavigation. A Manage Emoji Packs row is
added to the drawer. English-only strings added to strings.xml.
2026-04-20 17:58:19 +00:00
Claude 49568b9ca3 feat: add OwnedEmojiPacksState for managing the user's kind 30030 packs
Mirrors the LabeledBookmarkListsState structure: observes all authored
EmojiPackEvents in the local cache, exposes a sorted StateFlow<List<OwnedEmojiPack>>
for the UI, and provides suspend helpers for create/update/addEmoji/removeEmoji/
deletePack. Pack deletion publishes a kind 5 deletion event. Account gains
pass-through methods so AccountViewModel.launchSigner can invoke them.

Add a unit test for the OwnedEmojiPack data class.
2026-04-20 17:57:58 +00:00
Claude 5d74b4175b NIP-30: fix EmojiPackEvent.build typing and add metadata helpers
The build DSL was typed as TagArrayBuilder<GitRepositoryEvent>, which made
signer.sign(template) return the wrong event subclass. Retype it to
EmojiPackEvent and add local TagArrayBuilder extensions for title,
description, and image tags. Also add title()/description()/image()
accessors on EmojiPackEvent to match the LabeledBookmarkListEvent pattern.
2026-04-20 17:57:42 +00:00
Vitor Pamplona f76e4f4c49 Merge pull request #2458 from vitorpamplona/claude/investigate-github-issue-k17Fx
Add emoji set support and shortcode validation to NIP-30
2026-04-20 12:36:18 -04:00
Claude 254f5bdcc2 NIP-30: use Address type for emoji-set reference instead of raw string
Makes the API safer: callers can't accidentally pass an unparsed or
malformed identifier. EmojiUrlTag.emojiSet is now Address?, serialized
via toValue() and parsed via Address.parse() (which rejects anything
that isn't a well-formed kind:pubkey:dTag).
2026-04-20 16:35:29 +00:00
Vitor Pamplona 99ce01af4e Merge pull request #2457 from vitorpamplona/claude/fix-members-tag-update-OKFvB
Refactor Marmot group members to use reactive state flow
2026-04-20 12:33:34 -04:00
Vitor Pamplona e0094f163b ⏺ fix: derive nostrGroupId from MLS GroupContext in Welcome processing
The "h" tag is optional in MIP-02 Welcome events — senders like
  whitenoise-rs omit it. Instead of failing when the h-tag is absent,
  derive nostrGroupId from the NostrGroupData extension embedded in the
  Welcome's GroupContext (the authoritative MLS source). An h-tag hint,
  if present, is still validated against the MLS-derived value.
2026-04-20 12:32:42 -04:00
Claude b6e31b21c8 refactor: make Marmot group members list reactive
Expose the member list as MutableStateFlow<List<GroupMemberInfo>> on
MarmotGroupChatroom, populated by MarmotManager.syncMetadataTo alongside
the existing memberCount. MarmotGroupInfoScreen and RemoveMemberScreen
now observe it via collectAsStateWithLifecycle, so both remote commits
(already routed through syncMetadataTo in DecryptAndIndexProcessor) and
local mutations refresh the UI without manual re-queries.

Account.addMarmotGroupMember and removeMarmotGroupMember now call
syncMetadataTo right after the MLS state is mutated, mirroring the
pattern already used by updateMarmotGroupMetadata, so the local change
is visible immediately without waiting for the relay round-trip.
2026-04-20 16:27:31 +00:00
Vitor Pamplona 9766cc5901 Fixes the group id parsing 2026-04-20 12:23:46 -04:00
Claude 93c2041f0f NIP-30: add optional emoji-set address and shortcode validation
Per NIP-30 the emoji tag is ["emoji", <shortcode>, <url>, <emoji-set-address>]
with the fourth field optional. EmojiUrlTag only exposed the first three.
Adds emojiSet as an optional field, preserves existing positional callers
via default null, and introduces isValidShortcode() so callers can validate
user input against the spec (alphanumeric, hyphens, underscores).
2026-04-20 16:21:30 +00:00
Vitor Pamplona 4ccabb01e6 Adding capabilities to Amethyst's groups 2026-04-20 12:14:35 -04:00
Vitor Pamplona 4f2f8e180e Generates keypackages with 64 chars 2026-04-20 12:00:31 -04:00
Claude 7e45042c27 fix: refresh Marmot group members list when returning to info screen
Replace LaunchedEffect with LifecycleResumeEffect so the members list
(and chatroom.memberCount) is re-queried every time MarmotGroupInfoScreen
resumes, not just when nostrGroupId changes. Previously, after adding a
member via the AddMemberScreen and popping back, the members count
displayed in the header and chat top bar stayed stale until the screen
was fully recreated.
2026-04-20 15:58:00 +00:00
Vitor Pamplona f71d8eebb8 fixes the script for keypackages not showing up in wn 2026-04-20 11:42:29 -04:00
Vitor Pamplona e41ad84096 Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2026-04-20 11:22:50 -04:00
Vitor Pamplona 1c797107bc fixes script on macos 2026-04-20 11:20:38 -04:00
Vitor Pamplona ad624031bf Improves the FetchFirst to not fail in the first eose from the first relay. 2026-04-20 11:15:09 -04:00
Vitor Pamplona d7cc99b196 update dependencies 2026-04-20 10:51:40 -04:00
Vitor Pamplona 37af8b0c45 fixes deprecation on vico charts 2026-04-20 10:51:18 -04:00
Vitor Pamplona 036323fa53 This was added by the secp rewrite, but we moved them out to another repo, so now it can be removed. 2026-04-20 10:43:54 -04:00
Vitor Pamplona 57af16302e Merge pull request #2455 from vitorpamplona/claude/fix-scaffold-scrolling-NHdRa
Refactor DisappearingScaffold to use unified bar state management
2026-04-20 10:42:01 -04:00
Vitor Pamplona 3e488623d4 Merge pull request #2453 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-04-20 10:24:23 -04:00
Crowdin Bot e808d40834 New Crowdin translations by GitHub Action 2026-04-20 14:19:21 +00:00
Claude 7637596835 Merge remote-tracking branch 'origin/main' into claude/fix-scaffold-scrolling-NHdRa 2026-04-20 14:19:18 +00:00
Vitor Pamplona 5551f2f7d2 Merge pull request #2456 from vitorpamplona/claude/nip51-interest-sets-p0f6r
Add Interest Sets feature for organizing hashtags
2026-04-20 10:17:31 -04:00
Claude 4c82011a25 fix(interest-sets): consume kind 30015 locally + empty-state polish
- LocalCache.consume dispatcher now handles InterestSetEvent via
  consumeBaseReplaceable, so the event created by the user is stored
  and flows through newEventBundles → interestSets.newNotes → listFeedFlow
  refresh. Without this, the just-signed event sat in the sendMyPublicAndPrivateOutbox
  call but the UI never saw the update.
- List screen: icon + centered text for the empty state and dividers
  between rows.
2026-04-20 14:11:06 +00:00
Vitor Pamplona 282b3a436b Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2026-04-20 09:53:18 -04:00
Vitor Pamplona 0e077c02d0 linting 2026-04-20 09:41:58 -04:00
Vitor Pamplona 83837ad090 Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2026-04-20 09:38:12 -04:00
davotoula 5eb91145df style: strip trailing whitespace and fix indent flagged by spotless
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 15:37:56 +02:00
Vitor Pamplona 2f3d035d3c Fixes failing tests due to dispatcher misconfiguration 2026-04-20 09:34:48 -04:00
Claude 198e950f37 feat(interest-sets): NIP-51 Interest Sets (kind 30015) UI + TopNav chips
Add Android UI for managing NIP-51 Interest Sets and surface them as chips
in the TopNav feed filter alongside followed hashtags. InterestSetEvent was
already implemented in Quartz; this wires it into the app.

- InterestSetsState mirrors LabeledBookmarkListsState: listFeedFlow with
  versioned refresh, decrypted hashtag cache keyed by dTag for the feed
  filter pipeline, and suspend helpers for create/rename/delete/clone/add
  hashtag/remove hashtag/move (public<->private).
- New screens under ui/screen/loggedIn/interestSets/: list, metadata edit
  (create/rename, title-only since InterestSetEvent has no image field),
  and display screen with add/remove + public/private toggle per hashtag.
- TopFilter.InterestSet(address) feeds into a new MultiHashtagFeedFlow
  that reuses HashtagTopNavFilter with Set<String>.
- TopNavFilterState.mergeInterests emits interest-set chips; FeedFilterSpinner
  groups them under a new "Interest Sets" category.
- Drawer entry + HomeScreen FAB branch.
2026-04-20 13:28:51 +00:00
Vitor Pamplona 516115cc1c Fixes test cases for the CallManagerTest 2026-04-20 09:21:01 -04:00
Vitor Pamplona fab435509b Merge pull request #2454 from vitorpamplona/claude/add-thumbhash-support-ZfNS1
Add ThumbHash support for image placeholders
2026-04-20 08:51:36 -04:00