Adding a feed from the CLI and from the page are the same steps written twice #161

Closed
opened 2026-10-08 18:36:26 -07:00 by rays · 1 comment
Owner

Found in a code audit on 2026-10-09.

ipx add (add, src/main.rs:746-781) and the page's Add feed (add_feed, src/web.rs:1455-1488) are the same steps written twice: find_feed, look for a feed already in the catalogue by same_feed, add_one, store. They have drifted (the CLI can list a feed in the Directory or give it a category; the web subscribes you), and a fix to one has to be made to the other by hand, such as #153's lock.

Wanted: one function both call, each keeping its own output.

Found in a code audit on 2026-10-09. `ipx add` (`add`, `src/main.rs:746-781`) and the page's Add feed (`add_feed`, `src/web.rs:1455-1488`) are the same steps written twice: `find_feed`, look for a feed already in the catalogue by `same_feed`, `add_one`, store. They have drifted (the CLI can list a feed in the Directory or give it a category; the web subscribes you), and a fix to one has to be made to the other by hand, such as #153's lock. Wanted: one function both call, each keeping its own output.
rays added the enhancement label 2026-10-08 18:36:26 -07:00
Author
Owner

Done in 6ddd644: add_to_catalogue() does the shared part under the lock; ipx add and the page's Add feed each find the feed and then do their own part. Deployed as 0.10.3-dev on 2026-10-09.

Done in 6ddd644: add_to_catalogue() does the shared part under the lock; `ipx add` and the page's Add feed each find the feed and then do their own part. Deployed as 0.10.3-dev on 2026-10-09.
rays closed this issue 2026-10-08 18:58:48 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#161