Skip to content

Comments

Remove duplicate export and delete account functionality from settings index#59

Merged
fortune710 merged 3 commits intofortune710:devfrom
MaestroDev19:main
Feb 20, 2026
Merged

Remove duplicate export and delete account functionality from settings index#59
fortune710 merged 3 commits intofortune710:devfrom
MaestroDev19:main

Conversation

@MaestroDev19
Copy link
Collaborator

@MaestroDev19 MaestroDev19 commented Feb 19, 2026

Summary

Removed duplicate export data and delete account functionality from app/settings/index.tsx, keeping these features only in app/settings/privacy.tsx where they belong.

Changes

  • Removed handleExportData, performExport, and handleDeleteAccount functions from settings index
  • Removed Export Data and Delete Account UI buttons from settings index
  • Removed unused imports: FileSystem, Sharing, logger, BACKEND_URL, DownloadIcon, Trash2, ActivityIndicator
  • Removed unused state variables: isDeleting and isExporting
  • Removed unused session from auth context destructuring

Result

  • Settings index now only contains the Sign Out functionality
  • All data management features (export/delete) are consolidated in the Privacy & Security screen
  • Cleaner separation of concerns and reduced code duplication

Summary by CodeRabbit

  • Changes
    • Removed "Export Data" option from Settings
    • Removed "Delete Account" option from Settings
    • Simplified Settings screen to focus on Profile, Notifications, Privacy, About, and Sign Out

@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 19, 2026

@MaestroDev19 is attempting to deploy a commit to the fortune710's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This change removes the Export Data and Delete Account flows from the Settings screen: their UI entries, handlers, state variables, and related imports. Remaining settings items (Profile, Notifications, Privacy, About, Sign Out) are unchanged.

Changes

Cohort / File(s) Summary
Settings Screen Simplification
frontend/app/settings/index.tsx
Removed Export Data and Delete Account UI items, handlers, and loading state (isExporting, isDeleting); removed imports and dependencies related to export/delete flows (BACKEND_URL, expo-file-system/legacy, expo-sharing, logger, DownloadIcon, Trash2); kept existing sign-out and other settings items intact.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hopping through settings, I tidy with care,
Gone are the exports and deletes from the lair,
Fewer buttons to press, the list feels so neat,
Quiet screens hum — a simpler heartbeat. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing duplicate export and delete account functionality from settings index, which aligns with the primary objective of consolidating these features.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
frontend/app/settings/index.tsx (2)

77-79: Remove the no-op onUpdate handler.

Registering an empty onUpdate fires the callback on every pan-move event with no effect. If visual feedback isn't planned, drop the call entirely to avoid the unnecessary JS-thread invocations.

♻️ Proposed refactor
   const swipeDownGesture = Gesture.Pan()
     .runOnJS(true)
     .onStart((event) => {
       startY.current = event.absoluteY;
     })
-    .onUpdate((event) => {
-       // Optional: Add visual feedback logic here if needed
-    })
     .onEnd((event) => {
       if (startY.current < SWIPE_THRESHOLD && event.translationY > 100 && event.velocityY > 500) {
         router.back();
       }
     });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/app/settings/index.tsx` around lines 77 - 79, Remove the no-op
.onUpdate((event) => { /* Optional: Add visual feedback logic here if needed */
}) call so the handler chain no longer registers an empty callback that fires on
every pan-move; locate the chain where .onUpdate is attached (the
.onUpdate((event) => { ... }) invocation) and simply delete that method call (or
replace it with a real visual-feedback implementation if you intend to handle
updates).

67-68: Prefer useWindowDimensions() over Dimensions.get('window') inside the component body.

Dimensions.get('window') is a one-shot read; it won't trigger a re-render on orientation/window-size change, so SWIPE_THRESHOLD can be stale until the next unrelated render. The idiomatic React Native approach is the useWindowDimensions hook, which keeps the value reactive.

♻️ Proposed refactor
-import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Image, Alert, Dimensions } from 'react-native';
+import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Image, Alert, useWindowDimensions } from 'react-native';
 export default function SettingsScreen() {
   const { profile } = useAuthContext();
-  const { height: screenHeight } = Dimensions.get('window');
+  const { height: screenHeight } = useWindowDimensions();
   const SWIPE_THRESHOLD = screenHeight * 0.15;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/app/settings/index.tsx` around lines 67 - 68, Replace the one-time
Dimensions.get('window') call with the reactive useWindowDimensions hook: import
useWindowDimensions from 'react-native' and inside the component call const {
height: screenHeight } = useWindowDimensions(); then compute SWIPE_THRESHOLD =
screenHeight * 0.15 so SWIPE_THRESHOLD updates on orientation/size changes;
update any references to the old Dimensions.get('window') usage and remove that
import if now unused.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/app/settings/index.tsx`:
- Around line 77-79: Remove the no-op .onUpdate((event) => { /* Optional: Add
visual feedback logic here if needed */ }) call so the handler chain no longer
registers an empty callback that fires on every pan-move; locate the chain where
.onUpdate is attached (the .onUpdate((event) => { ... }) invocation) and simply
delete that method call (or replace it with a real visual-feedback
implementation if you intend to handle updates).
- Around line 67-68: Replace the one-time Dimensions.get('window') call with the
reactive useWindowDimensions hook: import useWindowDimensions from
'react-native' and inside the component call const { height: screenHeight } =
useWindowDimensions(); then compute SWIPE_THRESHOLD = screenHeight * 0.15 so
SWIPE_THRESHOLD updates on orientation/size changes; update any references to
the old Dimensions.get('window') usage and remove that import if now unused.

@fortune710 fortune710 merged commit c70f672 into fortune710:dev Feb 20, 2026
0 of 2 checks passed
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