Repository navigation
Sync with FreshRSS - #65
Merged
Merged
Conversation
Category IDs become text, since FreshRSS knows a category only by its name;
Miniflux keeps its numbers, written as text. Migration 7 adds the account's
service and turns folders.remote_id into a TEXT column in place (ADD, DROP
and RENAME COLUMN): rebuilding the table with foreign keys on would clear
every feeds.folder and folders.parent. A frozen v7 fixture with a connected
account, nested folders and a category checks that all of it survives.
The Backend trait gains what FreshRSS needs: its service, whether a feed's
address can change, how read and star changes are learned (listed changes,
or complete unread and starred ID sets), and the ID-set methods. Renaming a
category returns its new ID. Synced articles are identified by their
service ("miniflux:ID" or "freshrss:ID"), and a refresh after disconnecting
re-links either. Enclosures already linked in an entry's content are not
appended again. Miniflux behaves as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sync::freshrss::Client implements Backend on /api/greader.php: it signs in once with ClientLogin (user name and API password), fetches the write token once and sends it first in every write, and follows no redirects. Unread and starred entries come as complete ID sets, new ones by `ot`, and contents by ID in batches that split when a reply is too large; feeds shown only on their own, which the reading list leaves out, are asked for one by one. Categories are known by name. Renaming or removing one first checks that it is a category and not an entry label, refuses a taken name, and checks the result afterwards, since FreshRSS answers OK either way; the default category cannot be removed. A feed's address cannot change, and quickadd's refusal reason comes through. Addresses may name the server, its folder, or the API itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A service that cannot list what changed since a time (StateSync::IdSets) is synced from the IDs of the entries new since the cursor (or the last 30 days, the first time), of every unread and of every starred entry; only entries the library lacks are fetched, with their state from the sets, and the complete sets need no count repair. Removing a category whose feeds the service keeps syncs at once, so they show where they went. tests/freshrss_sync.rs mirrors an account against a mock that behaves like FreshRSS: categories by name, a default category that stays, renames onto a taken name and removals of the default answering OK, entry labels sharing the categories' stream IDs, feeds left out of the reading list, quickadd refusing with HTTP 200, and an old unread entry outside the new IDs. An ignored test runs against a real FreshRSS given OMAFEED_FRESHRSS_URL, OMAFEED_FRESHRSS_USER and OMAFEED_FRESHRSS_PASSWORD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The account module picks the client by the account's service and keeps the secret (Miniflux's API key, or FreshRSS's API password) in the keyring per service and server; OMAFEED_SYNC_TOKEN replaces OMAFEED_MINIFLUX_TOKEN, which still works. `omafeed account connect --service freshrss --username NAME URL` connects to FreshRSS (Miniflux stays the default), and the window's connect form gains a service choice and, for FreshRSS, a user name field. Messages name the connected service instead of Miniflux, the menu entry is "Sync account…", and the feed form locks the address of a FreshRSS feed, which FreshRSS cannot change; Feed::remote tells the server's feeds from those it refused. Help and messages changed on purpose, so the output snapshots were blessed again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README's sync section covers both services, with what FreshRSS does differently: ID-set syncs, the default category, categories made when a feed goes in, locked feed addresses, no feed errors or server-side full articles, altered title punctuation. ARCHITECTURE describes the second backend, the state-sync kinds, migration 8 and the new tests, and the unreleased notes announce FreshRSS, OMAFEED_SYNC_TOKEN and the schema change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connecting while an account is connected is refused before the keyring is touched, so a second `account connect` can no longer replace the connected account's secret with one that fails every sync. An enclosure is left out only when the content names it as a whole attribute value, not when it is a prefix of another link. The docs say that archiving a feed in FreshRSS removes it here, since the API no longer lists it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
url 2.5.9 fixes RUSTSEC-2026-0592, a stack overflow in Url::origin() on nested blob: URLs. RUSTSEC-2026-0543 marks chrono unmaintained with no fixed version; it is ignored in deny.toml with its reason until chrono is replaced, which is a change of its own. Both advisories were published after main last passed and fail every branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
omafeed can now mirror a FreshRSS account as well as a Miniflux one, from the window (Sync account…, with a service choice) or
omafeed account connect --service freshrss --username NAME URL. Miniflux stays the default and behaves as before.Why it looks the way it does
FreshRSS's Google Reader API (
/api/greader.php) differs from Miniflux in ways that shape the design:otselects entries added or whose content changed, not those read or starred. So a FreshRSS sync reads the complete unread and starred ID sets, the IDs new since the cursor (stream/items/ids?ot=), and fetches content only for IDs the library lacks. The sets are complete, so no count repair is needed. A quiet sync fetches no entries.Category::id: String,folders.remote_id TEXT; Miniflux numbers are stored as text). Migration 7 (schema 7→8) replaces the column in place with ADD/DROP/RENAME COLUMN — not a table rebuild, which with foreign keys on would clearfeeds.folderandfolders.parent. A new frozen fixture (data-v7.sql, connected account, nested folders, a category) checks this.OKand do nothing; the same endpoints act on entry labels — the client checkstag/listbefore and after. Feeds shown "in their own feed only" are left out of the reading list, so their IDs are asked for per feed.quickaddrefuses with HTTP 200 and anerror. A feed's address cannot change (the edit form locks it). Enclosures already linked in the content are not appended again.Changes
sync/backend.rs:service(),can_change_feed_url(),state_sync()(Changes|IdSets), and ID-set methods;rename_categoryreturns the new ID.sync/freshrss.rs: the client, with unit tests against a mock.sync/mod.rs: the ID-set sync path; removing a category whose feeds the server keeps syncs at once.account.service, article identitiesfreshrss:ID(re-linked after disconnect likeminiflux:ID),Feed::remote.OMAFEED_SYNC_TOKEN(oldOMAFEED_MINIFLUX_TOKENstill read); messages name the connected service; connecting while connected is refused before the keyring is touched.Testing
make check(fmt, clippy, all tests, docs); the desktop smoke test under Xvfb.tests/freshrss_sync.rsagainst a mock reproducing the quirks above; an ignored test ran green against a real FreshRSS 1.31 (OMAFEED_FRESHRSS_URL/USER/PASSWORD).🤖 Generated with Claude Code