Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 30, 2025

This PR implements a dismissible system prompt warning as requested in issue #5219. Users can now dismiss the yellow warning box that appears when they have a custom system prompt override active, and their preference will be persisted. The warning includes a dismiss button (X icon) and the setting persists across VSCode sessions.


Important

Adds a dismissible system prompt warning feature with persistent state across sessions, including tests for functionality.

  • Behavior:
    • Adds dismissible system prompt warning in SystemPromptWarning.tsx with a button to dismiss the warning.
    • Persists dismissal state using systemPromptWarningDismissed in ExtensionStateContext.tsx.
    • Warning only shows if hasSystemPromptOverride is true and systemPromptWarningDismissed is false in ChatView.tsx.
  • State Management:
    • Adds systemPromptWarningDismissed to globalSettingsSchema in global-settings.ts.
    • Updates ExtensionState in ExtensionMessage.ts to include systemPromptWarningDismissed.
    • Implements setSystemPromptWarningDismissed in ExtensionStateContext.tsx.
  • Testing:
    • Adds SystemPromptWarning.spec.tsx to test rendering, dismiss button functionality, and translation usage.

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

- Add systemPromptWarningDismissed boolean setting to GlobalSettings schema
- Update ExtensionState type to include the new setting
- Add state management through ExtensionStateContext with getter and setter
- Modify SystemPromptWarning component to include dismiss button with X icon
- Update ChatView to conditionally render warning based on both hasSystemPromptOverride and !systemPromptWarningDismissed
- Add test coverage for SystemPromptWarning component
- Dismiss functionality persists user preference through extension state system
@roomote roomote requested review from cte, jr and mrubens as code owners June 30, 2025 10:08
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Jun 30, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jun 30, 2025

No security or compliance issues detected. Reviewed everything up to f398eea.

Security Overview
  • 🔎 Scanned files: 6 changed file(s)
Detected Code Changes

The diff is too large to display a summary of code changes.

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

<button
onClick={handleDismiss}
className="flex items-center justify-center w-5 h-5 ml-2 hover:bg-vscode-editor-background hover:bg-opacity-20 rounded"
title="Dismiss warning">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a translatable label for the dismiss button title (e.g., t('chat:dismissWarning')) instead of the hardcoded string.

Suggested change
title="Dismiss warning">
title={t("chat:dismissWarning")}>

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 30, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 7, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants