Skip to content

feat: Blog tab on the Feed engine — unified browse/search with view-owned paging - #234

Open
danieltmbr wants to merge 1 commit into
feature/feed-corefrom
feature/feed-blog-tab
Open

feat: Blog tab on the Feed engine — unified browse/search with view-owned paging#234
danieltmbr wants to merge 1 commit into
feature/feed-corefrom
feature/feed-blog-tab

Conversation

@danieltmbr

Copy link
Copy Markdown
Owner

Summary

Stack 2/4 (on #233). BlogTab is the reference implementation of the Feed pattern.

  • One PostsQuery drives everything: the local @Query predicate (PostRecord.blog), the network fetch, and — as the .task id — the re-fetch trigger on term/filter change
  • View-owned paging state: fetch(page:) folds FeedPage receipts in — failed page 1 clears (no dead sessions), failed next page keeps (scroll retries)
  • Row-driven frontier paging: rows at/past the fetched frontier pull the next page on appear — a warm cache (e.g. 200 cached posts) re-validates while scrolling instead of only at the list bottom
  • Pull-to-refresh + load-more in browse and search; no view debounce (the model supersedes)
  • Language filter now reaches the server

Old blog layer stays until its last consumers (QuotesTab piggyback, SearchTab) migrate in the next PR.

Verification

  • swift test --package-path app-core — 65 tests green
  • Reader scheme builds (macOS)

🤖 Generated with Claude Code

…wned paging

BlogTab becomes pure chrome; PostsList owns everything through one PostsQuery:
the same inputs drive the local @query predicate (PostRecord.blog), the network
fetch, and — as the task id — the re-fetch trigger on term/filter change.

- fetch(page:) folds receipts into view-owned paging state: a failed page 1
  clears it (no dead sessions), a failed next page keeps it so scrolling
  retries the same page
- Row-driven frontier paging: rows at/past the fetched frontier pull the next
  page as they appear, so a warm cache re-validates while scrolling instead of
  only at the very bottom
- Pull-to-refresh and load-more work in browse and search alike; fetches fire
  immediately (the model supersedes in-flight requests — no view debounce)
- Languages are sent to the server (?languages=) instead of filtering only
  locally

The old blog layer (BlogModel, actions, env keys) stays until its remaining
consumers (QuotesTab piggyback, SearchTab) migrate in the next PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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