Skip to content

Conversation

@ahmet-cetinkaya
Copy link
Owner

@ahmet-cetinkaya ahmet-cetinkaya commented Dec 1, 2025

🚀 Motivation and Context

This feature adds database reset functionality to the settings screen with a confirmation dialog. Users can now reset their entire database to start fresh, which is useful for testing, troubleshooting, or when they want to clear all data.

The implementation includes:

  • Database reset functionality in the settings
  • Confirmation dialog to prevent accidental data loss
  • Proper validation and error handling
  • Support for all 22 supported languages
  • Clean UI integration with existing settings components

📋 Checklist for Reviewer

  • Tests passed locally.
  • Commit history is clean and descriptive.
  • Documentation updated (if applicable).
  • Code quality standards were met (e.g., linter passed).

Closes #141

…alog

- Introduce ResetDatabaseSettings component to advanced settings dialog
- Add ResetDatabaseDialog with swipe-to-confirm functionality for database reset
- Implement RestartScreen with countdown timer for app restart after reset
- Add translation keys for reset database feature
- Update subproject commit reference
@ahmet-cetinkaya ahmet-cetinkaya added the enhancement New feature or request label Dec 1, 2025
@ahmet-cetinkaya ahmet-cetinkaya self-assigned this Dec 1, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @ahmet-cetinkaya, your pull request is larger than the review limit of 150000 diff characters

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ahmet-cetinkaya, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a crucial maintenance feature: the ability to reset the application's database. This functionality is seamlessly integrated into the advanced settings, providing users with a clear, confirmed process to clear all their data. The implementation prioritizes user experience by including a confirmation step and a dedicated restart screen, while also enhancing internal logging practices.

Highlights

  • Database Reset Functionality: Introduced a new feature that allows users to reset their entire application database from the settings screen.
  • Confirmation Dialog: Implemented a confirmation dialog to prevent accidental data loss before performing the database reset.
  • Multi-language Support: Ensured that the new database reset feature and its associated UI elements are supported across all 22 languages.
  • Logging Improvements: Replaced direct debugPrint calls with a structured Logger utility for more consistent and categorized logging throughout the database context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a database reset functionality, a significant and potentially destructive operation. The implementation includes the core database logic, UI components for confirmation and restart, and localization for all supported languages. The code is generally well-structured, with good refactoring of logging calls. However, there is a critical issue in the error handling flow for the reset operation. The current optimistic UI approach can lead to a confusing and poor user experience if the reset fails, particularly on mobile platforms where the app can get into an unusable state. My review focuses on addressing this critical flaw to make the feature more robust and user-friendly.

… updates

- Add error handling with retry/cancel options when reset fails
- Show loading state during reset process with 'resetting' message
- Update restart screen to show success state with checkmark icon
- Add translation keys for reset status and error messages
- Implement state management for reset process in dialog component
…dling

- Implement automatic backup before database reset with 7-day retention
- Add error handling for various failure scenarios (permissions, disk space, locked database)
- Enhance reset dialog with user-friendly error messages and recovery options
- Add comprehensive localization for error messages in 21 languages
- Improve restart functionality with platform-specific process management
- Add basic UI tests for database reset components
@ahmet-cetinkaya ahmet-cetinkaya merged commit f3b1841 into main Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] sync problem and deleting android databas

2 participants