Skip to content

Aiv2#419

Closed
sarahentzel wants to merge 6 commits into
developfrom
aiv2
Closed

Aiv2#419
sarahentzel wants to merge 6 commits into
developfrom
aiv2

Conversation

@sarahentzel

Copy link
Copy Markdown
Collaborator

No description provided.

sarahentzel and others added 6 commits July 13, 2026 08:12
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
},
@sarahentzel sarahentzel deleted the aiv2 branch July 13, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants