Fire Mode: Escape hatch#8917
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 f5eb9c6. Configure here.
CDRussell
left a comment
There was a problem hiding this comment.
Approved because it's working as described and correctly. Think you're missing an API proposal though?
| if (state.shouldShow) { | ||
| binding.returnHatchSiteTitle.text = state.titleOrPlaceholder() | ||
| if (state.isDuckChat) { | ||
| binding.returnHatchFavicon.setImageResource(CommonR.drawable.ic_duckai) | ||
| if (state.mode == BrowserMode.FIRE) { | ||
| binding.returnHatchSiteTitle.text = context.getString(R.string.newTabReturnHatchFireTabTitle) | ||
| binding.returnHatchFavicon.setImageResource(CommonR.drawable.ic_fire_tab_placeholder_96) | ||
| } else { | ||
| faviconJob += viewModel.viewModelScope.launch { | ||
| faviconManager.loadToViewFromLocalWithRetry(state.tabId, state.url, binding.returnHatchFavicon) | ||
| binding.returnHatchSiteTitle.text = state.titleOrPlaceholder() | ||
| if (state.isDuckChat) { | ||
| binding.returnHatchFavicon.setImageResource(CommonR.drawable.ic_duckai) | ||
| } else { | ||
| faviconJob += viewModel.viewModelScope.launch { | ||
| faviconManager.loadToViewFromLocalWithRetry(state.tabId, state.url, binding.returnHatchFavicon) | ||
| } |
There was a problem hiding this comment.
nit: if we add a third mode in future, this the kind of code that might become a quiet footgun. Rather than if (fire) else { }, if you made it a when it'll become a compile-time problem to ensure we solve correctly if we add any additional modes.
| * The hatch only ever renders in Regular mode, so an [EscapeHatchTarget] with [EscapeHatchTarget.mode] | ||
| * == [BrowserMode.FIRE] also implies that tapping the hatch must switch into Fire mode to open it. | ||
| */ | ||
| interface EscapeHatchTargetResolver { |
There was a problem hiding this comment.
is there a corresponding API proposal for this?
c31d734 to
c8c653e
Compare
65ada87 to
8053a49
Compare
…s-mode tab opening Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…get tab mode Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…o the right tab database Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ns to its target tab Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
84c7c36 to
44bd718
Compare
c8c653e to
3f6348a
Compare


Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1215736845374133?focus=true
Description
This PR adds the Fire mode support to escape hatch.
Steps to test this PR
Prerequisites
androidBrowserConfig.showNTPAfterIdleReturnenabled (feature-flag inventory).fireMode.fireTabsenabled for scenarios 1–5; disabled for scenario 6.adb shell am force-stop com.duckduckgo.mobile.android.debug) before relaunching.1. Cold start — last tab was a Regular tab
2. Cold start — last tab was a Fire tab
2b. Cold start — Fire tab, returned from the search / input screen
3. Hot start in Fire mode
4. Hot start in Regular mode
5. Fire-target hatch controls
6.
fireTabsOFF reverts cleanlyfireMode→ turn offfireTabs), then fully restart the app (Fire-mode availability is cached per process).Note
Medium Risk
Changes core browser launch, mode-switch recreate, and tab routing across Regular/Fire; Fire-target privacy depends on not surfacing Fire tab metadata in Regular UI.
Overview
Adds Fire mode to the after-idle escape hatch on the Regular-mode NTP (and input screen). A new
EscapeHatchTargetResolverpicks the return target from the most recently accessed tab in Regular and/or Fire (when Fire tabs are enabled); Fire targets use a generic “Last used Fire Tab” label and placeholder icon so real title/URL/favicon never appear in Normal UI.Tapping the hatch (or returning from the input screen) uses
openExistingTabInModeand a newPendingAction.OpenExistingTabso the activity can switch mode and recreate before selecting the tab.ModeSwitchRecreateSignalmarks programmatic mode-switch recreates soFirstScreenHandlerdoes not re-run launch/inactivity logic and overwrite the pending action.ShowOnAppLaunchOptionHandleris updated to respect current mode (e.g. NTP-on-idle in Fire without the Regular-only hatch path; Specific/Last-opened skipped in Fire).Hatch close/undo/commit routes tab operations to the correct mode’s
TabRepository; tests cover bundle round-trips, resolver behavior, and Fire hatch view model cases.Reviewed by Cursor Bugbot for commit 3f6348a. Bugbot is set up for automated code reviews on this repo. Configure here.