Skip to content

Native activity feed - #113

Merged
float3 merged 2 commits into
mainfrom
native-activity-feed
Nov 4, 2026
Merged

float3 merged 2 commits into
mainfrom
native-activity-feed

Conversation

@float3

@float3 float3 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Refs #94

The activity feed (/community#activity) is now a native screen, AnkiquestFeedActivity. Notifications about friends' news land there instead of the web view.

Screen

  • Inbox, newest first and grouped by day: friends' shared wins with their card, cheers, messages, replies (with the message they answer), deck completions, conquests and challenge news. Unread rows are tinted.
  • Invitations that still need an answer are listed first, as on the website.
  • Filters: All, Needs action (with its count), Messages, Challenges, Deck completions, Study updates, and Unread only.
  • Actions on a row:
    • 🎉 Cheer on a friend's win or deck completion (shows "Cheered" once sent)
    • the one-tap reply the notifications suggest ("Good job!", "Thanks!", "On it!"), or your own words
    • Mark read
    • Open goal / View invitation. Challenges are still the website's, so this opens the goal in the web view and marks the row read.
  • Mark all as read, Load earlier activity, Refresh.
  • A Sent tab: replies and nudges you sent, with when they were seen.
  • Offline, refused-token and server-error states. Signed out, the screen asks you to connect.
  • An older server without /api/activity gets its 7-day notification list, with no filters or read state, as the website does. A server that rejects a filter gets the whole feed.
  • Same colours, insets and day/night theme as Today. Strings in en, de, es, fr and pt.

Routing

  • AnkiquestNavigation.notificationDestination has a new Destination.Activity. Share, reaction, completion, conquest, message and reply notifications open the native feed.
  • The "sent"/"failed" reply notifications and Today's Activity button open it too.
  • A notification for a different account opens this account's feed and says so. That includes a challenge link for another account, which used to open the web feed.

Requests

  • All requests go through AnkiquestApi with the captured account; answers for an account that was signed out in the meantime are dropped.
  • GET /api/activity/{user} (limit, before, category, unread_only), GET /api/activity/{user}/sent, POST /api/activity/{user}/read (ids in batches of 200, or through), POST /api/react/{user}, POST /api/reply/{user}, and GET /api/notifications/{user} as the fallback.
  • Card images are fetched only from the account's own server.

Tests

  • AnkiquestFeedTest: parsing a page with rows shaped like the server's recorded examples, query parameters and token, the 404 and 400 fallbacks, read batching, reply and cheer requests, sent items, and the image host check.
  • AnkiquestFeedActivityTest: what each row shows, cheer, quick reply, a failed reply, mark all read, filters, paging, opening an invitation, the Sent tab, an older server, offline and refused states, no account, another account's notification, and the web view handing another account's page to the feed.
  • AnkiquestFeedScreenshotTest (opt-in, like Today's): 320dp and 200% text.
  • Updated the navigation, notifier and Today tests.

Not covered yet

Friends' wins, cheers, messages, replies, deck completions and challenge news are read from /api/activity, with filters, read state, cheers, replies, paging and a Sent tab. Share, reaction, completion, conquest, message and reply notifications, reply receipts and Today's Activity button open the new screen; a page for another account opens this account's feed.
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Snapshot diff report vs main. Open screenshot-diff for diffs.

  • AllActivitiesScreenshotTest: 2 changes
  • AnkiquestFeedScreenshotTest: 2 changes
All 4 changed screenshots

AllActivitiesScreenshotTest

  • AnkiquestFeedActivity_compare.png
  • AnkiquestFeedActivity_edgeToEdge_compare.png

AnkiquestFeedScreenshotTest

  • activity_feed_320dp_200percent_compare.png
  • activity_feed_320dp_compare.png

@float3
float3 merged commit 3db184d into main Nov 4, 2026
37 checks passed
@float3
float3 deleted the native-activity-feed branch November 4, 2026 15:28
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