Fix L26: consolidate drag-drop URL extraction into shared urlHelpers
firstUrl() in DownloadBar was a local duplicate of looksLikeUrl iteration (scanning multi-line text for the first valid URL). Promoted to firstUrlInText() in src/renderer/src/lib/urlHelpers.ts alongside the other URL utilities, re-exported from useClipboardLink.ts. DownloadBar now imports firstUrlInText from there instead of maintaining a local copy. typecheck + 242 tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -429,7 +429,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
|
||||
- [x] **L25 — Taskbar effect over-fires.** `App.tsx` subscribes to the whole downloads store and
|
||||
recomputes `summarizeQueue` + sends the taskbar IPC on *every* store change (each progress
|
||||
tick); throttle or dedupe by computed value.
|
||||
- [ ] **L26 — Third URL-sniffing path.** DownloadBar's drag-drop `firstUrl` is a separate
|
||||
- [x] **L26 — Third URL-sniffing path.** DownloadBar's drag-drop `firstUrl` is a separate
|
||||
"first http(s) line" extractor alongside `useClipboardLink.looksLikeUrl` and deeplink's scan.
|
||||
- [x] **L27 — DownloadBar Enter probes, not downloads.** Enter in the URL field triggers
|
||||
`fetchFormats`; there's no keyboard path to actually start the download (LibraryView's Enter
|
||||
|
||||
Reference in New Issue
Block a user