-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: add documentation links for global custom instructions in UI #7114
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
base: main
Are you sure you want to change the base?
Conversation
- Updated translation strings to include links to global rules documentation - Added VSCodeLink components in ModesView to render clickable documentation links - Helps users discover global custom instructions feature as suggested in GitHub discussion #7111
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing my own code is like debugging in production - technically possible but morally questionable.
@@ -50,7 +50,7 @@ | |||
"title": "Mode-specific Custom Instructions (optional)", | |||
"resetToDefault": "Reset to default", | |||
"description": "Add behavioral guidelines specific to {{modeName}} mode.", | |||
"loadFromFile": "Custom instructions specific to {{mode}} mode can also be loaded from the <span>.roo/rules-{{slug}}/</span> folder in your workspace (.roorules-{{slug}} and .clinerules-{{slug}} are deprecated and will stop working soon)." | |||
"loadFromFile": "Custom instructions specific to {{mode}} mode can also be loaded from the <span>.roo/rules-{{slug}}/</span> folder in your workspace or from the global <0>.roo/rules-{{slug}}/</0> (.roorules-{{slug}} and .clinerules-{{slug}} are deprecated and will stop working soon)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical issue: This PR only updates the English translation file, but there are 17 other language files that need the same update. Without updating them, non-English users will see missing translation keys.
All translation files need the new "0" placeholder added to both customInstructions.loadFromFile (line 53) and globalCustomInstructions.loadFromFile (line 79).
Affected files:
- locales/*/prompts.json (ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW)
"0": ( | ||
<VSCodeLink | ||
href={buildDocLink( | ||
"features/custom-instructions#global-custom-instructions", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that both the mode-specific and global custom instructions sections link to the same documentation anchor (features/custom-instructions#global-custom-instructions)?
The mode-specific section (line 1172) might benefit from a different anchor that explains the relationship between workspace and global rules specifically for modes, rather than pointing to the general global instructions section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use either of these links for both mode-specific and general rules as they cover how to set up both globally: https://docs.roocode.com/features/custom-instructions#global-rules-directory
https://docs.roocode.com/features/custom-instructions#setting-up-global-rules
<VSCodeLink | ||
href={buildDocLink( | ||
"features/custom-instructions#global-custom-instructions", | ||
"prompts_global_custom_instructions_global", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UTM campaign parameters are different between the two links:
- Line 1172: prompts_mode_custom_instructions_global
- Line 1368: prompts_global_custom_instructions_global
While this is good for tracking, consider if the naming could be clearer. For example:
- prompts_mode_specific_global_rules
- prompts_global_rules
This would make it more obvious what each link is tracking.
@@ -1166,6 +1166,15 @@ | |||
}} | |||
/> | |||
), | |||
"0": ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding aria-label attributes to these VSCodeLink components for better accessibility. This helps screen reader users understand what these documentation links are for.
For example:
<VSCodeLink
href={buildDocLink(...)}
style={{ display: "inline" }}
aria-label="Learn about global custom instructions for modes"
/>
@roomote-agent please make adjustments based on the feedback |
I'm on it! I'll address the following feedback:
Working on these changes now... |
…mentation links - Added <0> placeholders to all 17 non-English translation files for global rules links - Updated documentation anchors to use #global-rules-directory and #setting-up-global-rules - Added aria-label attributes to all VSCodeLink components for better accessibility - Improved UTM campaign parameter naming for clearer tracking
✅ All requested changes have been implemented! Changes made:
All tests are passing locally and the translation check has already passed in CI. The changes ensure non-English users will see properly formatted links instead of missing translation keys. |
This PR addresses the suggestion from GitHub discussion #7111 to add documentation links for global custom instructions in the UI.
Changes
prompts.json
to include placeholders for documentation links about global rulesVSCodeLink
components inModesView.tsx
to render clickable documentation linksWhy this change?
As suggested by @deathtothenig in the discussion, the global custom instructions feature is not easily discoverable in the settings. Adding these documentation links helps users:
Testing
Fixes #7111
Important
Adds documentation links for global custom instructions in
ModesView.tsx
and updatesprompts.json
in multiple locales to include placeholders for these links.VSCodeLink
components inModesView.tsx
to render documentation links for global custom instructions.prompts.json
in multiple locales to include placeholders for documentation links about global rules.This description was created by
for 50dd578. You can customize this summary. It will automatically update as commits are pushed.