Skip to content

Comments

Fireproof entries in IndexedDB#6052

Merged
joshliebe merged 2 commits intodevelopfrom
feature/josh/fireproof-indexed-db
May 20, 2025
Merged

Fireproof entries in IndexedDB#6052
joshliebe merged 2 commits intodevelopfrom
feature/josh/fireproof-indexed-db

Conversation

@joshliebe
Copy link
Contributor

@joshliebe joshliebe commented May 12, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1210223368584104?focus=true

Description

  • Preserves IndexedDB entries for fireproofed sites.

Steps to test this PR

Point at the config linked in the task


Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@joshliebe joshliebe force-pushed the feature/josh/fireproof-indexed-db branch from 267a73e to 0a4c845 Compare May 13, 2025 08:45
@joshliebe joshliebe marked this pull request as ready for review May 13, 2025 12:17
@joshliebe joshliebe requested a review from Copilot May 16, 2025 11:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionality to preserve IndexedDB entries for fireproofed sites by excluding specific IndexedDB folders from deletion. Key changes include:

  • Introduction of the DuckDuckGoIndexedDBManager to handle IndexedDB folder exclusion.
  • Updates to tests in IndexedDBManagerTest.kt and WebViewDataManagerTest.kt reflecting new fireproof checks.
  • Modifications to AndroidBrowserConfigFeature.kt and WebDataManager.kt to integrate IndexedDB feature flags.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/src/test/java/com/duckduckgo/app/browser/indexeddb/IndexedDBManagerTest.kt Adds tests to validate various configurations for excluding IndexedDB folders.
app/src/main/java/com/duckduckgo/app/pixels/remoteconfig/AndroidBrowserConfigFeature.kt Introduces new toggle methods with documentation for indexedDB and fireproofedIndexedDB features.
app/src/main/java/com/duckduckgo/app/browser/indexeddb/IndexedDBManager.kt Implements logic to preserve fireproofed IndexedDB entries based on allowed domains.
app/src/main/java/com/duckduckgo/app/browser/WebDataManager.kt Updates data-clearing logic to incorporate IndexedDB preservation based on feature toggles.
app/src/androidTest/java/com/duckduckgo/app/browser/WebViewDataManagerTest.kt Verifies behavior when the IndexedDB feature is enabled, disabled, or throws exceptions.

@nalcalag nalcalag self-assigned this May 19, 2025
Copy link
Contributor

@nalcalag nalcalag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and works as expected

@joshliebe joshliebe merged commit 5c88d5f into develop May 20, 2025
7 checks passed
@joshliebe joshliebe deleted the feature/josh/fireproof-indexed-db branch May 20, 2025 11:19
CrisBarreiro pushed a commit that referenced this pull request May 23, 2025
Task/Issue URL:
https://app.asana.com/1/137249556945/project/488551667048375/task/1210223368584104?focus=true

### Description

- Preserves `IndexedDB` entries for fireproofed sites.

### Steps to test this PR

_Point at the config linked in the task_
- [x] Go to https://mdn.github.io/dom-examples/indexeddb-api/index.html
- [x] Add a publication and fireproof the site
- [x] Go to https://indexed-db-demo.davebitter.com/
- [x] Add a task and submit
- [x] Use the fire button
- [x] Go to https://mdn.github.io/dom-examples/indexeddb-api/index.html
- [x] Tap “List database content"
- [x] Verify that the entry is preserved
- [x] Go to https://indexed-db-demo.davebitter.com/
- [x] Verify that no tasks are listed


---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210225196227164
  - https://app.asana.com/0/0/1210236595890145
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.

2 participants