Skip to content

Comments

Revert "Implement async user data export queue and move export/delete to Privacy screen"#55

Merged
fortune710 merged 1 commit intomainfrom
revert-54-main
Feb 13, 2026
Merged

Revert "Implement async user data export queue and move export/delete to Privacy screen"#55
fortune710 merged 1 commit intomainfrom
revert-54-main

Conversation

@fortune710
Copy link
Owner

@fortune710 fortune710 commented Feb 13, 2026

Reverts #54

Summary by CodeRabbit

  • New Features

    • Added data export functionality allowing users to download their profile data in JSON or HTML format.
    • Added account deletion capability with confirmation dialog.
  • Updates

    • Redesigned settings interface with integrated export and delete account options.
    • Streamlined export and account management flows for improved user experience.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
keepsafe Building Building Preview, Comment Feb 13, 2026 9:12pm

@fortune710 fortune710 merged commit 40f7ffc into main Feb 13, 2026
2 of 4 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This PR consolidates user data export functionality from an asynchronous background job system to a simplified synchronous HTTP endpoint. The changes remove legacy async export infrastructure, job scheduling, and file-based storage while introducing a new GET /user/{user_id}/export endpoint supporting JSON and HTML formats, alongside refactored frontend export and delete account UI flows.

Changes

Cohort / File(s) Summary
Backend Export Consolidation
backend/routers/user.py
Replaced async export job system with synchronous GET /user/{user_id}/export endpoint. Adds html to ExportFormat enum. Implements inline data fetching, validation, sanitization, and format-specific rendering (JSON/HTML) with strengthened authorization checks and logging. Removes 399 lines of legacy async/job management code.
Frontend Settings UI Redesign
frontend/app/settings/index.tsx
Added new export data and delete account flows with state management (isExporting, isDeleting), authorization checks, error handling, and user feedback via alerts and activity indicators. Refactored settings layout with header, profile section, and mapped settings items including new Export Data and Delete Account actions with dynamic loading states.
Frontend Privacy Cleanup
frontend/app/settings/privacy.tsx
Removed comprehensive export/polling/download logic and delete account backend integration. Simplified UI to static labels and straightforward confirmation dialogs. Eliminates auth dependency, file system access, and related utilities, reducing file from 330 to 19 lines of substantive change.
Dependency Update
frontend/package.json
Updated expo-background-task from ~1.0.8 to ~1.0.10.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Frontend Client
    participant Server as Backend API
    participant DB as User Data Store

    Client->>Client: User clicks Export Data
    Client->>Client: Validate auth token & profile ID
    
    Client->>Server: GET /user/{user_id}/export?format=json/html<br/>+ Authorization header
    
    Server->>Server: Authenticate caller
    Server->>Server: Verify user ownership
    
    Server->>DB: Fetch user profile
    DB-->>Server: User profile data
    
    Server->>DB: Fetch user entries
    DB-->>Server: Entries list
    
    Server->>DB: Fetch friendships
    DB-->>Server: Friendships data
    
    Server->>Server: Cleanse data (remove None values)
    Server->>Server: Format as JSON or HTML<br/>(sanitize URLs, escape content)
    
    Server-->>Client: HTTP response with export data
    Client->>Client: Download file via blob/share
    Client->>Client: Show success/failure feedback
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 From async queues we hop away,
One endpoint now saves the day!
JSON and HTML in sync we blend,
Export flows simplified, my friend! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-54-main

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant