Skip to content

TT 7348 desktop save - #554

Merged
sarahentzel merged 3 commits into
developfrom
TT-7348-desktop-save
Aug 28, 2026
Merged

TT 7348 desktop save#554
sarahentzel merged 3 commits into
developfrom
TT-7348-desktop-save

Conversation

@gtryus

@gtryus gtryus commented Aug 28, 2026

Copy link
Copy Markdown
Contributor
  • Introduced new tests for the writeFileLocal function to validate disk write operations, including successful writes and error handling for write failures.
  • Enhanced nextUpload action to ensure it gracefully handles local disk write errors, dispatching appropriate failure actions and preventing cloud uploads when local saves fail.
  • Updated the actions module to use async/await for improved readability and error handling in the nextUpload function.
  • Mocked IPC methods for testing to simulate file operations without actual disk access.

… module

- Introduced new tests for the writeFileLocal function to validate disk write operations, including successful writes and error handling for write failures.
- Enhanced nextUpload action to ensure it gracefully handles local disk write errors, dispatching appropriate failure actions and preventing cloud uploads when local saves fail.
- Updated the actions module to use async/await for improved readability and error handling in the nextUpload function.
- Mocked IPC methods for testing to simulate file operations without actual disk access.
@gtryus
gtryus marked this pull request as draft August 28, 2026 19:09
@gtryus
gtryus requested a lite review from Copilot August 28, 2026 19:19

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 strengthens the desktop upload workflow by ensuring local media saves are correctly awaited and that local staging/write failures are handled without proceeding to cloud upload. It also adds focused tests around local disk write behavior via mocked Electron IPC.

Changes:

  • Ensure writeFileLocal awaits the IPC write call so in-memory recordings aren’t treated as saved before the disk write completes.
  • Improve offline/local-save flow in nextUpload to properly catch and report local write failures.
  • Add Jest coverage for successful local writes and failure cases (including aborting cloud upload when local save fails).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/renderer/src/store/upload/actions.tsx Awaits IPC disk writes and tightens async error handling around offline/local save behavior.
src/renderer/src/store/upload/actions.pendingRetry.test.ts Adds tests validating disk-write success/failure and that cloud POST is skipped when local staging fails.
Suppressed comments (1)

src/renderer/src/store/upload/actions.pendingRetry.test.ts:504

  • Avoid using a fixed setTimeout delay to wait for async work; it makes the test slower and can be flaky on slow CI. Since nextUpload schedules work via promises, flushing microtasks is enough to let the failure dispatch run.
    action(dispatch);
    await new Promise((resolve) => setTimeout(resolve, 20));


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/renderer/src/store/upload/actions.tsx Outdated
Comment thread src/renderer/src/store/upload/actions.pendingRetry.test.ts
gtryus and others added 2 commits August 28, 2026 14:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@gtryus
gtryus requested a review from sarahentzel August 28, 2026 19:27
@gtryus
gtryus marked this pull request as ready for review August 28, 2026 19:28
@sarahentzel
sarahentzel merged commit c4f1bfe into develop Aug 28, 2026
1 of 2 checks passed
@sarahentzel
sarahentzel deleted the TT-7348-desktop-save branch August 28, 2026 19:46
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.

3 participants