-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fire Dialog: New clear actions #7339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
app/src/main/java/com/duckduckgo/app/global/view/ClearPersonalDataAction.kt
Show resolved
Hide resolved
app/src/test/java/com/duckduckgo/app/browser/DuckDuckGoWebLocalStorageManagerTest.kt
Show resolved
Hide resolved
|
Cursor Agent can help with this pull request. Just |
7f0cd12 to
d0b34d8
Compare
4b0132a to
717cf32
Compare
ec8dac9 to
437baf0
Compare
0b01f1e to
adf4505
Compare
adf4505 to
7c5f868
Compare
CDRussell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I ask in Asana, it would be good to consider if there's any way to guard these changes with feature flags.
The settingsDataStore.clearDuckAiData check is one potential ANR introduction I've spotted, but hard to tell from reviewing just this PR if there's anything else.
I appreciate it's tricky to FF around changes like this, but can you create a task to consider how and if it would be possible to do?
7c5f868 to
f26080c
Compare
f26080c to
dff2a53
Compare
…r clearing methods
Co-authored-by: oruttkay <[email protected]>
…e cleared by the caller
dff2a53 to
454a295
Compare
Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1212237611537705?focus=true ### Description This PR adds new data clearing actions that allow removing different data types independently (tabs, data, chats). The affected interfaces are lower-level layer that responsible for performing individual data deletion. ### Steps to test this PR - [x] Make sure all units tests pass <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduce granular data-clearing actions (tabs, browser data, chats) with DuckAI-targeted IndexedDB/localStorage clearing and update integrations/tests. > > - **APIs and Actions**: > - Add granular clear methods in `ClearDataAction`: `clearTabsOnly`, `clearBrowserDataOnly`, `clearDuckAiChatsOnly`; keep `clearTabsAndAllDataAsync`. > - Extend `WebDataManager` with `clearData(webView, webStorage, shouldClearBrowserData, shouldClearDuckAiData)`; update `WebViewDataManager` to support granular clearing, use `SettingsDataStore.clearDuckAiData`, and refine directory deletions/fallbacks. > - **Storage Handling**: > - `WebLocalStorageManager`: new overload to clear selectively by flags; respects fireproofed domains and DuckAI keys/domains (`duckduckgo.com`, `duck.ai`). > - `IndexedDBManager`: change to `clearIndexedDB(shouldClearDuckAiData)` and add `clearOnlyDuckAiData`; remove settings store dependency; preserve/exclude folders based on domains and flags. > - **Integration**: > - `AutomaticDataClearer` / `DataClearingWorker`: switch to `clearTabsOnly` for tabs-only paths. > - `PrivacyModule`: wire updated `ClearPersonalDataAction` (remove `AdClickManager` arg). > - `TabDataRepository.deleteAll`: also clears previews, temp favicons, ad clicks, and webview sessions. > - **Tests**: > - Add/expand tests across instrumentation and unit suites to cover granular clearing paths, DuckAI-specific behavior, IndexedDB/localStorage exclusions, fallbacks, and new repository deletions. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 454a295. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor Agent <[email protected]>

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1212237611537705?focus=true
Description
This PR adds new data clearing actions that allow removing different data types independently (tabs, data, chats).
The affected interfaces are lower-level layer that responsible for performing individual data deletion.
Steps to test this PR
Note
Introduce granular data-clearing actions (tabs, browser data, chats) with DuckAI-targeted IndexedDB/localStorage clearing and update integrations/tests.
ClearDataAction:clearTabsOnly,clearBrowserDataOnly,clearDuckAiChatsOnly; keepclearTabsAndAllDataAsync.WebDataManagerwithclearData(webView, webStorage, shouldClearBrowserData, shouldClearDuckAiData); updateWebViewDataManagerto support granular clearing, useSettingsDataStore.clearDuckAiData, and refine directory deletions/fallbacks.WebLocalStorageManager: new overload to clear selectively by flags; respects fireproofed domains and DuckAI keys/domains (duckduckgo.com,duck.ai).IndexedDBManager: change toclearIndexedDB(shouldClearDuckAiData)and addclearOnlyDuckAiData; remove settings store dependency; preserve/exclude folders based on domains and flags.AutomaticDataClearer/DataClearingWorker: switch toclearTabsOnlyfor tabs-only paths.PrivacyModule: wire updatedClearPersonalDataAction(removeAdClickManagerarg).TabDataRepository.deleteAll: also clears previews, temp favicons, ad clicks, and webview sessions.Written by Cursor Bugbot for commit 454a295. This will update automatically on new commits. Configure here.