Fire Mode: WebView profile management#8575
Merged
Merged
Conversation
This was referenced May 15, 2026
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9db5ee6 to
c9ed552
Compare
edcf6dd to
19ab411
Compare
3a41216 to
7819973
Compare
Base automatically changed from
feature/ondrej/fire-mode-rename-modules
to
develop
May 15, 2026 13:00
c396ec1 to
40ff4c5
Compare
4a8d539 to
f843786
Compare
f843786 to
b7e580f
Compare
b7e580f to
70343bf
Compare
CDRussell
reviewed
May 19, 2026
CDRussell
left a comment
Member
There was a problem hiding this comment.
Smoke tested and it looked ok to me. Reluctant to approve the PR if the public API changes are not covered in a proposal, though. which I didn't think they were (maybe I misremember); are they covered? Because if not, probably will result in changes to these again before merging.
6d5459e to
ba1044a
Compare
CDRussell
reviewed
May 25, 2026
36df232 to
c3b61be
Compare
Co-authored-by: Ondrej Ruttkay <0nko@users.noreply.github.com>
… binding profiles to WebViews
018771e to
2de1809
Compare
CDRussell
approved these changes
May 27, 2026
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ae0a70d. Configure here.
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.


Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1214780084779090?focus=true
Description
Isolates WebView state between Regular and Fire browser modes via AndroidX webkit's
MULTI_PROFILEAPI. Each newly-createdWebViewis bound to its mode-specificandroidx.webkit.Profileso cookies, LocalStorage, IndexedDB, and other origin-keyed storage are partitioned per mode. No-op on devices without MultiProfile support.Pieces introduced:
WebViewModeInitializer(browser-mode-api) — binds a freshly-createdWebViewto the profile for a givenBrowserMode.BrowserTabFragmentinjects it and callsbind(it, browserMode)insideconfigureWebView()immediately after inflating theDuckDuckGoWebView, before any settings or clients are applied.WebStorageProvider(BrowserModeDataProvider<WebStorage>) — resolves the per-modeWebStorageviaProfileStore, falling back to the shared defaultWebStoragewhen MultiProfile is unavailable.BrowserMode.profileNameextension — stable mapping from mode to profile name (REGULAR→ default profile,FIRE→"Fire").FireModeAvailabilityis now synchronous (fun isAvailable()), usesWebViewFeature.MULTI_PROFILEdirectly instead ofWebViewCapabilityChecker, warms its cache on main-processonCreateviaMainProcessLifecycleObserver, and freezes the first computed value so later flag flips don't change the answer mid-session.API proposal: WebViewModeInitializer interface
Steps to test this PR
Note
Medium Risk
Changes WebView creation and session storage partitioning at tab open; Fire tabs can be closed if profile binding fails, but Regular mode and devices without MultiProfile should behave as before when binding is skipped or falls back.
Overview
Introduces WebView multi-profile wiring so Regular and Fire tabs use separate AndroidX WebView profiles (cookies, LocalStorage, IndexedDB, etc.), with no binding when
MULTI_PROFILEis unsupported.WebViewModeInitializerbinds each newWebViewto the profile for the tab’sBrowserMode(viaBrowserMode.profileName) before any other WebView setup.BrowserTabFragmentcalls it right after inflation; if binding fails in a non-Regular mode, it logs, closes the tab, and tears down the WebView.WebStorageProviderimplementsBrowserModeDataProvider<WebStorage>, returning profile-scoped storage when Fire/multi-profile is available, otherwise the shared default.FireModeAvailabilityis now synchronous, checksWebViewFeature.MULTI_PROFILEdirectly (replacingWebViewCapabilityChecker), warms availability on main-processonCreate, and freezes the first computed result for the session.Reviewed by Cursor Bugbot for commit 513ec83. Bugbot is set up for automated code reviews on this repo. Configure here.