Files
bsky-social-app/src
dan f74f9bc1d9 Refactor video uploads (#5570)
* Remove unused video field

* Stop exposing video dispatch

* Move cancellation out of the reducer

* Make useUploadStatusQuery controlled by jobId

* Rename SetStatus to SetProcessing

This action only has one callsite and it's always passing "processing".

* Move jobId into video reducer state

* Make cancellation scoped

* Inline useCompressVideoMutation

* Move processVideo down the file

* Extract getErrorMessage

* useServiceAuthToken -> getServiceAuthToken

* useVideoAgent -> createVideoAgent

* useVideoUploadLimits -> getVideoUploadLimits

* useUploadVideoMutation -> uploadVideo

* Use async/await in processVideo

* Inline onVideoCompressed into processVideo

* Use async/await for uploadVideo

* Factor out error messages

* Guard dispatch with signal

This lets us remove the scattered signal checks around dispatch.

* Move job polling out of RQ

* Handle poll failures

* Remove unnecessary guards

* Slightly more accurate condition

* Move initVideoUri handling out of the hook

* Remove dead argument

It wasn't being used before either.

* Remove unused detailed status

This isn't being used because we're only respecting that state variable when isProcessing=true, but isProcessing is always false during video upload.

If we want to re-add this later, it should really just be derived from the reducer state.

* Harden the video reducer

* Tie all spawned work to a signal

* Preserve asset/media for nicer error state

* Rename actions to match states

* Inline useUploadVideo

This abstraction is getting in the way of some future work.

* Move MIME check to the only place that handles it
2024-10-04 09:50:08 +09:00
..
2024-10-02 22:23:11 +03:00
2024-10-03 10:51:04 +09:00
2024-09-26 10:57:45 -05:00
2024-09-20 10:50:33 -05:00
2024-10-02 22:23:11 +03:00
2024-10-04 09:50:08 +09:00
2024-09-20 14:16:23 -05:00
2024-10-04 09:50:08 +09:00
2024-09-20 14:16:23 -05:00
2023-12-05 14:50:56 -06:00
2024-10-02 22:21:59 +03:00
2024-08-21 15:26:25 -05:00
2024-09-30 17:43:14 -05:00