Skip to content

Commit 75dc3db

Browse files
committed
Merge remote-tracking branch 'origin/main' into modes-selector-improvements
2 parents 0185d09 + abaa3d8 commit 75dc3db

File tree

272 files changed

+8020
-2495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+8020
-2495
lines changed

.changeset/curly-states-see.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Close the browsertool properly when a remote browser is configured but a fallback local one is used

.github/pull_request_template.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,15 @@ Detail the steps to test your changes. This helps reviewers verify your work.
3030
- Include relevant testing environment details if applicable.
3131
-->
3232

33-
### Type of Change
34-
35-
<!-- Mark all applicable boxes with an 'x'. -->
36-
37-
- [ ] 🐛 **Bug Fix**: Non-breaking change that fixes an issue.
38-
- [ ]**New Feature**: Non-breaking change that adds functionality.
39-
- [ ] 💥 **Breaking Change**: Fix or feature that would cause existing functionality to not work as expected.
40-
- [ ] ♻️ **Refactor**: Code change that neither fixes a bug nor adds a feature.
41-
- [ ] 💅 **Style**: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
42-
- [ ] 📚 **Documentation**: Updates to documentation files.
43-
- [ ] ⚙️ **Build/CI**: Changes to the build process or CI configuration.
44-
- [ ] 🧹 **Chore**: Other changes that don't modify `src` or test files.
45-
4633
### Pre-Submission Checklist
4734

4835
<!-- Go through this checklist before marking your PR as ready for review. -->
4936

5037
- [ ] **Issue Linked**: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
5138
- [ ] **Scope**: My changes are focused on the linked issue (one major feature/fix per PR).
5239
- [ ] **Self-Review**: I have performed a thorough self-review of my code.
53-
- [ ] **Code Quality**:
54-
- [ ] My code adheres to the project's style guidelines.
55-
- [ ] There are no new linting errors or warnings (`npm run lint`).
56-
- [ ] All debug code (e.g., `console.log`) has been removed.
57-
- [ ] **Testing**:
58-
- [ ] New and/or updated tests have been added to cover my changes.
59-
- [ ] All tests pass locally (`npm test`).
60-
- [ ] The application builds successfully with my changes.
61-
- [ ] **Branch Hygiene**: My branch is up-to-date (rebased) with the `main` branch.
40+
- [ ] **Testing**: New and/or updated tests have been added to cover my changes (if applicable).
6241
- [ ] **Documentation Impact**: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
63-
- [ ] **Changeset**: A changeset has been created using `npm run changeset` if this PR includes user-facing changes or dependency updates.
6442
- [ ] **Contribution Guidelines**: I have read and agree to the [Contributor Guidelines](/CONTRIBUTING.md).
6543

6644
### Screenshots / Videos

.github/workflows/website-preview.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ on:
55
branches-ignore:
66
- main
77
paths:
8-
- 'apps/web-roo-code/**'
8+
- "apps/web-roo-code/**"
9+
pull_request:
10+
paths:
11+
- "apps/web-roo-code/**"
912
workflow_dispatch:
1013

1114
env:
@@ -21,11 +24,11 @@ jobs:
2124
- name: Check if VERCEL_TOKEN exists
2225
id: check
2326
run: |
24-
if [ -n "${{ secrets.VERCEL_TOKEN }}" ]; then
25-
echo "has-vercel-token=true" >> $GITHUB_OUTPUT
26-
else
27-
echo "has-vercel-token=false" >> $GITHUB_OUTPUT
28-
fi
27+
if [ -n "${{ secrets.VERCEL_TOKEN }}" ]; then
28+
echo "has-vercel-token=true" >> $GITHUB_OUTPUT
29+
else
30+
echo "has-vercel-token=false" >> $GITHUB_OUTPUT
31+
fi
2932
3033
preview:
3134
runs-on: ubuntu-latest
@@ -43,4 +46,39 @@ jobs:
4346
- name: Build Project Artifacts
4447
run: npx vercel build --token=${{ secrets.VERCEL_TOKEN }}
4548
- name: Deploy Project Artifacts to Vercel
46-
run: npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
49+
id: deploy
50+
run: |
51+
DEPLOYMENT_URL=$(npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
52+
echo "deployment_url=$DEPLOYMENT_URL" >> $GITHUB_OUTPUT
53+
echo "Preview deployed to: $DEPLOYMENT_URL"
54+
55+
- name: Comment PR with preview link
56+
if: github.event_name == 'pull_request'
57+
uses: actions/github-script@v7
58+
with:
59+
script: |
60+
const deploymentUrl = '${{ steps.deploy.outputs.deployment_url }}';
61+
const commentIdentifier = '<!-- roo-preview-comment -->';
62+
63+
const { data: comments } = await github.rest.issues.listComments({
64+
owner: context.repo.owner,
65+
repo: context.repo.repo,
66+
issue_number: context.issue.number,
67+
});
68+
69+
const existingComment = comments.find(comment =>
70+
comment.body.includes(commentIdentifier)
71+
);
72+
73+
if (existingComment) {
74+
return;
75+
}
76+
77+
const comment = commentIdentifier + '\n🚀 **Preview deployed!**\n\nYour changes have been deployed to Vercel:\n\n**Preview URL:** ' + deploymentUrl + '\n\nThis preview will be updated automatically when you push new commits to this PR.';
78+
79+
await github.rest.issues.createComment({
80+
owner: context.repo.owner,
81+
repo: context.repo.repo,
82+
issue_number: context.issue.number,
83+
body: comment
84+
});

.roo/rules-pr-fixer/1_workflow.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<workflow_instructions>
2+
<mode_overview>
3+
This mode is designed to help resolve issues in existing pull requests. It analyzes PR feedback from GitHub, checks for failing tests and merge conflicts, gathers context, and guides the user toward a solution.
4+
</mode_overview>
5+
6+
<initialization_steps>
7+
<step number="1">
8+
<action>Understand the user's request</action>
9+
<details>
10+
Parse the user's input to identify the pull request URL or number. Extract the repository owner and name.
11+
</details>
12+
</step>
13+
<step number="2">
14+
<action>Gather PR context</action>
15+
<tools>
16+
<tool>use_mcp_tool (github): get_pull_request, get_pull_request_comments</tool>
17+
<tool>gh cli: Check workflow status and logs for failing tests.</tool>
18+
<tool>gh cli: Check for merge conflicts.</tool>
19+
</tools>
20+
</step>
21+
</initialization_steps>
22+
23+
<main_workflow>
24+
<phase name="analysis">
25+
<description>Analyze the gathered information to identify the core problems.</description>
26+
<steps>
27+
<step>Summarize review comments and requested changes.</step>
28+
<step>Identify the root cause of failing tests by analyzing logs.</step>
29+
<step>Determine if merge conflicts exist.</step>
30+
</steps>
31+
</phase>
32+
33+
<phase name="synthesis">
34+
<description>Synthesize the findings and present them to the user.</description>
35+
<steps>
36+
<step>Present a summary of the issues found (reviews, failing tests, conflicts).</step>
37+
<step>Use ask_followup_question to ask the user how they want to proceed with fixing the issues.</step>
38+
</steps>
39+
</phase>
40+
41+
<phase name="implementation">
42+
<description>Execute the user's chosen course of action.</description>
43+
<steps>
44+
<step>Check out the PR branch locally using 'gh pr checkout'.</step>
45+
<step>Apply code changes based on review feedback.</step>
46+
<step>Fix failing tests.</step>
47+
<step>Resolve conflicts by rebasing the PR branch and force-pushing.</step>
48+
</steps>
49+
</phase>
50+
</main_workflow>
51+
52+
<completion_criteria>
53+
<criterion>All actionable review comments have been addressed.</criterion>
54+
<criterion>All tests are passing.</criterion>
55+
<criterion>The PR is free of merge conflicts.</criterion>
56+
</completion_criteria>
57+
</workflow_instructions>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<best_practices>
2+
<general_principles>
3+
<principle priority="high">
4+
<name>Context is Key</name>
5+
<description>Always gather full context before attempting a fix. This includes reading all relevant PR comments, checking CI/CD logs, and understanding the surrounding code.</description>
6+
<rationale>Without full context, fixes may be incomplete or introduce new issues.</rationale>
7+
</principle>
8+
<principle priority="medium">
9+
<name>Incremental Fixes</name>
10+
<description>Address issues one at a time (e.g., fix tests first, then address comments). This makes the process more manageable and easier to validate.</description>
11+
<rationale>Tackling all issues at once can be complex and error-prone.</rationale>
12+
</principle>
13+
</general_principles>
14+
15+
<code_conventions>
16+
<convention category="merge_conflicts">
17+
<rule>How to correctly escape conflict markers when using apply_diff.</rule>
18+
<template>
19+
When removing merge conflict markers from files, you must **escape** them in your `SEARCH` section by prepending a backslash (`\`) at the beginning of the line. This prevents the system from mistaking them for actual diff syntax.
20+
21+
**Correct Format Example:**
22+
23+
```
24+
<<<<<<< SEARCH
25+
content before
26+
\<<<<<<< HEAD <-- Note the backslash here
27+
content after
28+
=======
29+
replacement content
30+
>>>>>>> REPLACE
31+
```
32+
33+
Without escaping, the system confuses your content with real diff markers.
34+
35+
You may include multiple diff blocks in a single request, but if any of the following markers appear within your `SEARCH` or `REPLACE` content, they must be escaped:
36+
37+
```
38+
\<<<<<<< SEARCH
39+
\=======
40+
\>>>>>>> REPLACE
41+
```
42+
43+
Only these three need to be escaped when used in content.
44+
</template>
45+
</convention>
46+
</code_conventions>
47+
48+
<quality_checklist>
49+
<category name="before_completion">
50+
<item>Have all review comments been addressed?</item>
51+
<item>Are all CI/CD checks passing?</item>
52+
<item>Is the PR free of merge conflicts?</item>
53+
<item>Have the changes been tested locally?</item>
54+
</category>
55+
</quality_checklist>
56+
</best_practices>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<common_patterns>
2+
<pattern name="checking_pr_status">
3+
<usage>A set of commands to quickly assess the state of a Pull Request.</usage>
4+
<template>
5+
<command tool="gh">
6+
gh pr status --json number,title,state,conflict,reviewDecision,headRefName,headRepositoryOwner
7+
</command>
8+
<command tool="gh">
9+
gh pr checks
10+
</command>
11+
<command tool="gh">
12+
gh pr view --comments
13+
</command>
14+
</template>
15+
</pattern>
16+
<pattern name="analyzing_failing_tests">
17+
<usage>Commands to investigate why a specific test is failing.</usage>
18+
<template>
19+
<command tool="gh">
20+
gh run list --workflow=<workflow_id> --branch=<branch_name> --json databaseId,name,status,conclusion
21+
</command>
22+
<command tool="gh">
23+
gh run view --log-failed <run_id>
24+
</command>
25+
</template>
26+
</pattern>
27+
<pattern name="resolving_conflicts_rebase">
28+
<usage>A sequence of commands to resolve merge conflicts locally using rebase.</usage>
29+
<template>
30+
<command tool="git">git checkout main</command>
31+
<command tool="git">git pull origin main</command>
32+
<command tool="git">git checkout <pr_branch></command>
33+
<command tool="git">git rebase main</command>
34+
<comment>After resolving conflicts manually, continue the rebase.</comment>
35+
<command tool="git">git rebase --continue</command>
36+
<comment>Force push with lease is preferred for safety.</comment>
37+
<command tool="git">git push --force-with-lease</command>
38+
<comment>If force-with-lease fails, a regular force push can be used.</comment>
39+
<command tool="git">git push --force</command>
40+
</template>
41+
</pattern>
42+
<pattern name="checking_out_pr">
43+
<usage>Command to check out a pull request branch locally.</usage>
44+
<template>
45+
<command tool="gh">gh pr checkout <pr_number_or_url></command>
46+
</template>
47+
</pattern>
48+
</common_patterns>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<tool_usage_guide>
2+
<tool_priorities>
3+
<priority level="1">
4+
<tool>use_mcp_tool (server: github)</tool>
5+
<when>Use at the start to get all review comments and PR metadata.</when>
6+
<why>Provides the core context of what needs to be fixed from a human perspective.</why>
7+
</priority>
8+
<priority level="2">
9+
<tool>gh pr checks</tool>
10+
<when>After getting comments, to check the technical status.</when>
11+
<why>Quickly identifies if there are failing automated checks that need investigation.</why>
12+
</priority>
13+
</tool_priorities>
14+
15+
<tool_specific_guidance>
16+
<tool name="use_mcp_tool (github: get_pull_request)">
17+
<best_practices>
18+
<practice>Always fetch details to get the branch name, owner, repo slug, and mergeable state.</practice>
19+
</best_practices>
20+
</tool>
21+
22+
<tool name="use_mcp_tool (github: get_pull_request_comments)">
23+
<best_practices>
24+
<practice>Parse all comments to create a checklist of required changes.</practice>
25+
<practice>Ignore comments that are not actionable or have been resolved.</practice>
26+
</best_practices>
27+
</tool>
28+
29+
<tool name="gh run view --log-failed">
30+
<best_practices>
31+
<practice>Use this command to get the exact error messages from failing tests.</practice>
32+
<practice>Search the log for keywords like 'error', 'failed', or 'exception' to quickly find the root cause.</practice>
33+
</best_practices>
34+
</tool>
35+
36+
<tool name="ask_followup_question">
37+
<best_practices>
38+
<practice>After analyzing all the problems (reviews, tests, conflicts), present a summary to the user.</practice>
39+
<practice>Provide clear, actionable next steps as suggestions.</practice>
40+
<practice>Example suggestions: "Address review comments first.", "Tackle the failing tests.", "Resolve merge conflicts."</practice>
41+
</best_practices>
42+
</tool>
43+
</tool_specific_guidance>
44+
</tool_usage_guide>

0 commit comments

Comments
 (0)