Android icon indicating copy to clipboard operation
Android copied to clipboard

Fire Dialog: New clear actions

Open 0nko opened this issue 1 month ago • 2 comments

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

  • [ ] Make sure all units tests pass

[!NOTE] Introduce granular clear actions (tabs only, browser data only, chats only) and refactor Web/Storage managers and IndexedDB to selectively clear browser vs DuckAI data; update DI, callers, and tests.

  • Clear actions (Fire/ClearData):
    • Add clearTabsOnly, clearBrowserDataOnly, clearDuckAiChatsOnly; keep clearTabsAndAllDataAsync.
    • AutomaticDataClearer/DataClearingWorker now use clearTabsOnly for tabs-only flows.
  • Web data management:
    • WebDataManager adds granular clearData(webView, webStorage, shouldClearBrowserData, shouldClearDuckAiData) and uses legacy full-clear path.
    • Web storage clearing split into clearEntireWebStorage (legacy) and granular path; fallback to deleteAllData on errors; crash logging unchanged.
    • WebView directory cleanup now parameterized; clears DuckAI-only IndexedDB when requested.
  • IndexedDB:
    • Replace clearIndexedDB() with clearIndexedDB(shouldClearDuckAiData) and add clearOnlyDuckAiData().
    • Remove SettingsDataStore dependency; refine exclusion logic for allowed/fireproofed domains and DuckAI domains.
  • Web Local Storage:
    • Add overloaded clearWebLocalStorage(shouldClearBrowserData, shouldClearDuckAiData) while retaining legacy method.
    • Supports selective deletion of DuckAI chat keys and non-allowed keys.
  • Tabs repository:
    • TabDataRepository.deleteAll now also clears previews, temp favicons, ad-click data, and WebView sessions.
  • DI:
    • Update PrivacyModule wiring (remove AdClickManager from ClearPersonalDataAction provider).
  • Tests:
    • Extensive updates and new cases for granular clearing paths, IndexedDB and local storage behaviors, and tabs-only flows.

Written by Cursor Bugbot for commit 0b01f1eb952368a1336ae08215d1661b705e73e0. This will update automatically on new commits. Configure here.

0nko avatar Dec 11 '25 08:12 0nko