Move torrent actions and detail loading onto TransmissionStore#88
Move torrent actions and detail loading onto TransmissionStore#88austin-smith merged 8 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 024a2f13ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Replace direct TransmissionConnectionFactory usage with an injectable async resolver and add awaitActiveConnection to wait for in-flight connection activation. Update connection-using APIs to await the active connection and use the resolver when activating. Introduce TorrentDetailSupplementalState, TorrentDetailSupplementalPayload, TorrentDetailSupplementalStore and lightweight placeholder views to manage and display supplemental torrent detail data (files, peers, pieces) and refactor iOS/macOS TorrentDetail views to use the new store and extracted content components. Add unit tests for the supplemental state and tests ensuring operations wait for activation and cancel when host switches; include a blocking resolver helper and a torrent-add test fixture.
Introduce ActivationFailure to record activation errors (generation + TransmissionError). Store activationFailure when connection activation fails (except cancellations) and clear it on reset or successful activation. Waiting operations now check for a matching activationFailure and throw it so they surface activation errors immediately. Adds a unit test (testWaitingOperationSurfacesCurrentActivationFailure) to verify unauthorized activation errors are propagated and reconnect state is entered.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72653d90b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Handle stored activation failures in TransmissionStore by surfacing saved activation errors when applicable. Refactor TorrentDetailSupplementalState to require a torrent ID for visibility checks, add visiblePayload(for:) and markCancelled(for:generation:) to manage cancellation behavior, and adapt the TorrentDetailSupplementalStore to use these APIs. Update iOS/macOS torrent detail views to use per-torrent payload accessors. Rework iOSTorrentFileDetail to centralize optimistic updates, add snapshot/revert helpers, and expose bulk setBulkWanted/setBulkPriority operations; update BulkActionToolbar accordingly. Add tests for stored unauthorized activation failure and expand supplemental state tests to cover cancellation and visibility semantics.
Introduce optimistic file-stats mutation handling and label caching. Add TorrentDetailFileStatsMutation and plumbing to apply committed file mutations in TorrentDetailSupplementalState/Store, plus helpers to apply mutations from iOS/macOS file-detail views via closures. Cache availableLabels and labelCounts in TransmissionStore and recompute on torrents changes to avoid repeated scans. Extract common torrent summary fields in TransmissionTorrentQuerySpec. Move iOS file controls into a new iOSTorrentFileDetailControls.swift and update project file. Refactor macOS label-edit flows with shared helper functions (sharedLabels, bulkLabelUpdates). Add tests for transmission mutation requests and move shared test helpers into TransmissionTestSupport.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14ccc55373
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Add new load(...) and loadIfIdle(...) overloads to TorrentDetailSupplementalStore that accept Binding<Bool> and Binding<String> for presenting transmission errors. Update iOS and macOS TorrentDetail views to use the new binding-based APIs and remove duplicated per-platform helper methods. Extract DetailViewLabelTag into the shared TorrentDetail file to avoid repeating the same UI component. Bump SwiftLint file_length warning threshold from 600 to 800.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
TransmissionStoreandTransmissionConnection