feat: add profile reset endpoint (#15)#21
Open
hayka-pacha wants to merge 1 commit into
Open
Conversation
Add POST /api/profiles/{id}/reset that:
- Stops browser if running
- Wipes browser state files (cookies, history, cache, local storage)
- Preserves Bookmarks and Preferences (search engine config)
- Re-rolls fingerprint_seed to a new random value
- Keeps all other profile settings (name, proxy, tags, etc.)
Changes:
- backend/database.py: add reset_profile() function
- backend/main.py: add POST /api/profiles/{id}/reset endpoint
- frontend/src/lib/api.ts: add resetProfile() client method
- backend/tests/test_api.py: 6 new API integration tests
- backend/tests/test_database.py: 6 new database unit tests
All 192 tests pass (180 existing + 12 new).
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.
What
Adds a one-click profile reset that wipes browser state while preserving settings, closing #15.
Changes
Test results
All 192 tests pass (180 existing + 12 new), zero warnings.
What this enables
Users can reset a profile between sessions to get a fresh fingerprint without recreating the profile. This is useful for:
Future work