Skip to content

Fix FreshRSS Reader API item discovery window based on published-date ot#5156

Open
mncaudill wants to merge 1 commit intoRanchero-Software:mainfrom
mncaudill:codex/fix-readerapi-ot-window
Open

Fix FreshRSS Reader API item discovery window based on published-date ot#5156
mncaudill wants to merge 1 commit intoRanchero-Software:mainfrom
mncaudill:codex/fix-readerapi-ot-window

Conversation

@mncaudill
Copy link

Reader API sync for the FreshRSS/Miniflux path used lastArticleFetchStartTime to compute the ot parameter for /stream/items/ids.

On these feed readers, ot is applied to entry published date (not read/unread state-change time). This can drop entries from discovery when:

  1. an entry is published before desktop’s last fetch timestamp,
  2. the entry is read on phone before desktop ingests it,
  3. desktop sync then queries with ot=lastArticleFetchStartTime.

Result: the item may never be fetched locally and can appear to “disappear” until manually toggled unread server-side.

Repro:

  • FreshRSS/Miniflux Reader API account.
  • Read an unread article on phone first.
  • Open/sync desktop NetNewsWire.
  • Article is missing unless marked unread again on the server.

Fix:

  • For ReaderAPI variant .freshRSS, stop using lastArticleFetchStartTime for account-level item ID discovery.
  • Use a stable rolling baseline window (now - 3 months) for ot instead.
  • Keep existing last-fetch behavior for non-FreshRSS Reader API variants.

Tests:

  • Add ReaderAPICaller tests asserting:
    • FreshRSS uses baseline window for ot.
    • Generic Reader API continues using lastArticleFetchStartTime.

Reader API sync for the FreshRSS/Miniflux path used lastArticleFetchStartTime
to compute the `ot` parameter for `/stream/items/ids`.

On these servers, `ot` is applied to entry published date (not read/unread
state-change time). This can drop entries from discovery when:

1. an entry is published before desktop’s last fetch timestamp,
2. the entry is read on phone before desktop ingests it,
3. desktop sync then queries with `ot=lastArticleFetchStartTime`.

Result: the item may never be fetched locally and can appear to “disappear”
until manually toggled unread server-side.

Repro:
- FreshRSS/Miniflux Reader API account.
- Read an unread article on phone first.
- Open/sync desktop NetNewsWire.
- Article is missing unless marked unread again on the server.

Fix:
- For ReaderAPI variant `.freshRSS`, stop using lastArticleFetchStartTime for
  account-level item ID discovery.
- Use a stable rolling baseline window (now - 3 months) for `ot` instead.
- Keep existing last-fetch behavior for non-FreshRSS Reader API variants.

Tests:
- Add ReaderAPICaller tests asserting:
  - FreshRSS uses baseline window for `ot`.
  - Generic Reader API continues using lastArticleFetchStartTime.
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