Skip to content

feat(frontend): add confirmation modal before deleting a chat session (#362)#370

Open
annukumar123 wants to merge 2 commits into
imDarshanGK:mainfrom
annukumar123:feature/chat-delete-confirmation-modal
Open

feat(frontend): add confirmation modal before deleting a chat session (#362)#370
annukumar123 wants to merge 2 commits into
imDarshanGK:mainfrom
annukumar123:feature/chat-delete-confirmation-modal

Conversation

@annukumar123

Copy link
Copy Markdown

Description

Closes #362.

  • The Problem: Clicking the delete cross icon (×) next to a chat session instantly triggered onDeleteSession(s.id), wiping out the user's history from the local SQLite database without warning. This is prone to accidental clicks, especially on mobile devices.
  • The Fix: Added stateful validation to intercepts delete clicks:
    • Tracks the target session using sessionToDelete component state.
    • Displays a clean, modal dialog with warning instructions.
    • Executes deletions only upon user confirmation.
    • Styled using the project's existing Tailwind CSS borders, background shadows, and color scheme.

Hackathon Association

  • Program: Social Summer of Code (SSoC) 2026
  • Contributor Role: Student Participant
  • Leaderboard Tracking: Please label this PR with the appropriate SSoC difficulty tags (e.g., ssoc, level-1) so it registers for leaderboard points.

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

@annukumar123 is attempting to deploy a commit to the Darshan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@adikulkarni006

Copy link
Copy Markdown
Collaborator

@annukumar123 Good work! The confirmation modal looks clean and follows the shadcn pattern. However, a few things need to be fixed before merging:

  1. Branch out-of-date – Please merge the latest main into your branch and resolve any conflicts.
  2. Missing SSoC labels – Request maintainer @imDarshanGK to add SSoC26 and good-first-issue (or Easy) labels.
  3. CI pending – Once the branch is updated and maintainer approves the workflow, CI will run.

Please update your branch (git merge main) and push. Then we can review again.

@imDarshanGK Could you please approve the workflow and add the necessary labels when ready? Thanks.

@adikulkarni006

Copy link
Copy Markdown
Collaborator

git checkout feature/chat-delete-confirmation-modal
git fetch origin
git merge origin/main

fix conflicts if any

git push origin feature/chat-delete-confirmation-modal

@annukumar123

Copy link
Copy Markdown
Author

@adikulkarni006 Thanks for the review! I have successfully merged the latest main branch into this feature branch and pushed the changes. The PR should be up-to-date now and ready for the CI checks to run. Let me know if everything looks good on your end! 😊

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.

[FEATURE] Add confirmation modal before deleting a chat session

2 participants