Skip to content

Messages: cursor pagination, onlyMine, and viewing-preference feed modes #36

Open

Description

@Adron

Current state

GetMessagesAsync uses ?limit=&offset=. The live spec documents limit, onlyMine, tag, cursor for GET /api/messages — offset is no longer a documented parameter.

Live verification (2026-09-15)

offset still works, and the response now returns a cursor alongside it:

"pagination": { "total": 360, "offset": 0, "limit": 2, "hasMore": true,
                "nextCursor": "MjAyNi0wOS0xMlQyMDo0MDowNS43NzdafDVjODIzZDQ1..." }

So this is not a live break today — but the app is on an undocumented parameter while the documented keyset path is available, and the spec is explicit: "Pass back the nextCursor from the previous response verbatim — never construct, parse, or modify one."

Viewing preferences (/help/settings)

GET /api/user returns viewingPreference and messagesPerPage (10–30). Documented feed modes: My Messages, All Messages, Followers Only, Following Only. The app honors none of them.

Acceptance criteria

  • Models/Pagination.cs gains NextCursor; GetMessagesAsync takes an opaque cursor and passes it back verbatim.
  • Infinite scroll in FeedViewModel drives off nextCursor, falling back to offset only if a cursor is absent.
  • onlyMine and tag are supported parameters.
  • Feed mode selector reflecting and honoring viewingPreference.
  • Page size honors messagesPerPage instead of the hard-coded limit = 20.

Activity

  1. Adron commented on Sep 16, 2026

    @Adron
    MemberAuthor

    Two of the four feed modes have no server-side support — this needs a decision

    GET /api/user stores viewingPreference, and /help/settings documents four modes: My Messages / All Messages / Followers Only / Following Only. The server enum (from its own 400) is my_messages, all_messages, followers_only, following_only.

    But GET /api/messages accepts only limit, onlyMine, tag, cursor — and there is no /api/feed* path at all. Probed live 2026-09-16:

    ?viewingPreference=following_only  -> n=2  total=363     <- silently ignored
    ?viewingPreference=followers_only  -> n=2  total=363     <- silently ignored
    ?viewingPreference=my_messages     -> n=2  total=363     <- silently ignored
    ?onlyMine=true                     -> n=2  total=36      <- genuinely filters
    

    The parameter isn't rejected, it's ignored — total stays 363 regardless. So:

    Mode Server support
    All Messages ✅ no parameter
    My Messages ✅ onlyMine=true (total drops 363 → 36)
    Followers Only ❌ none
    Following Only ❌ none

    Why I'm not guessing at this

    Client-side filtering is the only alternative and it's a bad one: it would mean fetching the follow graph, then paging the entire feed to find matching posts — many requests, wrong counts, and a "load more" that skips unpredictable amounts. That's worse than not offering the mode.

    What I'd suggest

    Implement the two modes that work (All / My), and render the other two as unavailable with a short explanation, rather than offering controls that silently do nothing — which is exactly the failure mode #47, #91 and #160 all turned out to be.

    The decision is yours: ship two modes now, or hold the whole selector until the server exposes a follow-scoped filter. If the web app implements Followers/Following Only, it's either doing it server-side through a route the spec doesn't document, or filtering client-side — worth checking before accepting this conclusion.

    Everything else in #36 (cursor pagination, onlyMine, messagesPerPage) is unblocked. Note Pagination.NextCursor and CursorPager<T> already exist in #130, and CurrentUser.EffectiveMessagesPerPage in #131.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Table stakesarea:messagesArea: messagesparityWeb/API feature-parity workquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions