Skip to content

Comments

Add save confirmation dialog when closing app with unsaved changes#13

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-save-warning-on-close
Draft

Add save confirmation dialog when closing app with unsaved changes#13
Copilot wants to merge 4 commits intomainfrom
copilot/add-save-warning-on-close

Conversation

Copy link

Copilot AI commented Jan 2, 2026

App closes immediately without prompting user to save unsaved changes, risking data loss.

Changes

  • TitleBar.tsx: Added save confirmation dialog using Tauri's message API with three options:
    • Save – saves file then closes (aborts close on save failure)
    • Don't Save – closes without saving
    • Cancel – returns to editor
  • App.tsx: Pass handleSaveFile to TitleBar; fix missing TauriEvent import
const result = await message("Do you want to save changes before closing?", {
  title: "Unsaved Changes",
  kind: "warning",
  buttons: { yes: "Save", no: "Don't Save", cancel: "Cancel" }
});
Original prompt

This section details on the original issue you should resolve

<issue_title>When closing asking user</issue_title>
<issue_description>So when I make some changes and close the app then the app direclty close without asking user a warning to save there work. </issue_description>

<agent_instructions>Hey there i want you to look into the code and fully understand it. when user make some change and usesr tries to close the app it should ask user to save the work and close like any normal editor app</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 2, 2026 18:51
Co-authored-by: Razee4315 <146865285+Razee4315@users.noreply.github.com>
Co-authored-by: Razee4315 <146865285+Razee4315@users.noreply.github.com>
Co-authored-by: Razee4315 <146865285+Razee4315@users.noreply.github.com>
Copilot AI changed the title [WIP] Add warning to save changes before closing app Add save confirmation dialog when closing app with unsaved changes Jan 2, 2026
Copilot AI requested a review from Razee4315 January 2, 2026 18:57
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.

When closing asking user

2 participants