#3269

feat(web): confirm before a change removes route protection

Opens0up4200opened 13d ago

Parent

#3256

What to build

PR 2. Before a change that stops the Source instance's orphan scan from protecting routed files, qui shows a confirm dialog with the number of routed torrents affected.

Acceptance criteria

  • Each of these changes opens a confirm dialog first: a route change, a route clear, removing a mapped base folder, editing a row, and deleting a Cross-seed instance.
  • The dialog gives the number of routed torrents under the affected rows, from the per-row counts in the route read. When the count is null (the Cross-seed instance is unavailable), it says the number is unknown.
  • The dialog says that the Source instance's orphan scan stops protecting those files.
  • With several Source instances, each one counts only the torrents under its own rows.
  • Deleting a Cross-seed instance also names the Source instances that will add cross-seeds to themselves again. After the user confirms, the delete runs and the routes go with it.
  • Component tests with mocked API responses: the dialog with counts, the unknown count, and the delete dialog with the named Source instances.

Out of scope

  • Server-side refusals. The instance change ticket owns them.

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/swagger and make sure that make test-openapi passes.
  • 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

0

No activity yet.