Feat: Add Confirmation Dialog for Global Face Reclustering
Describe the feature
๐ Feature Description
I propose adding a Confirmation Dialog (or Alert Modal) that appears when a user clicks the "Recluster Faces" button in the Settings > Application Controls section.
Currently, clicking the "Recluster Faces" button immediately triggers the triggerGlobalReclustering mutation. Since this is a resource-intensive operation that rebuilds face clusters from scratch, users should be warned about the consequences and asked to confirm their intent before the process begins.
๐ Problem Statement
- No Safety Net: There is no intermediate step. A single click initiates a heavy backend process.
- User Frustration: An accidental click could consume system resources or alter data organization unexpectedly, with no obvious way to cancel.
๐ฏ Expected Outcome
- Interaction Update: Clicking "Recluster Faces" should not immediately call the API.
- UI Feedback: A modal/dialog should appear with a warning message:
- Title: "Start Global Reclustering?"
- Message: "This process will rebuild all face clusters from scratch. It may take a significant amount of time and system resources. Are you sure you want to continue?"
- Action:
- Cancel: Closes the dialog; no action taken.
- Confirm: Closes dialog and triggers
reclusterMutation.mutate().
๐ Proposed Implementation
Modify ApplicationControlsCard.tsx to include a state for the dialog visibility and wrap the mutation trigger.
Add ScreenShots
Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
๐ Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
This looks like a solid UX and safety improvement, especially given how resource-intensive global face reclustering is. Nice catch, @Cubix33. Adding a confirmation step before triggering the mutation makes a lot of sense here. Once the maintainers approve, Iโd be happy to help this could be approached by gating the existing reclustering trigger behind a lightweight confirmation dialog at the UI level so the action only proceeds after explicit user consent. Glad to assist or review if needed.
This is worth implementing, and it should be a relatively small change now that the codebase includes a ConfirmDialog.tsx component.
@Cubix33, if you're still interested in working on this, let me know and I'll assign it to you. Otherwise, we'll move on to the next person in the queue.
@rohan-pandeyy sure i can work on this
Please go ahead ๐
Hi @rohan-pandeyy
I came across issue #966 and noticed that it is currently assigned to Cubix33..but there doesn't appear to be any pull request yet, and the issue is still marked as Todo.
I'm intrested to work on it , could you please let me know if it's available ?
Hi @Cubix33, Iโm interested in working on issue #966. I noticed itโs currently assigned to you, but there doesnโt appear to be a PR yet. Are you still working on it? If not, Iโd be happy to take it up.
can you assign this issue to me?
Hi @rohan-pandeyy , this issue had been assigned to Cubix33 but i don't think there is a PR till now. If possible can you assign this to me?
I would solve this by adding a confirmation card component and a new bool state. When the user presses the Recluster Faces button the state will be converted to true and the new confirmation card will appear. Then action will be taken based on what user chooses in the confirmation card.
Any use of AI = None
hi @rohan-pandeyy i noticed that there hasn't been a pull request by cubix33 since july 7 so if this issue isn't actively being worked on could you possibly assign it to me?
I'll fix up the dialog message and make another PR
Hi @Cubix33
I'd like to contribute to this issue by implementing a confirmation dialog for the "Recluster Faces" action in ApplicationControlsCard.tsx.
I'll work on adding dialog visibility state, displaying the warning message, and ensuring that the reclustering mutation is triggered only when the user confirms. Clicking "Cancel" will close the dialog without initiating the operation.
I'll also make sure the implementation follows the project's existing UI patterns and includes appropriate tests.
Could you please let me know if this issue is available to work on? I'd be happy to submit a PR following the project's contribution guidelines.
Thank you!
Hi @Cubix33 @rohan-pandeyy , is this issue still open to work??