You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This keeps the upload-speed and upload-health logic on one bounded path for Instant mode instead of doing a real object upload in the middle of the recording flow.
What changed:
add a desktop upload-health probe with a bounded payload, short timeout, and a 10 minute cache
use the cached result to cap Instant recording resolution before recording starts
add a web upload-health route that measures uploadability without leaving probe objects behind in storage
surface the health state in the desktop UI and add focused desktop/web coverage around tiering and byte limits
Follow-up hardening:
validate the server-reported receivedBytes before calculating throughput
subtract a same-route HEAD round trip estimate from the POST timing when it is safe to do so, reducing high-latency underestimation
short-circuit overlapping refresh probes so concurrent startup, interval, manual, or post-recording checks do not race the cache
avoid clearing the refresh spinner from non-refresh status reads
make the Content-Length check an explicit fast path while keeping stream-side byte counting as the enforcement boundary
Why this shape:
recording start only consumes cached state, so we do not wait on a fresh speed check after the user has already started recording
the health route exercises the upload path without introducing orphaned probe files or cleanup requirements
resolution gating stays conservative and only narrows Instant mode when the measured path says uploads are weak
the RTT adjustment avoids punishing high-latency links when actual upload throughput is still healthy
Validation:
git diff --check
pnpm exec biome check on touched TypeScript files
pnpm --dir apps/desktop exec vitest run src/utils/upload-health.test.ts
pnpm --dir apps/web exec vitest run tests/unit/desktop-upload-health.test.ts
Rebased this branch onto current main in 4d6c849 and resolved the merge conflict in apps/desktop/src/routes/(window-chrome)/new-main/index.tsx by keeping the upstream updater import together with the upload-health imports. The PR diff remains scoped to the desktop upload health probe path.
Validation:
pnpm --dir apps/desktop exec vitest run src/utils/upload-health.test.ts -> 6 passed
pnpm --dir apps/web exec vitest run __tests__/unit/desktop-upload-health.test.ts -> 3 passed
cargo check -p cap-desktop is still blocked in this local Windows environment before checking this crate because the FFmpeg headers are not installed (libavutil/avutil.h missing in ffmpeg-sys-next).
Rebased this branch onto current main and resolved the desktop conflicts by retaining the upstream updater state, teleprompter/window controls, and icon imports alongside the upload-health additions. The branch is mergeable again.
Current head: 94e86bb1d6d58a4803b35b3a500c14516f8696f5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #73
This keeps the upload-speed and upload-health logic on one bounded path for Instant mode instead of doing a real object upload in the middle of the recording flow.
What changed:
Follow-up hardening:
Why this shape:
Validation: