Skip to content

fix: show edit warning dialog only once per session #6059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Jul 22, 2025

This PR fixes issue #6058 where the edit warning dialog was shown every time a message was edited, creating a frustrating user experience.

Changes

  • Added hasShownEditWarning flag to ClineProvider class to track if the warning has been shown in the current session
  • Modified handleEditOperation in webviewMessageHandler.ts to check this flag before showing the dialog
  • If the flag is false (first edit), show the dialog and set the flag to true
  • If the flag is true (subsequent edits), skip the dialog and proceed directly with the edit
  • Updated tests to reflect the new behavior

Testing

  • All existing tests pass
  • Added new test case to verify that subsequent edits do not show the dialog
  • Updated existing test to verify that the first edit shows the dialog

Fixes #6058


Important

Fixes issue #6058 by showing the edit warning dialog only once per session using a session-based flag in ClineProvider.

  • Behavior:
    • Adds hasShownEditWarning flag to ClineProvider to track if edit warning dialog has been shown in the current session.
    • Modifies handleEditOperation in webviewMessageHandler.ts to check hasShownEditWarning before showing the dialog.
    • Shows dialog on first edit and sets flag to true; skips dialog on subsequent edits.
  • Testing:
    • Updates existing tests to verify dialog shows on first edit and not on subsequent edits.
    • Adds new test case for subsequent edits without dialog.
  • Misc:

This description was created by Ellipsis for bde7c2a. You can customize this summary. It will automatically update as commits are pushed.

- Added hasShownEditWarning flag to ClineProvider to track if warning has been shown
- Modified handleEditOperation to check flag before showing dialog
- Updated tests to reflect new behavior where dialog only shows on first edit
- Fixes #6058 where edit warning was shown on every message edit
@roomote roomote bot requested review from mrubens, cte and jr as code owners July 22, 2025 08:53
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 22, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

Edit warning dialog appears on every edit
2 participants