Skip to content

feat: Uppy-based audio upload for web app with shared storage helpers#3983

Merged
yujonglee merged 6 commits intomainfrom
devin/1771150282-audio-upload-uppy
Feb 15, 2026
Merged

feat: Uppy-based audio upload for web app with shared storage helpers#3983
yujonglee merged 6 commits intomainfrom
devin/1771150282-audio-upload-uppy

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 15, 2026

Summary

Refactors packages/supabase/src/storage.ts to extract shared TUS upload configuration (STORAGE_CONFIG, getTusEndpoint, buildObjectName) so both apps/web and apps/desktop can consume them. Introduces a new useAudioUppy hook in apps/web that uses @uppy/core + @uppy/tus (headless, no Uppy UI) for resumable uploads to Supabase Storage, replacing the previous direct tus-js-client + useMutation approach in the authenticated file-transcription page.

Desktop's useUploadAudio continues to use uploadAudio() from the shared package unchanged.

Key files:

  • packages/supabase/src/storage.ts — extracted helpers, uploadAudio refactored internally
  • apps/web/src/hooks/use-audio-uppy.ts — new hook
  • apps/web/src/routes/_view/app/file-transcription.tsx — wired to Uppy hook
  • apps/web/src/components/transcription/transcript-display.tsxFileInfo now shows upload %

Review & Testing Checklist for Human

  • Test the full upload → transcription flow in a real environment with Supabase credentials. This PR was built without end-to-end testing against a live Supabase instance — the upload path (Uppy → TUS → Supabase Storage → STT pipeline) has not been verified at runtime.
  • onBeforeRequest fetches auth session on every chunk request — correct for token freshness, but worth confirming there's no performance issue with many chunks on large audio files.
  • Uppy instance cleanupcancelAll() is called on unmount, but Uppy's current types don't expose a close() / destroy() method. Verify no resource leaks in practice.

Suggested test plan:

  1. Log in on the web app, navigate to file transcription
  2. Upload a small audio file → verify it uploads successfully and transcription starts
  3. Upload a large audio file (>6MB to trigger chunking) → verify progress % updates and upload completes
  4. Rapidly switch files during upload → verify no stale upload or metadata mismatch errors
  5. Test with an expired/invalid auth session → verify error state is shown

Notes

  • Desktop app (apps/desktop/src/hooks/useUploadAudio.ts) is unchanged and continues using uploadAudio() directly.
  • Typecheck and dprint formatting pass locally.
  • Previously flagged issues (race condition with autoProceed, unused @uppy/drag-drop and @uppy/react deps, missing error handling on complete event) have all been addressed in follow-up commits.

Link to Devin run: https://app.devin.ai/sessions/9f3539c14ac243bb95b1d27ce0161ac2
Requested by: @yujonglee

…pers

- Extract getTusEndpoint, buildObjectName, STORAGE_CONFIG from packages/supabase/src/storage.ts
- Add @uppy/core, @uppy/tus, @uppy/react, @uppy/drag-drop to apps/web
- Create useAudioUppy hook using headless Uppy + @uppy/tus for resumable uploads
- Wire up authenticated file-transcription route to use Uppy instead of direct tus-js-client
- Add upload progress percentage to FileInfo component

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@netlify
Copy link

netlify bot commented Feb 15, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 99dcea0
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6991a70fb11e79000872836f
😎 Deploy Preview https://deploy-preview-3983--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 15, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 99dcea0
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6991a70ffec45a00083794dc

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

…remove unused deps, fix formatting

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 8 additional findings in Devin Review.

Open in Devin Review

…ution

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 9 additional findings in Devin Review.

Open in Devin Review

…y shows error UI

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 10 additional findings in Devin Review.

Open in Devin Review

… event corruption

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@yujonglee yujonglee merged commit 1c578fd into main Feb 15, 2026
14 of 16 checks passed
@yujonglee yujonglee deleted the devin/1771150282-audio-upload-uppy branch February 15, 2026 11:00
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.

1 participant