feat(home): paginate activity feed to fill screen height #354

Closed
opened 2026-07-08 08:29:16 +00:00 by fuzzy · 0 comments
Owner

What

Paginate the home screen activity feed so it fills the available screen height instead of leaving blank space.

Why

The feed only fetches the first page of results (~30 events). For users with active instances the visible list is short, leaving most of the screen empty.

Cache strategy

Condition Behavior
Cold start (no cache) Fetch all available pages up to a sane limit, cache the full result
Subsequent runs Fetch only the first page, merge into cache, render from cache
Cache stale Re-fetch first page, update cache, render

This keeps startup slow only once; subsequent loads are fast.

How

  • Use the existing pagination helpers (PageSize=50, max N pages)
  • Calculate pagesNeeded = ceil(screenHeight / pageSize) to determine how many pages to fetch
  • Cache per-page data keyed by page number
  • Merge new page-1 data into cache on refresh

States

  • Loading — spinner while fetching initial pages
  • Partial — some pages loaded, rendering what we have while rest arrives
  • Populated — full feed rendered
  • Cached (subsequent) — render from cache immediately, async page-1 refresh
  • Error — show error with retry, fall back to cached data if available
## What Paginate the home screen activity feed so it fills the available screen height instead of leaving blank space. ## Why The feed only fetches the first page of results (~30 events). For users with active instances the visible list is short, leaving most of the screen empty. ## Cache strategy | Condition | Behavior | |-----------|----------| | **Cold start** (no cache) | Fetch all available pages up to a sane limit, cache the full result | | **Subsequent runs** | Fetch only the first page, merge into cache, render from cache | | **Cache stale** | Re-fetch first page, update cache, render | This keeps startup slow only once; subsequent loads are fast. ## How - Use the existing pagination helpers (PageSize=50, max N pages) - Calculate `pagesNeeded = ceil(screenHeight / pageSize)` to determine how many pages to fetch - Cache per-page data keyed by page number - Merge new page-1 data into cache on refresh ## States - **Loading** — spinner while fetching initial pages - **Partial** — some pages loaded, rendering what we have while rest arrives - **Populated** — full feed rendered - **Cached (subsequent)** — render from cache immediately, async page-1 refresh - **Error** — show error with retry, fall back to cached data if available
fuzzy self-assigned this 2026-07-08 08:29:16 +00:00
fuzzy changed title from paging for home screen activity feed to feat(home): paginate activity feed to fill screen height 2026-07-08 08:29:33 +00:00
fuzzy closed this issue 2026-07-08 10:23:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/steeper#354
No description provided.