Skip to content

Small Fixes#204

Open
BuffMcBigHuge wants to merge 2 commits into
mainfrom
marco/fix/small-fixes
Open

Small Fixes#204
BuffMcBigHuge wants to merge 2 commits into
mainfrom
marco/fix/small-fixes

Conversation

@BuffMcBigHuge
Copy link
Copy Markdown
Collaborator

Fix to vae spam logging, fix to modal handling of uploaded track.

Signed-off-by: BuffMcBigHuge <marco@bymar.co>
@ryanontheinside ryanontheinside self-requested a review June 1, 2026 22:47
Copy link
Copy Markdown
Collaborator

@ryanontheinside ryanontheinside left a comment

Choose a reason for hiding this comment

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

This needs a small fix before merge.\n\nThe new inish() path in AlmostReadyDialog calls onContinue(...) and then immediately calls onClose(). All current callers wire onClose to setPending(null), while commitUploadedTrack still intentionally keeps pending until upload success so failed encodes/uploads can be retried. With this PR, pressing Start dismisses the dialog and clears the trimmed upload buffer before the async upload has succeeded; if the upload fails, the user only gets a status message and cannot retry the same trimmed selection.\n\nPlease close the dialog only after commitUploadedTrack succeeds, or otherwise preserve/restore retry state on failure.

@BuffMcBigHuge
Copy link
Copy Markdown
Collaborator Author

Thanks @ryanontheinside — good catch. Fixed in AlmostReadyDialog.finish().

The dialog no longer calls onClose() itself. It now awaits onContinue(...) and lets the parent own dismissal: commitUploadedTrack already clears pending upstream on success (which unmounts the dialog) and intentionally keeps pending on a failed encode/upload. By dropping the eager onClose(), a failed upload now leaves the trimmed selection intact and retryable instead of being thrown away with only a status message.

The double-submit guard (submittedRef) is preserved to block re-entry while the commit is in flight, and it's reset in a finally so a failure that keeps the dialog mounted can be retried with one more press of Start. onContinue's type was widened to void | Promise<void> to support the await.

Signed-off-by: BuffMcBigHuge <marco@bymar.co>
@ryanontheinside ryanontheinside self-requested a review June 2, 2026 12:41
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