feat(config+ux): batch #5 — source maps, integration script, copy, redownload options
Clean config/copy items (Phase 7): - L170: build.sourcemap 'hidden' on main/preload/renderer — emit .map for offline crash symbolication (of the CC8 logger's raw stacks) without exposing them. - L34: add `test:integration` npm script (AEROFETCH_REAL_DOWNLOAD=1) for the opt-in real-download suite; stays out of `npm test` (needs network + live yt-dlp). - L87: HistoryEntry carries the original `options`; redownload replays them so a re-download reproduces the same post-processing instead of the current defaults. - L96: folder "Browse" buttons -> "Browse…" (they open the OS picker). - L97: PO-token placeholder "(none)" -> "Optional -- paste a token" (consistent). - Ticked already-resolved: L99 (M28 aria-label), L113 (UX2 tooltip=aria-label), L95 (usage follows verb/modifier rule), L172 (skipLibCheck accepted). typecheck + 268 tests + eslint + prettier green (touched files LF/clean). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,9 @@ export function HistoryView(): React.JSX.Element {
|
||||
title: h.title,
|
||||
channel: h.channel,
|
||||
thumbnail: h.thumbnail,
|
||||
// Replay the original post-processing options (L87); undefined falls back to
|
||||
// the global defaults for entries recorded before this was carried.
|
||||
options: h.options,
|
||||
format: h.formatId
|
||||
? { id: h.formatId, hasAudio: h.formatHasAudio ?? false, label: h.quality }
|
||||
: undefined
|
||||
|
||||
@@ -71,7 +71,7 @@ export function DownloadsCard(): React.JSX.Element {
|
||||
onChange={(_, d) => update({ videoDir: d.value })}
|
||||
/>
|
||||
<Button icon={<FolderRegular />} onClick={() => chooseDir('videoDir')}>
|
||||
Browse
|
||||
Browse…
|
||||
</Button>
|
||||
{videoDir && (
|
||||
<Button appearance="subtle" onClick={() => clearDir('videoDir')}>
|
||||
@@ -94,7 +94,7 @@ export function DownloadsCard(): React.JSX.Element {
|
||||
onChange={(_, d) => update({ audioDir: d.value })}
|
||||
/>
|
||||
<Button icon={<FolderRegular />} onClick={() => chooseDir('audioDir')}>
|
||||
Browse
|
||||
Browse…
|
||||
</Button>
|
||||
{audioDir && (
|
||||
<Button appearance="subtle" onClick={() => clearDir('audioDir')}>
|
||||
|
||||
@@ -86,7 +86,7 @@ export function NetworkCard(): React.JSX.Element {
|
||||
type="password"
|
||||
style={{ flexGrow: 1 }}
|
||||
value={youtubePoToken}
|
||||
placeholder="(none)"
|
||||
placeholder="Optional -- paste a token"
|
||||
onChange={(_, d) => {
|
||||
update({ youtubePoToken: d.value })
|
||||
setPotHint(null)
|
||||
|
||||
@@ -44,6 +44,9 @@ function recordCompletion(item: DownloadItem): void {
|
||||
filePath: item.filePath,
|
||||
sizeLabel: item.sizeLabel,
|
||||
thumbnail: item.thumbnail,
|
||||
// Carry the post-processing options so a re-download reproduces the same
|
||||
// output rather than the current global defaults (L87).
|
||||
options: item.options,
|
||||
completedAt: Date.now()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -731,6 +731,10 @@ export interface HistoryEntry {
|
||||
filePath?: string
|
||||
sizeLabel?: string
|
||||
thumbnail?: string
|
||||
/** The per-download post-processing options used originally, carried so a
|
||||
* re-download reproduces the same output (subtitles, SponsorBlock, container,
|
||||
* codec, …) instead of silently falling back to the current global defaults (L87). */
|
||||
options?: DownloadOptions
|
||||
/** epoch milliseconds */
|
||||
completedAt: number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user