feat(diagnostics): persist full stderr detail behind a "Show details" toggle

describeDownloadError condenses a postprocessing failure to one line for
the queue/notification, discarding the rest of yt-dlp's stderr. The
persisted error log now also keeps the fuller non-noise transcript
(stderrDetail) as an optional `detail` field, and the Diagnostics card
gets a collapsible "Show details" expander per row so a failure like
"Postprocessing: Conversion failed!" can be inspected -- and copied
into a bug report -- without re-running the download from a terminal.
This commit is contained in:
2026-07-05 14:56:09 -04:00
parent 6cb9c5ca47
commit 27cae28e12
9 changed files with 155 additions and 17 deletions
+5
View File
@@ -175,6 +175,11 @@ describe('isValidErrorLogEntry', () => {
expect(isValidErrorLogEntry({ ...validError, title: 'optional' })).toBe(true)
})
it('accepts an optional detail string and rejects a non-string one', () => {
expect(isValidErrorLogEntry({ ...validError, detail: 'the full transcript' })).toBe(true)
expect(isValidErrorLogEntry({ ...validError, detail: 42 })).toBe(false)
})
it('rejects a missing error message', () => {
const { error: _error, ...noError } = validError
expect(isValidErrorLogEntry(noError)).toBe(false)