Skip to content

Conversation

@roomote
Copy link
Contributor

@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 cte, jr and mrubens 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
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 23, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 23, 2025
@daniel-lxs
Copy link
Member

This PR was approved instead #6057

@daniel-lxs daniel-lxs closed this Jul 25, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 25, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jul 25, 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 PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Edit warning dialog appears on every edit

4 participants