Skip to content

Commit 1ac2556

Browse files
Merge branch 'main' into fix/anthropic-adaptive-thinking-display
2 parents b2e6883 + a5f4192 commit 1ac2556

450 files changed

Lines changed: 19909 additions & 2959 deletions

File tree

Some content is hidden

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

‎.coderabbit.yaml‎

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: en-US
3+
tone_instructions: >-
4+
Be direct and evidence-first. Report only concrete, actionable findings grounded in changed code.
5+
Prioritize correctness, security, data loss, lifecycle, and regressions; avoid speculative style
6+
comments and unrelated refactors.
7+
8+
reviews:
9+
profile: assertive
10+
request_changes_workflow: true
11+
high_level_summary: true
12+
high_level_summary_in_walkthrough: true
13+
review_status: true
14+
review_details: true
15+
collapse_walkthrough: true
16+
changed_files_summary: true
17+
poem: false
18+
19+
auto_review:
20+
enabled: false
21+
drafts: false
22+
auto_incremental_review: true
23+
labels:
24+
- "coderabbit-review-active"
25+
26+
path_filters:
27+
- "!**/node_modules/**"
28+
- "!**/dist/**"
29+
- "!**/out/**"
30+
- "!**/coverage/**"
31+
- "!**/.turbo/**"
32+
- "!apps/vscode-e2e/.vscode-test/**"
33+
- "!bin/*.vsix"
34+
- "!webview-ui/**/__screenshots__/**"
35+
36+
path_instructions:
37+
- path: "**/*"
38+
instructions: >-
39+
Act as an adversarial second-opinion reviewer. Verify PR claims against implementation,
40+
contracts, and tests. Trace changed inputs through normal, boundary, error, cancellation,
41+
retry, and default paths and their consumers. Seek plausible counterexamples and regressions
42+
from removed safeguards. Report only concrete, actionable findings grounded in changed code
43+
and repository conventions. Prioritize correctness, security, data loss, lifecycle, and test
44+
gaps. Avoid speculative style comments and unrelated refactors. Search for existing helpers
45+
before suggesting abstractions, and distinguish actual defects from unsupported checks.
46+
47+
- path: "**/*.{ts,tsx,js,jsx,mts,mjs,cts,cjs}"
48+
instructions: >-
49+
Check strict typing and exhaustive behavior across normal, boundary, error,
50+
cancellation, retry, and compatibility paths. Verify promises and errors are handled,
51+
existing helpers are reused, and new code introduces no `any`, unjustified double
52+
assertions, floating promises, duplicated helpers, or increased lint suppressions.
53+
54+
- path: "{**/*.{test,spec}.{ts,tsx,js,jsx},**/__tests__/**}"
55+
instructions: >-
56+
Require regression coverage at the lowest valid harness with behavior-focused
57+
assertions, including relevant negative, error, false/unset, and boundary cases.
58+
Check cleanup and deterministic async behavior and prefer shared typed test helpers.
59+
Visible webview changes require a durable Playwright component snapshot; behavior-only
60+
changes do not.
61+
Reject weak assertions on values that could take multiple forms: .toBeDefined() or
62+
.toHaveBeenCalled() alone are not sufficient when the actual type, value, or object
63+
identity is verifiable. For listener registration and removal, assert the same function
64+
reference was added and removed (not expect.any(Function)).
65+
Flag tests that assert in-flight behavior only after the call completes — these cannot
66+
prove the behavior fires during execution. Check that describe block names match the
67+
actual subjects of the tests they contain.
68+
69+
- path: "apps/vscode-e2e/**"
70+
instructions: >-
71+
Reserve end-to-end coverage for behavior that requires the real VS Code host, workspace
72+
APIs, extension activation, webview messaging, file watchers, or a full workflow. Keep
73+
detailed protocol, parsing, storage, retry, and edge cases at lower test layers.
74+
75+
- path: "{packages/types/src/**,webview-ui/src/components/settings/**,src/core/config/**,src/core/webview/**}"
76+
instructions: >-
77+
For persisted settings, verify the complete schema/storage/runtime/webview round trip,
78+
shared default semantics, and focused true plus false/unset tests. SettingsView controls
79+
must read and update local `cachedState`, include the value in the explicit save payload,
80+
and receive the persisted value back from extension state.
81+
82+
- path: "src/**"
83+
instructions: >-
84+
Verify extension/webview contracts, cancellation and error propagation, VS Code
85+
lifecycle correctness, and behavior under retries and partial failure. Check listeners,
86+
resources, and providers are disposed without stale state or duplicate work.
87+
88+
- path: "webview-ui/**"
89+
instructions: >-
90+
Check React state and effect dependencies, cleanup, accessibility, i18n, and light/dark
91+
theme behavior. New markup should use Tailwind; add VS Code CSS variables to
92+
`src/index.css` before Tailwind use. Use Vitest for behavior and Playwright component
93+
snapshots only for durable visible changes.
94+
95+
- path: "{src/api/**,src/core/prompts/**,src/core/tools/**,src/services/mcp/**,src/services/destructive-command-guard/**}"
96+
instructions: >-
97+
Treat model, provider, MCP, path, command, and tool data as untrusted. Check approval and
98+
allowlist bypasses, injection and traversal risks, secrets/PII exposure in logs, abort and
99+
stream behavior, retries, provider compatibility, and enforcement at execution time—not
100+
only at presentation or planning time.
101+
102+
- path: "{src/**/{state,history,task,tasks,service,services,cache,caches,worktree,worktrees}/**,packages/**/{state,history,task,tasks,service,services,cache,caches,worktree,worktrees}/**,webview-ui/src/**/{state,history,task,tasks,service,services,cache,caches,worktree,worktrees}/**}"
103+
instructions: >-
104+
Check persistence and lifecycle invariants: awaited atomic writes, rollback or explicit
105+
partial-failure behavior, cross-window state consistency, stale listeners/watchers,
106+
cancellation, idempotency, and safe restart/resume without lost or duplicated state.
107+
108+
- path: ".github/**"
109+
instructions: >-
110+
Require full commit SHA pins, least-privilege permissions, safe expression and shell
111+
interpolation, and trusted metadata handling. Privileged workflows must never check out,
112+
execute, install from, or otherwise trust a fork PR head.
113+
114+
- path: "{AGENTS.md,**/AGENTS.md,CONTRIBUTING.md,.changeset/**,CHANGELOG.md,src/CHANGELOG.md}"
115+
instructions: >-
116+
Enforce repository policy: routine PRs must not add changesets or edit changelogs except
117+
during release preparation. Verify documentation describes real behavior and contracts,
118+
and deprioritize prose-only nits that do not affect correctness or usability.
119+
120+
pre_merge_checks:
121+
custom_checks:
122+
- name: Regression evidence
123+
mode: warning
124+
instructions: >-
125+
Fail only when a concrete changed behavior lacks focused coverage at the lowest valid
126+
test layer, tests merely mirror implementation, an affected error/negative/unset branch
127+
is omitted, or a durable visible UI change lacks its required Playwright component
128+
snapshot. Do not demand tests for unchanged behavior, mechanical configuration, or every
129+
branch without a plausible regression scenario. Cite the changed behavior and missing
130+
evidence.
131+
- name: Trust and persistence invariants
132+
mode: error
133+
instructions: >-
134+
Fail only for a concrete changed path that leaks secrets or PII, trusts or executes
135+
unvalidated input, bypasses approval or allowlist controls, can lose persisted state due
136+
to a missing await, non-atomic write, or omitted default propagation, or leaks lifecycle
137+
resources. Cite the path and a plausible triggering scenario; pass when no such changed
138+
path exists.
139+
140+
tools:
141+
eslint:
142+
enabled: true
143+
actionlint:
144+
enabled: true
145+
shellcheck:
146+
enabled: true
147+
gitleaks:
148+
enabled: true
149+
semgrep:
150+
enabled: true

‎.github/pull_request_template.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Detail the steps to test your changes. This helps reviewers verify your work.
4646

4747
<!--
4848
For UI changes to static rendered state, the primary artifact is a committed
49-
Playwright CT snapshot (`*.visual.tsx` in `webview-ui/`) — that baseline
49+
Playwright Story Gallery snapshot (`*.visual.tsx` in `webview-ui/`) — that baseline
5050
becomes durable regression coverage for the surface. See
5151
`webview-ui/AGENTS.md` for what deserves a snapshot.
5252

‎.github/workflows/code-qa.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,33 @@ jobs:
9191
- name: Check types
9292
run: pnpm check-types
9393

94+
build-vsix:
95+
name: Build test VSIX
96+
if: github.event_name == 'pull_request'
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Checkout code
100+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
101+
with:
102+
persist-credentials: false
103+
- name: Setup Node.js and pnpm
104+
uses: ./.github/actions/setup-node-pnpm
105+
with:
106+
install-args: "--frozen-lockfile"
107+
- name: Build workspace packages
108+
run: |
109+
pnpm --filter @roo-code/build build
110+
pnpm --filter @roo-code/vscode-webview build
111+
- name: Package extension
112+
run: pnpm --filter ./src vsix
113+
- name: Upload test VSIX
114+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
115+
with:
116+
name: zoo-code-vsix-pr-${{ github.event.pull_request.number }}
117+
path: bin/*.vsix
118+
if-no-files-found: error
119+
retention-days: 7
120+
94121
unit-test:
95122
name: platform-unit-test (${{ matrix.name }})
96123
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)