Skip to content

Conversation

@panyamkeerthana
Copy link
Contributor

@panyamkeerthana panyamkeerthana commented Aug 28, 2025

Description

Add a rule scope dropdown in the RulesSection that lets users choose between creating workspace rules or global rules. This sets up the base for managing rules that work across all projects, with updates in the backend and protocol to support global rule creation.

  • added a rule scope dropdown in RulesSection with isGlobalMode state.
  • added backend function to create global rule files and reload config.
  • extended protocol and core handler (config/addGlobalRule) to support global rule creation.
  • added info hover component
  • generated unique rule names for global rules

Screen recording or screenshot

Screen.Recording.2025-09-08.at.08.54.07.mov

Summary by cubic

Adds a toggle in RulesSection to choose between creating workspace rules or global rules, enabling global rule files to be created directly from the UI. Connects the UI to a new core handler to write the rule in the global directory and reload config.

  • New Features
    • UI toggle: “Create global rules” in RulesSection; ExploreBlocksButton routes to global rule creation when enabled.
    • Protocol/Core: Added config/addGlobalRule message; createNewGlobalRuleFile writes to the global path, opens the file, and triggers config reload.
    • Pass-through: Webview passthrough updated to allow the new message.

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch 4 times, most recently from f393f84 to 20b3f89 Compare September 5, 2025 21:59
@panyamkeerthana panyamkeerthana changed the title feature: added UI toggle for global rule creation mode feature: added UI for global rule creation Sep 5, 2025
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch 4 times, most recently from 68ee686 to 383103b Compare September 8, 2025 13:54
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch 3 times, most recently from 383103b to db4bdb1 Compare September 16, 2025 14:41
@panyamkeerthana panyamkeerthana marked this pull request as ready for review September 16, 2025 14:51
@panyamkeerthana panyamkeerthana requested a review from a team as a code owner September 16, 2025 14:51
@panyamkeerthana panyamkeerthana requested review from Patrick-Erichsen and removed request for a team September 16, 2025 14:51
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 16, 2025
@panyamkeerthana panyamkeerthana changed the title feature: added UI for global rule creation feat: added UI for global rule creation Sep 16, 2025
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch from db4bdb1 to 43f464d Compare September 16, 2025 15:35
@Patrick-Erichsen
Copy link
Collaborator

@prakashsharma91 mind sharing a screenshot of what this looks like with the new rules section in settings?

@panyamkeerthana
Copy link
Contributor Author

Screen.Recording.2025-09-17.at.15.08.45.mov

@Patrick-Erichsen
Copy link
Collaborator

Nice ! I could see this being useful for all of the "new block" buttons on the settings page.

My only nitpick is that I think the select should be incorporated into the "Plus" button itself. We have a button similar to what I'm describing on the hub:

Screenshot 2025-09-19 at 12 53 04 PM

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch from 43f464d to 7b50ed7 Compare September 22, 2025 18:54
@panyamkeerthana
Copy link
Contributor Author

panyamkeerthana commented Sep 22, 2025

@Patrick-Erichsen I added a new DropdownButton.tsx component that can be reusable for all of the new block buttons on the settings page. Here's what it looks like in the Rules section:

Screenshot 2025-09-22 at 15 28 47

@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch from 7b50ed7 to 52f86c0 Compare September 22, 2025 19:27
Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen left a comment

Choose a reason for hiding this comment

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

Thanks for implementing the new button! A few nitpicks/polish requests

  • The border color/thickness is not the same for the other "add" buttons in settings, it's thinner/lighter
  • Nitpick but I prefer just "Add rule" for the tooltip to keep things simple/consistent
  • This advanced button should only be visible when the user has "Local agent" select. For hub agents the button doesn't modify anything on your local filesystem, it just opens a link to the hub
  • Instead of "Globally" we should say "Global"
  • There is a bug with the filepath logic, I clicked "Current workspace" and it correctly added it to the .continue in my workspace, but then I clicked "Globally" it still added to current workspace. Eventually it sometimes does add globally but it's flaky.
  • I think the hover effect should be the same as the other buttons, eg a ghost button, rather than the orange fill I'm getting here
Screenshot 2025-09-22 at 2 19 31 PM

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 22, 2025
- added global mode toggle
- implemented conditional styling (white when enabled, gray when disabled)
feat: improve global rules UI and fix debug mode issues

- added dropdown button component to switch between global and workspace rule creation.
- fixed global rules creation to use nested rules/ subdir in debug mode
- prevent default glob patterns for global rules by returning undefined globs
- generate unique rule names for global rules
- added watcher for rules in global directory
@panyamkeerthana panyamkeerthana force-pushed the panyamkeerthana/workspace_global_rules branch from 52f86c0 to 8101b08 Compare September 25, 2025 01:10
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 25, 2025
@Patrick-Erichsen
Copy link
Collaborator

Looks great, thank you again for the attention to detail here! Excited to get this one merged 🚀

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 1, 2025
@sestinj sestinj merged commit b461fdc into continuedev:main Oct 1, 2025
162 of 175 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 1, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 1, 2025

🎉 This PR is included in version 1.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 1, 2025

🎉 This PR is included in version 1.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants