Fire Mode: Burn Fire mode after last tab#9105
Open
0nko wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0nko
commented
Jul 3, 2026
| NONGRANULAR_FIRE_DIALOG("nongranular_fire_dialog"), | ||
| SINGLE_TAB_FIRE_DIALOG("single_tab_fire_dialog"), | ||
| APP_SHORTCUT("app_shortcut"), | ||
| FIRE_TABS_EMPTIED("fire_tabs_emptied"), |
Member
Author
There was a problem hiding this comment.
@lmac012 There is a new "entry point" in data clearing when the last Fire tab causes a Fire mode data clearing. I added it to the wide event. What do you think?
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/1216264460141747?focus=true
Description
This PR implements automatic Fire mode data clearing after the last Fire mode tab is closed.
Steps to test this PR
Burn Fire data when the last Fire tab is closed
Burn Fire data when closing all Fire tabs at once
Regular data is untouched
No burn on a manual mode switch
No burn when closing a non-last Fire tab
Regular automatic clearing is not disturbed
Note
Medium Risk
Touches Fire-mode data deletion and automatic-clear flag timing; scope is limited to emptying Fire tabs and app-scope clearing, with tests covering manual toggle vs tab-empty paths.
Overview
When Fire mode has no tabs left because the user closed the last tab or confirmed close all, the tab switcher no longer only switches to Regular mode—it kicks off a Fire data burn (tabs, browsing data, Duck.ai chats for Fire), keeps the switcher open, and still issues
SwitchToRegularMode(no undo snackbar on that path).The burn runs on
appCoroutineScopeso it is not cancelled when the Fire→Regular switch recreates the activity. It is wrapped inDataClearingWideEventwith a new entry pointFIRE_TABS_EMPTIED.onBrowserModeToggledis unchanged for clearing: toggling modes with Fire tabs still present does not burn.DataClearing:setAppUsedSinceLastClearFlagnow runs only on the Regular manual-clear branch, not after Fire manual clears (including restart and no-restart paths). Tests were updated for Fire burns and tab-switcher behavior.Reviewed by Cursor Bugbot for commit 1ee4875. Bugbot is set up for automated code reviews on this repo. Configure here.