Uptoolkit
GitHub

Activity Entries

ActivityPub feed entry vocabulary, classification, filtering, and grouping helpers.

ActivityKindActor
Createpost@mira
Likereaction@tobi
Announceshare@mira
Followfollow@kestrel
Createpost@tobi
EmojiReactreaction@rk
Addalbum@mira
Joinjoin@mira
Updateprofile@mira
Deletedelete@juno

Installation

npx shadcn@latest add https://ui.uptoolkit.com/r/activity-entries.json

Usage

The classification layer between raw ActivityPub collections and feed UI. It maps Create, Announce, Like, Follow, and the rest of the ActivityStreams vocabulary into renderable FeedEntry rows, with optional filtering and date grouping.

import {
  countFeedEntries,
  filterFeedEntries,
  getFeedEntryKind,
  groupFeedEntries,
  toFeedEntries,
  toTimelineEntries,
} from "@/lib/activity-entries";

const entries = toFeedEntries(collection.orderedItems ?? []);
const timeline = toTimelineEntries(entries); // Create and Announce only
const today = groupFeedEntries(entries, { now: renderedAt, locale: "en" });

Entry kinds

ActivityKind
Createpost
Announceshare
Like, EmojiReactreaction
Followfollow
Addalbum
Updateprofile
Joinjoin
Deletedelete

Wall context

Pass a subject actor when you need visitor-post ribbons on a profile wall:

toFeedEntries(activities, { subject: owner });

addressedToSubject is true when a post is addressed to the subject by someone else — the same signal ActivityPub uses via cc and audience.

Filters

filterFeedEntries and countFeedEntries power the filter tabs in activity-feed. sampleActivityCollection is a mixed OrderedCollection you can drop into previews or tests.