Skip to content

Add full data reset functionality with safety confirmations#19

Merged
pheuberger merged 1 commit into
mainfrom
claude/add-reset-functionality-UARdK
Feb 5, 2026
Merged

Add full data reset functionality with safety confirmations#19
pheuberger merged 1 commit into
mainfrom
claude/add-reset-functionality-UARdK

Conversation

@pheuberger
Copy link
Copy Markdown
Owner

Summary

Adds a complete "Reset All Data" feature that allows users to clear all local application state, including bookmarks, encryption keys, device identity, and sync history. This is useful for troubleshooting sync issues or starting fresh.

Key Changes

  • New Reset Service (src/services/reset.js): Comprehensive reset functionality that:

    • Disconnects WebRTC and Nostr sync providers
    • Clears all IndexedDB databases (bookmarks and keys)
    • Removes localStorage entries and device identity
    • Clears diagnostic logs
    • Provides step-by-step progress tracking
  • Settings UI Updates (src/components/ui/SettingsView.jsx):

    • Added "Danger Zone" section with reset button
    • Implemented multi-step confirmation flow with:
      • Warning about irreversible action
      • Detailed list of what will be deleted
      • Information about impact on other paired devices
      • Text confirmation requirement ("RESET" must be typed)
    • Real-time progress display during reset with step counter and progress bar
    • Auto-reload after successful reset

Implementation Details

  • Safety First: Requires explicit text confirmation to prevent accidental data loss
  • Transparent Process: Shows step-by-step progress (6 steps total) during reset
  • Device-Specific: Only affects current device; other paired devices retain their data
  • Error Handling: Gracefully handles failures in individual reset steps while continuing with others
  • Circular Dependency Prevention: Uses dynamic imports in reset service to avoid module circular dependencies

https://claude.ai/code/session_01JEfepf2Krt8KZY7RsQCHZP

Add a new "Danger Zone" section in Settings with a "Reset all data" option
that allows users to completely wipe their local device state when they have
sync issues or corrupted data.

The reset functionality:
- Clears both IndexedDB databases (hypermark, hypermark-keys)
- Removes all localStorage keys used by the app
- Disconnects WebRTC and Nostr sync providers
- Shows a confirmation dialog requiring user to type "RESET"
- Displays progress during the reset operation
- Automatically reloads the page when complete

This addresses the issue where competing Nostr events cause bookmark
create/delete operations to cancel each other out, allowing users to
start fresh on affected devices.

https://claude.ai/code/session_01JEfepf2Krt8KZY7RsQCHZP
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 5, 2026

Deploy Preview for hypermarkk ready!

Name Link
🔨 Latest commit 0719352
🔍 Latest deploy log https://app.netlify.com/projects/hypermarkk/deploys/6984348ba5eda00008b45522
😎 Deploy Preview https://deploy-preview-19--hypermarkk.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pheuberger pheuberger merged commit cbbb8b9 into main Feb 5, 2026
8 checks passed
@pheuberger pheuberger deleted the claude/add-reset-functionality-UARdK branch February 5, 2026 06:13
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