Skip to content

Commit 55b5c91

Browse files
committed
Merge remote-tracking branch 'origin/main' into sharing_improvements
2 parents 7eeb826 + e7ca038 commit 55b5c91

File tree

150 files changed

+4045
-693
lines changed

Some content is hidden

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

150 files changed

+4045
-693
lines changed

.roo/rules-issue-fixer/1_Workflow.xml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,4 +491,62 @@
491491
```
492492
</instructions>
493493
</step>
494+
495+
<step number="11">
496+
<name>Monitor PR Checks</name>
497+
<instructions>
498+
After the PR is created, monitor the CI/CD checks to ensure they pass:
499+
500+
<execute_command>
501+
<command>gh pr checks --watch</command>
502+
</execute_command>
503+
504+
This command will:
505+
1. Display all CI/CD checks configured for the repository
506+
2. Show the status of each check in real-time
507+
3. Update automatically as checks complete
508+
4. Exit when all checks have finished running
509+
510+
Monitor the output and note:
511+
- Which checks are running (e.g., tests, linting, build)
512+
- Any checks that fail and their error messages
513+
- The overall status of the PR checks
514+
515+
If any checks fail:
516+
1. Analyze the failure logs
517+
2. Identify what needs to be fixed
518+
3. Ask the user if they want you to address the failures
519+
520+
<ask_followup_question>
521+
<question>The PR checks have completed. Here's the status:
522+
523+
[Show check results - passing/failing]
524+
525+
[If all pass]: All checks have passed successfully! The PR is ready for review.
526+
527+
[If any fail]: Some checks have failed:
528+
- [Failed check 1]: [Brief error description]
529+
- [Failed check 2]: [Brief error description]
530+
531+
Would you like me to fix these issues?</question>
532+
<follow_up>
533+
<suggest>Yes, please fix the failing checks</suggest>
534+
<suggest>Show me the detailed error logs</suggest>
535+
<suggest>I'll handle the failures manually</suggest>
536+
<suggest>The PR is fine as-is, these failures are expected</suggest>
537+
</follow_up>
538+
</ask_followup_question>
539+
540+
If user wants fixes:
541+
1. Create a plan to address each failure
542+
2. Make necessary code changes
543+
3. Commit and push the fixes
544+
4. Monitor checks again to ensure they pass
545+
546+
Important notes:
547+
- The --watch flag will keep the command running until all checks complete
548+
- This step helps ensure the PR meets all quality standards before review
549+
- Early detection of CI/CD failures saves reviewer time
550+
</instructions>
551+
</step>
494552
</workflow>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
<step>Resolve conflicts by rebasing the PR branch and force-pushing.</step>
4848
</steps>
4949
</phase>
50+
51+
<phase name="validation">
52+
<description>Verify that the pushed changes resolve the issues.</description>
53+
<steps>
54+
<step>Use 'gh pr checks --watch' to monitor the CI/CD pipeline and ensure all workflows execute successfully.</step>
55+
</steps>
56+
</phase>
5057
</main_workflow>
5158

5259
<completion_criteria>

.roo/rules-pr-fixer/3_common_patterns.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,10 @@
4545
<command tool="gh">gh pr checkout <pr_number_or_url></command>
4646
</template>
4747
</pattern>
48+
<pattern name="watching_pr_checks">
49+
<usage>After pushing changes, use this command to monitor the CI/CD pipeline in real-time.</usage>
50+
<template>
51+
<command tool="gh">gh pr checks --watch</command>
52+
</template>
53+
</pattern>
4854
</common_patterns>

.roo/rules-pr-fixer/4_tool_usage.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99
<tool>gh pr checks</tool>
1010
<when>After getting comments, to check the technical status.</when>
1111
<why>Quickly identifies if there are failing automated checks that need investigation.</why>
12-
</priority>
13-
</tool_priorities>
12+
</priority>
13+
<priority level="3">
14+
<tool>gh pr checks --watch</tool>
15+
<when>After pushing a fix, to confirm that the changes have resolved the CI/CD failures.</when>
16+
<why>Provides real-time feedback on whether the fix was successful.</why>
17+
</priority>
18+
</tool_priorities>
1419

1520
<tool_specific_guidance>
1621
<tool name="use_mcp_tool (github: get_pull_request)">

.roo/rules-pr-fixer/5_examples.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@
8181
</ask_followup_question>
8282
</tool_use>
8383
</step>
84+
<step number="6">
85+
<description>After pushing the changes, watch the PR checks to confirm the fix.</description>
86+
<tool_use>
87+
<execute_command>
88+
<command>gh pr checks --watch</command>
89+
</execute_command>
90+
</tool_use>
91+
<analysis>Confirm that all checks are passing after the fix.</analysis>
92+
</step>
8493
</workflow>
8594

8695
<key_takeaways>

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

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,10 @@
163163
[Summary of findings organized by priority]
164164

165165
Would you like me to:
166-
1. Submit these as individual review comments
167-
2. Create a comprehensive review with all comments
168-
3. Modify any of the suggestions
169-
4. Skip the review submission</question>
166+
1. Create a comprehensive review with all comments
167+
2. Modify any of the suggestions
168+
3. Skip the review submission</question>
170169
<follow_up>
171-
<suggest>Submit as individual review comments</suggest>
172170
<suggest>Create a comprehensive review</suggest>
173171
<suggest>Let me modify the suggestions first</suggest>
174172
<suggest>Skip submission - just wanted the analysis</suggest>
@@ -180,41 +178,38 @@
180178
<step number="9">
181179
<name>Submit Review</name>
182180
<instructions>
183-
Based on user preference, submit the review:
181+
Based on user preference, submit the review as a comprehensive review:
184182

185-
For individual comments:
183+
1. First create a pending review:
186184
<use_mcp_tool>
187185
<server_name>github</server_name>
188-
<tool_name>add_pull_request_review_comment_to_pending_review</tool_name>
186+
<tool_name>create_pending_pull_request_review</tool_name>
189187
<arguments>
190188
{
191189
"owner": "[owner]",
192190
"repo": "[repo]",
193-
"pullNumber": [number],
194-
"path": "[file path]",
195-
"line": [line number],
196-
"body": "[comment text]",
197-
"subjectType": "LINE"
191+
"pullNumber": [number]
198192
}
199193
</arguments>
200194
</use_mcp_tool>
201195

202-
For comprehensive review:
203-
1. First create a pending review:
196+
2. Add comments to the pending review using:
204197
<use_mcp_tool>
205198
<server_name>github</server_name>
206-
<tool_name>create_pending_pull_request_review</tool_name>
199+
<tool_name>add_pull_request_review_comment_to_pending_review</tool_name>
207200
<arguments>
208201
{
209202
"owner": "[owner]",
210203
"repo": "[repo]",
211-
"pullNumber": [number]
204+
"pullNumber": [number],
205+
"path": "[file path]",
206+
"line": [line number],
207+
"body": "[comment text]",
208+
"subjectType": "LINE"
212209
}
213210
</arguments>
214211
</use_mcp_tool>
215212

216-
2. Add comments to the pending review
217-
218213
3. Submit the review:
219214
<use_mcp_tool>
220215
<server_name>github</server_name>

packages/cloud/src/CloudService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ export class CloudService {
5252
this.authService.on("logged-out", this.authListener)
5353
this.authService.on("user-info", this.authListener)
5454

55-
this.settingsService = new SettingsService(this.context, this.authService, () =>
56-
this.callbacks.stateChanged?.(),
55+
this.settingsService = new SettingsService(
56+
this.context,
57+
this.authService,
58+
() => this.callbacks.stateChanged?.(),
59+
this.log,
5760
)
5861
this.settingsService.initialize()
5962

packages/cloud/src/SettingsService.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,17 @@ export class SettingsService {
1818
private authService: AuthService
1919
private settings: OrganizationSettings | undefined = undefined
2020
private timer: RefreshTimer
21-
22-
constructor(context: vscode.ExtensionContext, authService: AuthService, callback: () => void) {
21+
private log: (...args: unknown[]) => void
22+
23+
constructor(
24+
context: vscode.ExtensionContext,
25+
authService: AuthService,
26+
callback: () => void,
27+
log?: (...args: unknown[]) => void,
28+
) {
2329
this.context = context
2430
this.authService = authService
31+
this.log = log || console.log
2532

2633
this.timer = new RefreshTimer({
2734
callback: async () => {
@@ -70,15 +77,19 @@ export class SettingsService {
7077
})
7178

7279
if (!response.ok) {
73-
console.error(`Failed to fetch organization settings: ${response.status} ${response.statusText}`)
80+
this.log(
81+
"[cloud-settings] Failed to fetch organization settings:",
82+
response.status,
83+
response.statusText,
84+
)
7485
return false
7586
}
7687

7788
const data = await response.json()
7889
const result = organizationSettingsSchema.safeParse(data)
7990

8091
if (!result.success) {
81-
console.error("Invalid organization settings format:", result.error)
92+
this.log("[cloud-settings] Invalid organization settings format:", result.error)
8293
return false
8394
}
8495

@@ -92,7 +103,7 @@ export class SettingsService {
92103

93104
return true
94105
} catch (error) {
95-
console.error("Error fetching organization settings:", error)
106+
this.log("[cloud-settings] Error fetching organization settings:", error)
96107
return false
97108
}
98109
}

packages/cloud/src/__tests__/CloudService.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ describe("CloudService", () => {
176176

177177
expect(cloudService).toBeInstanceOf(CloudService)
178178
expect(AuthService).toHaveBeenCalledWith(mockContext, expect.any(Function))
179-
expect(SettingsService).toHaveBeenCalledWith(mockContext, mockAuthService, expect.any(Function))
179+
expect(SettingsService).toHaveBeenCalledWith(
180+
mockContext,
181+
mockAuthService,
182+
expect.any(Function),
183+
expect.any(Function),
184+
)
180185
})
181186

182187
it("should throw error if instance already exists", async () => {

packages/telemetry/src/TelemetryService.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,31 @@ export class TelemetryService {
152152
this.captureEvent(TelemetryEventName.CONSECUTIVE_MISTAKE_ERROR, { taskId })
153153
}
154154

155+
/**
156+
* Captures when a tab is shown due to user action
157+
* @param tab The tab that was shown
158+
*/
159+
public captureTabShown(tab: string): void {
160+
this.captureEvent(TelemetryEventName.TAB_SHOWN, { tab })
161+
}
162+
163+
/**
164+
* Captures when a setting is changed in ModesView
165+
* @param settingName The name of the setting that was changed
166+
*/
167+
public captureModeSettingChanged(settingName: string): void {
168+
this.captureEvent(TelemetryEventName.MODE_SETTINGS_CHANGED, { settingName })
169+
}
170+
171+
/**
172+
* Captures when a user creates a new custom mode
173+
* @param modeSlug The slug of the custom mode
174+
* @param modeName The name of the custom mode
175+
*/
176+
public captureCustomModeCreated(modeSlug: string, modeName: string): void {
177+
this.captureEvent(TelemetryEventName.CUSTOM_MODE_CREATED, { modeSlug, modeName })
178+
}
179+
155180
/**
156181
* Captures a marketplace item installation event
157182
* @param itemId The unique identifier of the marketplace item

0 commit comments

Comments
 (0)