Repository navigation
fix(downloads): validate sources and stabilize url entry - #2154
Merged
Merged
Conversation
Scope plugin abort deadlines to their invocation and validate sources before side effects across local, remote, plugin, media, and recovery paths. Preserve URL bytes, require explicit ambiguous corrections, support bare BT hashes and FTP, and retain idempotent retries. Add inline URL diagnostics while preserving the Download label, a 100px editor, and the 386px collapsed window. Cover malformed inputs, normalized size limits, redirect validation, and bounded key responses. Refs #2151
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.
Summary / 概述
A completed plugin hook could leave a deadline armed and cancel a later invocation. Ambiguous URL input could also be rewritten by different parsers before reaching the engine. This PR scopes cancellation to each invocation and applies a shared source-admission policy before task-creation side effects.
Add Task now shows precise inline diagnostics, with a red icon at the end of each invalid URL's last visual row and a hover tooltip. Corrections are explicit and reversible; valid lines can be submitted while invalid or unconfirmed lines remain editable.
Related issue / 相关 Issue
Refs #2151.
Companion scraper change: motrixapp/builtin-plugins#3. It has its own release lifecycle; this PR does not update the signed builtins lock.
Changes / 改动
Validation / 验证
pnpm run check:boundariespnpm run lintpnpm exec tsc --noEmitValidated on macOS arm64 in an isolated checkout rebased onto current
main:pnpm test: 10,336 passed, 25 skipped.MOTRIX_E2E_FORCE_BUILD=1 pnpm run test:e2e e2e/add-task.spec.ts: 7 passed, including dimensions, tooltip/wrapping/scrolling, correction and undo, partial submission, both bare-hash formats, HTTP, and torrent queues.pnpm run check:i18nandpnpm run check:file-names: passed.Screenshots or recordings / 截图或录屏
URL editor with token-level diagnostics and a hover explanation (captured from the running Electron app; the screenshot covers the editor only):
Checklist / 检查清单
mainand contains one focused change.