Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves reliability of browser OPFS (Origin Private File System) uploads—especially in CI—by handling partial FileSystemSyncAccessHandle.write() results and by surfacing real upload failures in the browser storage playground UIs instead of masking them as UnexpectedLength.
Changes:
- Add a write loop in the OPFS worker to drain each chunk via smaller block writes until fully written (tolerating short writes).
- Update both Wasm and Server storage playground pages to immediately report
UploadAsyncfailures (and only useUnexpectedLengthwhen the upload reports success but the deterministic stream did not fully drain).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Storages/ManagedCode.Storage.Browser/wwwroot/browserStorage.worker.js |
Implements block-based “write until complete” behavior to handle partial OPFS writes reliably. |
Tests/ManagedCode.Storage.BrowserWasmHost/Pages/StoragePlayground.razor |
Stops masking upload failures as UnexpectedLength; reports upload failure details directly. |
Tests/ManagedCode.Storage.BrowserServerHost/Components/Pages/StoragePlayground.razor |
Same failure-reporting behavior change as the Wasm playground. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #117 +/- ##
==========================================
- Coverage 57.27% 48.55% -8.72%
==========================================
Files 133 153 +20
Lines 6540 7702 +1162
Branches 922 1029 +107
==========================================
- Hits 3746 3740 -6
- Misses 2362 3528 +1166
- Partials 432 434 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Verification
BrowserStorage_ServerHost_LargeFlow_ShouldPersistAcrossPages|FullyQualifiedNameBrowserStorage_WasmHost_LargeFlow_ShouldPersistAcrossPages"