Skip to content

Move torrent actions and detail loading onto TransmissionStore#88

Merged
austin-smith merged 8 commits intomainfrom
transmission-actions-detail-flows
Mar 9, 2026
Merged

Move torrent actions and detail loading onto TransmissionStore#88
austin-smith merged 8 commits intomainfrom
transmission-actions-detail-flows

Conversation

@austin-smith
Copy link
Copy Markdown
Owner

Summary

  • move torrent add/remove/rename/location/queue/file/detail operations onto TransmissionStore and TransmissionConnection
  • replace legacy callback-based action handling with shared async action and error presentation helpers
  • remove legacy Transmission action adapters and compatibility UI wrappers
  • add coverage for torrent mutations, detail snapshots, and superseded host-switch behavior

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.
@austin-smith
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.
@austin-smith
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@austin-smith
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ 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".

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.
@austin-smith
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ 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".

@austin-smith austin-smith merged commit ead006e into main Mar 9, 2026
3 checks passed
@austin-smith austin-smith deleted the transmission-actions-detail-flows branch March 9, 2026 00:12
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