Skip to content

fix: persist edit warning dialog preference during session #6057

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

KJ7LNW
Copy link
Collaborator

@KJ7LNW KJ7LNW commented Jul 22, 2025

Context

When editing a message, the user is shown a warning dialog. Currently, this dialog appears every time a message is edited, even if the user has already seen it in the current session. This creates a frustrating user experience when editing multiple messages.

Implementation

This change fixes the issue by:

  1. Using a React ref (hasSeenEditWarningRef) to store the preference in memory during the session
  2. Bypassing the dialog if the user has already seen it once
  3. Adding double-click functionality to user messages for quick editing

The preference is reset when the VS Code window is reloaded, ensuring users are reminded of the warning after a restart.

How to Test

  1. Edit a message by clicking the edit button (hidden but accessible via double-click)
  2. Confirm the warning dialog appears and click 'Confirm'
  3. Edit another message - the dialog should not appear this time
  4. Double-click on a user message - it should immediately enter edit mode without showing the dialog

Fixes #6058

Get in Touch

Discord: KJ7LNW

This change fixes the issue where the edit warning dialog appears on every edit, even after the user has already seen it once. The solution:

1. Uses a React ref to store the preference in memory during the session
2. Bypasses the dialog if the user has already seen it
3. Adds double-click functionality to user messages for quick editing

The preference is reset when the VS Code window is reloaded, ensuring users are reminded of the warning after a restart.

Fixes: #6058

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
@KJ7LNW KJ7LNW force-pushed the fix-edit-warning-dialog-persistence branch from 0408cc1 to 52031a5 Compare July 22, 2025 08:41
@KJ7LNW KJ7LNW moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 22, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused
Projects
Status: PR [Needs Prelim Review]
Development

Successfully merging this pull request may close these issues.

Edit warning dialog appears on every edit
2 participants