Repository navigation
Web: a screenshot or video export no longer changes the address - #549
Merged
Merged
Conversation
A screenshot or video export renders the strategy in a hidden app shell. That shell was an app with its own navigator, and an app's navigator reports its route to the browser, so every capture rewrote the address to /. Reloading after opening the camera dialog then opened the library instead of the strategy. The shell now has no app navigator; a plain one gives the captured view its route and overlay and reports nothing.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On the web build, opening the camera dialog (Save screenshot) or exporting a video changed the address from
/#/strategy_viewto/. Nothing looked different until a reload, which then opened My Library instead of the strategy the person was in. The live beta (5.1.3) has the same capture code.Cause
A screenshot or a video frame is rendered in a hidden app shell (
wrapForOffscreenCapture). The shell was aMaterialAppwith ahome, so it built its own navigator, and an app's navigator reports its route to the browser. Each capture told the browser the page was now at/. The camera dialog renders a preview as it opens, which is why opening it was enough.Fix
The shell's
MaterialAppno longer has ahome, so it builds no navigator of its own. A plainNavigatorinside it gives the captured view the same route and overlay as before and reports nothing to the browser. Everything else the shell provides (theme, localizations, text defaults) is unchanged.Seen in a browser
Chromium driven by Playwright, release web builds against dev Convex, one test account, the same Bind strategy on both builds. "Before" is main at b14efde.
//#/strategy_view/, My LibraryThe exported files are byte-identical between the two builds: the plain screenshot (831,221 bytes), the screenshot with captions and a transparent background (68,952 bytes), and the MP4 (312,030 bytes) each have the same SHA-256 on main and on this branch.
The new test listens on the navigation channel while the shell is mounted. Without the fix it sees
/reported; with it, nothing. It also checks the captured view still finds a navigator, an overlay and a route.Not covered
Found in the same pre-release check as #548; different cause, so its own PR.
ci: analyze test web


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
wrapForOffscreenCapturereplaces the navigator created byMaterialApp.homewith a plainNavigator, keeping capture routes separate from the browser address.Reviews (1) · Last reviewed commit: "Keep the page's address when a capture r..." · Reviewed by Greptile