#3268
feat(web): route form on the cross-seed page
Parent
#3256
What to build
PR 2. On the cross-seed page, in the per-instance section with the hardlink and reflink settings, a user picks a Cross-seed instance, fills one row per base folder, runs Test route, and saves. A saved route that no longer passes the rules still shows, with a warning and the reason.
Acceptance criteria
- The "Cross-seed instance" picker sits in the per-instance hardlink settings section.
- The picker leaves out the Source instance itself, instances that have their own route, instances older than qBittorrent 5.0, and remote instances. It reads the list of all routes from the API.
- The picker is turned off, with the reason shown:
- On an instance that receives cross-seeds, with the names of its Source instances.
- On an instance in regular mode: a route needs hardlink or reflink mode.
- On an instance without the Write capability in local mode: "needs Local Filesystem Access" (a new i18n key), or "not available on remote instances". The picker uses the capability model, not the local filesystem access flag.
- One row for each base folder, where the user types the path where the Cross-seed instance sees it. An empty row means the same path. Each row has autocomplete from the Cross-seed instance's folders. A new base folder shows as a new empty row.
- The form refuses two rows that map to the same folder or to nested folders.
- A "Test route" button tests the rows in the form before a save and shows each folder's result, or "Cross-seed instance unavailable" once.
- The form always shows a saved route. If the route no longer passes the rules, it shows a warning with the reason from the route read.
- Route text does not reuse the three hardlink text keys that #2917 rewords:
toast.noLocalFilesystemAccess,rules.noLocalAccess,rules.enableLocalFilesystem. Readweb/AGENTS.mdfirst. - Component tests with mocked API responses, after the instance preferences dialog tests that mock the capabilities endpoint: the picker states and reasons, the per-folder rows, and the Test route results.
Out of scope
- A route with more than one hop.
- A remote Source instance or a remote Cross-seed instance.
- The confirm dialogs (next ticket).
Coordination
The #2917 SSH configuration work also changes the hardlink settings component. Keep the route form in its own component inside that section, to keep the conflict small.
Rules for every ticket of #3256
- "Unavailable" means one of these: offline, disabled in qui, or (for an add or a directory listing only) older than qBittorrent 5.0 (WebAPI 2.11.2). Use the shared availability check from the route storage ticket. Do not write a new one.
- Tests talk only to local fakes and temp folders, never to a real host. Each new test fails before the change and passes after it.
- No user-facing text mentions SSH. No text calls the Cross-seed instance "remote", because "remote instance" means an SSH instance. An error for an instance that is in remote mode can say "remote instance".
- If the ticket changes the API, update
internal/web/swaggerand make sure thatmake test-openapipasses. - Glossary terms: Cross-seed instance (the instance that receives the cross-seeds found on another instance) and Source instance (an instance that names a Cross-seed instance and holds the matched torrents). Do not say "target instance" or "library instance" for these.
- Delivery: tickets for PR 1 land on one integration branch that becomes PR 1. Tickets for PR 2 land on a second branch that becomes PR 2, after PR 1 merges. Do not merge one ticket to develop alone.
Activity
0No activity yet.