Skip to content

mobile: thread scroll-to-bottom and desktop-parity mention autocomplete#1499

Merged
wesbillman merged 2 commits into
mainfrom
brain/thread-scroll-bottom
Jul 3, 2026
Merged

mobile: thread scroll-to-bottom and desktop-parity mention autocomplete#1499
wesbillman merged 2 commits into
mainfrom
brain/thread-scroll-bottom

Conversation

@wesbillman

@wesbillman wesbillman commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Two mobile fixes, verified on the iOS simulator (iPhone 17 Pro).

1. Threads open scrolled to the newest reply

Tapping into a thread previously showed the oldest messages; you had to scroll manually to reach the latest reply. The thread detail list now uses the same reversed-ListView pattern as the channel timeline, so threads open at the bottom (newest reply visible), matching channel behavior.

2. Desktop-parity @mention autocomplete

The mention sheet now matches desktop's filtering, ordering, and per-entry info:

  • Ranking — port of desktop's mentionRanking.ts: channel members → people → non-member agents, with match quality exact > prefix > word-exact > word-prefix > pubkey and stable-order tiebreak. Limit 50, self included, same as desktop.
  • Candidates — eligible non-member relay agents (kind:10100 directory, desktop's respond_to/shared-channel eligibility rule) now appear alongside channel members.
  • Info subtitles — each row shows the same detail as desktop: bot icon + "agent", "owned by " (via BIP-340 verification of the profile's NIP-OA auth tag, mirroring profile_valid_oa_owner_pubkey), "not in channel", and an admin badge for human admins.

Deliberately out of scope (possible follow-up): desktop's global NIP-50 people search for stream/forum channels.

Screenshots

Empty @ — ranked members Agent subtitle + verified owner
Different owner resolves Tap inserts the mention

Testing

  • flutter analyze clean; all 416 tests pass (21 new: ranking-port tests mirroring desktop's, candidate assembly/eligibility, NIP-OA verifier incl. tamper/self-attestation rejection).
  • Manually verified on simulator: threads open at newest reply; empty @ shows ranked members; agent rows show verified owners; tapping inserts the mention.

wesbillman and others added 2 commits July 3, 2026 08:58
The thread detail page used a plain ListView, so tapping into a thread
always opened at the top (the thread head) instead of the latest reply.
Mirror the channel message list: reverse the ListView so offset 0 is the
newest reply, with the thread head rendered at the last index.

Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Port desktop's mention ranking to the mobile compose bar so both
clients filter and order @mention suggestions identically:

- mention_ranking.dart mirrors mentionRanking.ts: group order
  (channel members > people > non-member agents), match quality
  (exact > prefix > word-exact > word-prefix > pubkey), stable
  original-order tiebreak.
- Candidates now include eligible non-member relay agents from
  kind:10100 profiles, using desktop's eligibility rule (respond_to
  anyone + shared channel, or allowlisted), and no longer exclude
  the current user.
- Suggestion rows gain desktop's info subtitle: bot icon + "agent",
  admin badge, "owned by <name>", and "not in channel".
- Owner attribution verifies NIP-OA auth tags (BIP-340 Schnorr) on
  kind:0 profiles, matching profile_valid_oa_owner_pubkey; the user
  cache now records the verified ownerPubkey.

Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman force-pushed the brain/thread-scroll-bottom branch from c0b1f6d to b3e6c70 Compare July 3, 2026 15:04
@wesbillman wesbillman merged commit e9318f6 into main Jul 3, 2026
25 checks passed
@wesbillman wesbillman deleted the brain/thread-scroll-bottom branch July 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant