Skip to content

Conversation

@0nko
Copy link
Member

@0nko 0nko commented Dec 11, 2025

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 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.

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

Copy link
Member Author

0nko commented Dec 11, 2025

@0nko 0nko requested a review from CDRussell December 11, 2025 08:31
@cursor
Copy link

cursor bot commented Dec 11, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch from 7f0cd12 to d0b34d8 Compare December 11, 2025 10:31
@0nko 0nko force-pushed the feature/ondrej/fire-dialog-feature-flag branch from 4b0132a to 717cf32 Compare December 11, 2025 10:40
@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch from ec8dac9 to 437baf0 Compare December 11, 2025 10:40
Base automatically changed from feature/ondrej/fire-dialog-feature-flag to develop December 11, 2025 11:05
@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch 3 times, most recently from 0b01f1e to adf4505 Compare December 14, 2025 12:49
@0nko 0nko mentioned this pull request Dec 14, 2025
10 tasks
@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch from adf4505 to 7c5f868 Compare December 15, 2025 22:59
@0nko 0nko mentioned this pull request Dec 15, 2025
51 tasks
@CDRussell CDRussell self-assigned this Dec 16, 2025
Copy link
Member

@CDRussell CDRussell left a 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?

@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch from 7c5f868 to f26080c Compare December 16, 2025 12:31
@0nko 0nko requested a review from CDRussell December 17, 2025 14:36
@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch from f26080c to dff2a53 Compare December 17, 2025 15:15
@0nko 0nko force-pushed the feature/ondrej/fire-dialog-new-clear-actions branch from dff2a53 to 454a295 Compare December 17, 2025 18:34
@0nko 0nko mentioned this pull request Dec 17, 2025
1 task
@0nko 0nko merged commit 28eb661 into develop Dec 18, 2025
11 checks passed
@0nko 0nko deleted the feature/ondrej/fire-dialog-new-clear-actions branch December 18, 2025 12:20
cursor bot pushed a commit that referenced this pull request Dec 19, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants