Feat/parsing#8
Draft
AlexAxthelm wants to merge 7 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end feed import support: a new HTTP capability fetches an RSS feed in the iOS shell, Rust parses it into Subscription + Episode records, and the iOS database upserts the feed and episodes while preserving existing IDs on refresh.
Changes:
- Introduces an
HttpOperation/HttpResultcapability and wires it through the Rust effect system and iOS Core. - Adds
parse_feedutility (feed-rs) and a new storage op to upsert a subscription and its episodes together. - Updates iOS UI to accept a feed URL and display errors; adds DB tests for the new upsert behavior.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/src/model.rs | Tracks current feed fetch state via fetching_feed. |
| shared/src/lib.rs | Registers feed_parser module and re-exports HTTP capability types. |
| shared/src/feed_parser.rs | New RSS parsing utility producing Subscription + Episodes. |
| shared/src/effect.rs | Adds Http to the Crux effect enum. |
| shared/src/capabilities/storage.rs | Adds UpsertFeedWithEpisodes operation. |
| shared/src/capabilities/mod.rs | Exposes new http capability module. |
| shared/src/capabilities/http.rs | Defines FetchFeed operation and HttpResult output. |
| shared/src/app.rs | Adds fetch/parse/save events plus tests for the new flow. |
| shared/Cargo.toml | Adds feed-rs and uuid dependencies. |
| iOS/project.yml | Adds UILaunchScreen property config. |
| iOS/PolluxTests/DatabaseManagerTests.swift | Adds tests covering upsertFeedWithEpisodes behavior. |
| iOS/Pollux/Info.plist | Adds UILaunchScreen key. |
| iOS/Pollux/DatabaseManager.swift | Implements upsertFeedWithEpisodes in SQLite via GRDB. |
| iOS/Pollux/core.swift | Adds HTTP effect handling and result resolution for HttpResult. |
| iOS/Pollux/ContentView.swift | Adds feed URL input UI and displays errors. |
| Cargo.lock | Locks new transitive deps for feed parsing + uuid. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+87
to
+95
| StorageResult::Subscription(sub) => { | ||
| if let Some(pos) = model.subscriptions.iter().position(|s| s.id == sub.id) { | ||
| model.subscriptions[pos] = sub; | ||
| } else { | ||
| model.subscriptions.push(sub); | ||
| model.subscriptions.sort_by_key(|a| a.title.to_lowercase()); | ||
| } | ||
| model.error = None; | ||
| } |
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.
Add feed parsing utilities