Aiv2#419
Closed
sarahentzel wants to merge 6 commits into
Closed
Conversation
Hide error details from user unless they click on the details link Remove whisper as supported model for all languages except the 19 Jonathan recommended
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the renderer’s AI audio/transcription workflows to better handle S3-based result delivery, improve retry/error reporting, and prevent UI deadlocks when waveform decoding fails.
Changes:
- Refactors Audio AI polling to use S3 result URLs with validation/timeout handling and upload retries.
- Improves blob download error handling (including non-retryable S3 error detection) and adds unit tests.
- Adds structured Aero task error parsing/rendering and wires waveform load-failure callbacks through the audio player stack.
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/utils/useAudioAi.ts | Switches to S3 polling flow, adds upload retry wrapper, and validates empty S3 downloads. |
| src/renderer/src/utils/loadBlob.ts | Enhances fetch error handling and non-retryable error detection. |
| src/renderer/src/utils/loadBlob.test.ts | Adds tests for retry/non-retry blob download behavior. |
| src/renderer/src/store/upload/uploadRetry.ts | Adds reusable upload retry helpers and retryability classification. |
| src/renderer/src/store/upload/uploadRetry.test.ts | Adds tests for upload retry behavior. |
| src/renderer/src/store/localization/exported-strings-name.json | Updates exported strings bundle reference. |
| src/renderer/src/crud/useWaveSurfer.tsx | Adds explicit load/decode failure handling to unblock waiters and notify UI. |
| src/renderer/src/crud/useMediaUpload.ts | Changes upload method to return Promise<boolean> and adjusts completion behavior. |
| src/renderer/src/crud/useMediaUpload.test.ts | Updates tests for new Promise<boolean> upload semantics and adds empty-list test. |
| src/renderer/src/components/WSAudioPlayer.tsx | Improves waveform loading gating and introduces richer AI error display. |
| src/renderer/src/components/TitleUploader.tsx | Updates upload method type to Promise<boolean>. |
| src/renderer/src/components/MediaRecord.tsx | Handles waveform load errors by clearing blob state and notifying user. |
| src/renderer/src/business/asr/AsrProgress.tsx | Adds Aero task failure parsing/UI, guards polling concurrency, and clears TR tasks on failure. |
| src/renderer/src/business/asr/AeroTaskErrorMessage.tsx | New component to show expandable error details. |
| src/renderer/src/business/asr/aeroTaskError.ts | New helpers to parse Aero task failures and normalize Axios error messages. |
| src/renderer/src/business/asr/aeroTaskError.test.ts | Unit tests for new Aero error helpers. |
| src/renderer/src/assets/asrLangs.json | Removes multiple whisper method entries. |
| electron.vite.config.ts | Minor formatting change. |
| const [reporter] = useGlobal('errorReporter'); | ||
| const [errorReporter] = useGlobal('errorReporter'); | ||
| const fileList: fileTask[] = []; | ||
| const returnAsS3List: fileTask[] = []; |
Comment on lines
+49
to
+56
| if (!r.ok) { | ||
| const text = await r.text(); | ||
| throw new Error( | ||
| text | ||
| ? `download failed: ${url} with response ${text}` | ||
| : `${r.status} ${r.statusText}` | ||
| ); | ||
| } |
| export const UPLOAD_MAX_ATTEMPTS = 5; | ||
|
|
||
| /** Per-attempt S3 PUT timeout from file size (assumes ≥500 KB/s; cap 30 min). */ | ||
| /** Per-attempt S3 PUT timeout from file size (ponytail: assumes ≥500 KB/s; cap 30 min). */ |
Comment on lines
+179
to
+182
| if (pollError) { | ||
| showTaskFailure(pollError); | ||
| return; | ||
| } |
Comment on lines
+205
to
+207
| } catch (errResult: unknown) { | ||
| showTaskFailure(axiosErrorMessage(errResult)); | ||
| } finally { |
| if (ix >= 0) { | ||
| if (typeof tasks[ix]?.verse === 'string') | ||
| verse = ` \\v ${tasks[ix].verse} `; | ||
| if (tasks[ix]?.complete) tasks[ix].complete = true; |
Comment on lines
+217
to
+224
| cb: (n, success, data) => { | ||
| void itemComplete(n, success, data) | ||
| .then(() => { | ||
| if (success) resolve(true); | ||
| else reject(new Error(t.uploadFailed)); | ||
| }) | ||
| .catch(reject); | ||
| }, |
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.
No description provided.