Repository navigation
fix(ios): keep the opening cover, with a progress bar, until the client is up on a slow link - #3851
Conversation
… is up A PC that answered over a slow link showed a blank page, then index.html's spinner, for minutes. The cover now stays until the client is up, with a bar from the web view's estimatedProgress (never back, held below full), says the connection is slow after 5 s and offers Keep waiting and Try again after 20 s without progress (OpeningWatch, checked by app/ios/OpeningWatchCheck). A timeout to a public server no longer blames the PC.
…n page Checked on the iOS 27 simulator: estimatedProgress holds still while one large file arrives, so the cover never claims a stall and offers Try again once slow; it asks the page five times a second, so it lifts within 0.2 s of the client; and only an http(s) document counts as the client being up, as the PC answers before its page commits, while the web view still holds its empty first document.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
Merge-pass leftovers at 422e41f, not pushed (each push restarts CI and the reviews):
This ships as the first iOS update after 1.0 passes review. |
Merge passMerged head
Two reviewers at this head: Claude (Opus) CLEAR, Codex Terra CLEAR. Left (MEDIUM, Claude): the cover-lift path (clientUpScript, askPage, the about:blank guard) has no automated test, and the new Swift check runs nowhere. LOW: once the PC answered, a later failure reads "Slow connection"; Slow connection counts 5 s from the start. |
…3860) ## Change `scripts/compressed-assets.ts` writes every JS, CSS and wasm file's Brotli sidecar at quality 5. That's quick to build, but the few files a browser must fetch before the app can start are also the largest: the entry script is 3.81 MB minified. Those files now get Brotli's best (quality 11). Every lazy chunk, which is most of the bundle, stays at 5, so builds stay quick. The plugin picks those files by what the built pages name, read from the bundle's `.html` assets at `writeBundle`: the entry's module script, the modules Vite preloads beside it, its stylesheet, and the theme's boot script (`scripts/theme-bootstrap-build.ts`, a classic script in `<head>`, emitted as an asset, so the chunk graph alone would miss it). gzip sidecars are unchanged (level 9), and nothing changes in how the server picks a sidecar. Measured in the CI runner's image (`scripts/self-hosted-runner/Dockerfile`, built locally) on main 2decd45 and on this branch: | What `index.html` loads before the app runs | main (Brotli 5) | this PR (Brotli 11) | | --- | ---: | ---: | | `assets/index-*.js` (3,812,177 B) | 978,248 B | 839,759 B (−14.2%) | | `assets/index-*.css` (558,813 B) | 83,440 B | 67,781 B (−18.8%) | | The module script, its 3 preloads and the stylesheet | 1,065,526 B | 911,114 B (−154,412 B, −14.5%) | | The same, gzip | 1,247,170 B | 1,247,160 B | The theme's boot script (34,134 B) is 4,177 B at quality 11. Over the whole bundle (436 files) the Brotli sidecars go from 4,991,599 B to 4,837,264 B: the rest is the lazy chunks, unchanged. For a phone on a slow link, 154 KB is about 1.2 s at 1 Mbit/s, the case #3851's opening cover is for. The cost is build time: `bun run build` three times in a row in that image took 4.0, 2.3 and 1.9 s on main and 6.9, 4.9 and 5.0 s here, about 3 s more. `scripts/compressed-assets.test.ts`, which already makes a production build, now reads that build's `index.html` and checks each sidecar byte for byte: a file the page names at quality 11, every other one at 5. It also checks that the page names at least one script and one stylesheet, and that at least one lazy chunk is left. On main it fails at `theme-bootstrap-f10f765732.js at quality 11`. It takes about 10 s in the image now, since it compresses each file again to compare. ## Validation - `scripts/compressed-assets.test.ts` in the image: passes on this branch (2183 expects), fails on main as above. - `bun run check fast` in the image: workflow syntax, generated types and themes, typecheck and build pass. Unit tests: 17266 pass, 1 fail, 57 skip in 955 files. The failure, `scripts/plugin.test.ts` "add and login > run the release the app updated to as link, the one name a release from before them knows" (it prints "This PC is already in an Ovis account" instead of handing over to the release), fails the same way on main (2decd45) in that image. `bun run build:shell` passes. - The sizes and timings above: `bun run build` on a fresh clone of each, in the same image, then a throwaway script (not in this PR) that reads `dist/index.html` and sizes what it names, and recompresses each file to tell which quality its sidecar has. Not run: `bun run check full`, the Windows and macOS jobs, or a page load over a real slow link. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
…with 0.5.4 (#3889) ## Summary The store builds that went out with 0.5.4 raised their version numbers only in the build, so the repository still names the numbers before them. This sets the repository to what was uploaded, so the next store build does not reuse a build number the stores have already taken. - **Android:** `app/android/app/build.gradle` raises `versionCode` from 8 to 9 and `versionName` from 1.0.1 to 1.0.2. 1.0.2 (9) is the bundle built from v0.5.4 (`b9d07980`). It was sent to Google Play's production review on 2026-11-15. - **iOS:** `app/ios/App/App.xcodeproj/project.pbxproj` raises `MARKETING_VERSION` from 1.0 to 1.0.1 and `CURRENT_PROJECT_VERSION` from 7 to 9. The App and OvisNotifications targets share these project-level settings. 1.0.1 (9) is the build from the same commit. It was submitted for App Review on 2026-11-15 and carries the slow-link fix (#3851). Build 8 is version 1.0 on the App Store. - **Docs:** the version rows in `app/store/android.md` and `app/store/ios.md` show these numbers and name the last upload. Nothing here builds or uploads. The next upload raises Android to `versionCode` 10 and iOS to build 10. ## Validation - `bun run check fast` passed: workflow syntax, generated types and themes, typecheck, build, and unit tests (17314 pass, 0 fail, 54 skip). - No test reads `versionCode`, `versionName`, `MARKETING_VERSION` or `CURRENT_PROJECT_VERSION`, according to `git grep` over the test files and `scripts/`. The only hit is `scripts/android-ime-regression.ts`, which reads the installed Chrome and Gboard versions. - The numbers match what the stores hold, as of 2026-11-15: - Play Console's Production track shows "9 (1.0.2)" in review. - The App Store Connect API shows version 1.0.1 Waiting for Review with build 9 (VALID). It shows builds 5 to 8 before it.
Why
The iOS twin of #3850 (Android). iOS hides its opening cover at the PC's first response, so it never cut a slow page off as Android did; but on a slow link (10 KB/s, a VPN) what followed was an unpainted web view and then index.html's loading spinner for about two minutes, with no sign that anything was arriving. Before the first response, a 20 s timer still gives up, and its text blamed the PC for a public server.
What changes
OpeningWatch.swift(new, pure): the cover's stage. Before the PC answers, the open gives up after the same 20 s (iOS has no count of received bytes, so a TLS handshake still under way then counts as no answer). After it answers, the open is never called off.HerdrBridgeViewController: the cover stays until the client is up (its#rootno longer holds.boot; a page with no root, such as the error page, lifts it as before), asked five times a second, so it lifts within 0.2 s of the client's first frame. A bar fills from the web view'sestimatedProgress(never back, held at 95 %); after 5 s the cover says "Slow connection. Still opening X..." with Try again and Change PC. Only an http(s) document counts as the client: the PC answers before its page commits, while the web view still holds its empty first document (found on the simulator: without it the cover lifted at once).estimatedProgressheld still at about 40 % while the 977 KB script arrived at 10 KB/s, so it cannot tell a stalled link from a slow one (a first build that tried said "nothing has come for 20 seconds" mid-download). Try again is there instead.Checked on eamac's iOS 27 simulator (iPhone 17), the app built from this branch, a test Ovis behind a throttling proxy at 10 KB/s and 300 ms
Shipping
iOS 1.0 is in App Review: this does not touch that build. It ships as the first iOS update after 1.0 passes review.
Validation
swiftc app/ios/App/App/OpeningWatch.swift app/ios/OpeningWatchCheck/main.swifton eamac: all checks passed (no answer at the limit, slow never given up, bar never back and held below full, progress before an answer ignored, a held progress not a stall, home and public hosts).xcodebuild -sdk iphonesimulatoron eamac: built; the runs above on that build (a fresh clone in /tmp there, deleted afterwards; eamac's slot taken and released).bun run check fast: passed (typecheck, build, unit tests 17258 pass / 0 fail).