Fix/history view #18

Merged
swedishfrenchpress merged 8 commits from fix/history-view into main 2026-05-21 14:39:38 +00:00
swedishfrenchpress commented 2026-05-21 10:51:50 +00:00 (Migrated from github.com)

Summary

  • Cashu Request (NUT-18) receive flow. New CashuRequest model +
    CashuRequestStore, request-builder (PaymentRequestBuilder), Nostr inbox
    listener (NostrInboxClient), and full detail / amount-picker / mint-picker
    UI. Integrated into ReceiveView (cross-fades from Receive Ecash into the
    request sheet) and surfaced as a first-class row in History alongside
    transactions.
  • History rebuilt for iOS-native feel. Replaced the chevron-pager + custom
    ScrollView+LazyVStack with List(.plain) and native Section headers.
    Picks up content-aligned separators, sentence-case section headers, and Liquid
    Glass scroll-edge treatment on iOS 26 for free.
  • History infinite scroll. Drops the page-N-of-M pager in favor of a
    sliding 30-row window with silent .onAppear prefetch 5 rows from the bottom.
    Filter changes reset the window and scroll to top via a ScrollViewReader +
    token.
  • .searchable in the nav-bar drawer, filtering by row title or amount.
  • Swipe-to-remove on Cashu Request rows (replaces long-press context menu).
    Destructive confirmation dialog kept as the safety net.
  • Smart relative dates: "Now" / "X min ago" / today's time / "Yesterday
    HH:MM" / "MMM d". No more "13 sec ago" jitter.
  • Pending Cashu Request trailing: grey "+21" → clock glyph + amount with
    no plus sign, so requested-not-received is unmistakable.
  • ContentUnavailableView for empty / search-miss / filter-miss states.
  • Large navigation title restored (.inline + hidden toolbar background
    dropped); Cashu Request rows switch from NavigationLink to Button +
    .navigationDestination(item:) so List doesn't add a chevron; per-row press
    feedback now handled by List.
  • QR-artifact sheets: Share button consistently lives top-right.
  • Design docs (DESIGN.md, PRODUCT.md) refreshed for UI rev 3 + the Cashu
    Request feature.

Test plan

  • Receive → tap "Cashu Request" → set amount → set mint → request sheet
    shows QR. Share button is top-right.
  • Pay a Cashu Request from another wallet; confirm the row updates in
    History and the detail view reflects received payments.
  • Remove a Cashu Request: swipe-from-trailing → Remove → confirm dialog →
    row disappears.
  • History with >30 rows: confirm 30 render initially, additional batches
    materialize silently on scroll, no chevron pager anywhere.
  • Switch filter (All ↔ Pending ↔ Completed): window resets to 30, list
    snaps back to top.
  • Search: type "lightning", "ecash", or an amount fragment — list filters;
    clearing search restores window.
  • Empty states: fresh wallet shows "No activity yet"; filter-no-match shows
    "Nothing here"; search-no-match shows the iOS search-empty state.
  • Relative dates: a transaction <60s shows "Now"; <1h shows "X min ago";
    today shows clock time; yesterday shows "Yesterday HH:MM"; older shows "MMM d".
  • Pending Cashu Request row: trailing area shows a clock glyph + amount
    in secondary, no +. Once received, it flips to green +amount.
  • Large title collapses to inline as you scroll; system blur appears on the
    nav bar.
  • Pull-to-refresh still fires syncPendingMintQuotes +
    checkAllPendingTokens.
  • VoiceOver swipe through rows still announces correctly; no leftover "Page
    X of Y" string.
## Summary - **Cashu Request (NUT-18) receive flow.** New `CashuRequest` model + `CashuRequestStore`, request-builder (`PaymentRequestBuilder`), Nostr inbox listener (`NostrInboxClient`), and full detail / amount-picker / mint-picker UI. Integrated into `ReceiveView` (cross-fades from Receive Ecash into the request sheet) and surfaced as a first-class row in History alongside transactions. - **History rebuilt for iOS-native feel.** Replaced the chevron-pager + custom `ScrollView`+`LazyVStack` with `List(.plain)` and native `Section` headers. Picks up content-aligned separators, sentence-case section headers, and Liquid Glass scroll-edge treatment on iOS 26 for free. - **History infinite scroll.** Drops the page-N-of-M pager in favor of a sliding 30-row window with silent `.onAppear` prefetch 5 rows from the bottom. Filter changes reset the window and scroll to top via a `ScrollViewReader` + token. - **`.searchable`** in the nav-bar drawer, filtering by row title or amount. - **Swipe-to-remove** on Cashu Request rows (replaces long-press context menu). Destructive confirmation dialog kept as the safety net. - **Smart relative dates:** "Now" / "X min ago" / today's time / "Yesterday HH:MM" / "MMM d". No more "13 sec ago" jitter. - **Pending Cashu Request trailing:** grey "+21" → `clock` glyph + amount with no plus sign, so requested-not-received is unmistakable. - **`ContentUnavailableView`** for empty / search-miss / filter-miss states. - Large navigation title restored (`.inline` + hidden toolbar background dropped); Cashu Request rows switch from `NavigationLink` to `Button` + `.navigationDestination(item:)` so List doesn't add a chevron; per-row press feedback now handled by List. - QR-artifact sheets: Share button consistently lives top-right. - Design docs (`DESIGN.md`, `PRODUCT.md`) refreshed for UI rev 3 + the Cashu Request feature. ## Test plan - [ ] Receive → tap "Cashu Request" → set amount → set mint → request sheet shows QR. Share button is top-right. - [ ] Pay a Cashu Request from another wallet; confirm the row updates in History and the detail view reflects received payments. - [ ] Remove a Cashu Request: swipe-from-trailing → Remove → confirm dialog → row disappears. - [ ] History with >30 rows: confirm 30 render initially, additional batches materialize silently on scroll, no chevron pager anywhere. - [ ] Switch filter (All ↔ Pending ↔ Completed): window resets to 30, list snaps back to top. - [ ] Search: type "lightning", "ecash", or an amount fragment — list filters; clearing search restores window. - [ ] Empty states: fresh wallet shows "No activity yet"; filter-no-match shows "Nothing here"; search-no-match shows the iOS search-empty state. - [ ] Relative dates: a transaction <60s shows "Now"; <1h shows "X min ago"; today shows clock time; yesterday shows "Yesterday HH:MM"; older shows "MMM d". - [ ] Pending Cashu Request row: trailing area shows a `clock` glyph + amount in secondary, no `+`. Once received, it flips to green `+amount`. - [ ] Large title collapses to inline as you scroll; system blur appears on the nav bar. - [ ] Pull-to-refresh still fires `syncPendingMintQuotes` + `checkAllPendingTokens`. - [ ] VoiceOver swipe through rows still announces correctly; no leftover "Page X of Y" string.
Sign in to join this conversation.
No description provided.