Skip to content

Commit 96b410a

Browse files
committed
Merge branch 'main' into lramos15/ministerial-wildebeest
# Conflicts: # src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts # src/vs/workbench/contrib/chat/test/browser/widget/chatPetWidget.test.ts
2 parents 3f757c0 + cbc3656 commit 96b410a

1,204 files changed

Lines changed: 77071 additions & 15291 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.

.github/CODENOTIFY

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,12 @@ src/vs/sessions/services/sessions/** @sandy081 @lszomoru
9494
src/vs/sessions/contrib/layout/** @benibenj
9595
src/vs/sessions/browser/parts/** @benibenj
9696
src/vs/sessions/browser/workbench.ts @benibenj
97+
98+
# Agents Window architecture specifications and their routing policy.
99+
/src/vs/sessions/*.md @sandy081
100+
/src/vs/sessions/contrib/layout/browser/*.md @sandy081
101+
/src/vs/sessions/contrib/providers/*/*.md @sandy081
102+
/.github/instructions/sessions.instructions.md @sandy081
103+
/.github/skills/sessions/SKILL.md @sandy081
104+
/.github/skills/chat-customizations-editor/SKILL.md @sandy081
105+

.github/CODEOWNERS

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@ src/vs/workbench/services/extensions/common/extensionPoints.json @TylerLeonhardt
1919
# review is required to make sure TypeScript is not a better choice.
2020
.eslint-allowed-javascript-files @alexr00 @alexdima @sbatten @TylerLeonhardt
2121

22-
# Agents Window architecture specifications and their routing policy.
23-
# These files describe stable contracts and should not change for routine fixes.
24-
/src/vs/sessions/*.md @sandy081
25-
/src/vs/sessions/contrib/layout/browser/*.md @sandy081
26-
/src/vs/sessions/contrib/providers/*/*.md @sandy081
27-
/.github/instructions/sessions.instructions.md @sandy081
28-
/.github/skills/sessions/SKILL.md @sandy081
29-
/.github/skills/chat-customizations-editor/SKILL.md @sandy081

.github/instructions/best-practices.instructions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ applyTo: src/vs/**
2323

2424
- Don't use context keys as a source of truth for application logic (for example, by reading `IContextKeyService.getContextKeyValue()` and branching on the result). Read the state from its owning service or model instead. Context keys are intended for declarative enablement and visibility, such as when clauses, command preconditions, and menu contributions.
2525

26+
## Multi-Window DOM
27+
28+
- Always create workbench DOM elements in the main window JavaScript realm, including elements that will be rendered in an auxiliary window. Use helpers such as `dom.$` and `dom.h`, or use `mainWindow.document.createElement`. Do not use `targetWindow.document.createElement` or `element.ownerDocument.createElement`; auxiliary windows intentionally reject `createElement` so that checks such as `element instanceof HTMLElement` continue to work.
29+
- This rule applies to DOM element creation, not to window-bound APIs. Resolve the target window with `dom.getWindow(element)` when using APIs such as timers, animation frames, focus, observers, or `getComputedStyle`.
30+
2631
## URI
2732

2833
- Don't hardcode URI scheme strings like `'file'`, `'untitled'`, or `'vscode-remote'`. Use the `Schemas` constants from `vs/base/common/network.ts` (e.g. `Schemas.file`, `Schemas.untitled`, `Schemas.vscodeRemote`).

.github/instructions/design-tokens.instructions.md

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ applyTo: src/vs/**/*.css
1313
> vocabulary, worked examples, and how to give UI feedback in design terms.
1414
1515
VS Code ships a design-system **size** ramp. These tokens are registered in
16-
[baseSizes.ts](../../src/vs/platform/theme/common/sizes/baseSizes.ts) (and the
17-
agents font ramp in [sizes.ts](../../src/vs/sessions/common/sizes.ts)) and are
18-
emitted as `--vscode-*` CSS variables. **When generating or editing CSS, use the
19-
token variable instead of a raw `px` value** wherever a token exists for that
20-
value. This keeps new UI visually consistent with the design system.
16+
[baseSizes.ts](../../src/vs/platform/theme/common/sizes/baseSizes.ts) and emitted
17+
as `--vscode-*` CSS variables. **When generating or editing CSS, use the token
18+
variable instead of a raw `px` value** wherever a token exists for that value.
19+
This keeps new UI visually consistent with the design system.
2120

2221
> Every `--vscode-*` size var you reference must already exist in
2322
> [vscode-known-variables.json](../../build/lib/stylelint/vscode-known-variables.json)
@@ -98,50 +97,44 @@ reuses the matching size token + `fontWeight.semiBold`, **never** a separate
9897
| 11 | `--vscode-fontSize-label2` | regular |
9998
| 10 | `--vscode-fontSize-label3` | regular |
10099

101-
**Deprecated** — the legacy `--vscode-bodyFontSize*` tokens are deprecated. Use
102-
the generic ramp above instead:
100+
**Deprecated** — the legacy `--vscode-bodyFontSize*` and Agents-specific
101+
`--vscode-agents-fontSize-*` tokens are deprecated. Use the generic ramp above
102+
instead:
103103

104104
| Deprecated | px | Use instead |
105105
|------------|----|-------------|
106106
| `--vscode-bodyFontSize` | 13 | `--vscode-fontSize-body1` |
107107
| `--vscode-bodyFontSize-small` | 12 | `--vscode-fontSize-label1` |
108108
| `--vscode-bodyFontSize-xSmall` | 11 | `--vscode-fontSize-body2` |
109-
110-
Agents window ramp (`src/vs/sessions/**`) — identical values, `agents-`-prefixed
111-
(pair size with a weight token, **never** add a separate "strong" size):
112-
113-
| px | Size var | Weight |
114-
|----|----------|--------|
115-
| 26 | `--vscode-agents-fontSize-heading1` | semiBold |
116-
| 18 | `--vscode-agents-fontSize-heading2` | semiBold |
117-
| 13 | `--vscode-agents-fontSize-heading3` | semiBold |
118-
| 13 | `--vscode-agents-fontSize-body1` | regular |
119-
| 11 | `--vscode-agents-fontSize-body2` | regular |
120-
| 12 | `--vscode-agents-fontSize-label1` | regular |
121-
| 11 | `--vscode-agents-fontSize-label2` | regular |
122-
| 10 | `--vscode-agents-fontSize-label3` | regular |
123-
124-
Weights: `--vscode-agents-fontWeight-regular` (400),
125-
`--vscode-agents-fontWeight-semiBold` (600). The ramp is **400/600 only** — there
126-
is no medium (500). "Strong" = same size token + `semiBold`. See
127-
[Font weight](#font-weight--font-weight) below.
109+
| `--vscode-agents-fontSize-heading1` | 26 | `--vscode-fontSize-heading1` |
110+
| `--vscode-agents-fontSize-heading2` | 18 | `--vscode-fontSize-heading2` |
111+
| `--vscode-agents-fontSize-heading3` | 13 | `--vscode-fontSize-heading3` |
112+
| `--vscode-agents-fontSize-body1` | 13 | `--vscode-fontSize-body1` |
113+
| `--vscode-agents-fontSize-body2` | 11 | `--vscode-fontSize-body2` |
114+
| `--vscode-agents-fontSize-label1` | 12 | `--vscode-fontSize-label1` |
115+
| `--vscode-agents-fontSize-label2` | 11 | `--vscode-fontSize-label2` |
116+
| `--vscode-agents-fontSize-label3` | 10 | `--vscode-fontSize-label3` |
128117

129118
## Font weight — `font-weight`
130119

131-
Both the generic and agents ramps use a **two-weight ramp** — there are no other
132-
weights. Pair every text style with one of these:
120+
The generic ramp uses two weights — there are no others. Pair every text style
121+
with one of these:
122+
123+
| weight | Variable | Use |
124+
|--------|----------|-----|
125+
| 400 | `--vscode-fontWeight-regular` | body, labels, metadata |
126+
| 600 | `--vscode-fontWeight-semiBold` | headings, "strong" emphasis |
133127

134-
| weight | Generic var | Agents var | Use |
135-
|--------|-------------|------------|-----|
136-
| 400 | `--vscode-fontWeight-regular` | `--vscode-agents-fontWeight-regular` | body, labels, metadata |
137-
| 600 | `--vscode-fontWeight-semiBold` | `--vscode-agents-fontWeight-semiBold` | headings, "strong" emphasis |
128+
The legacy `--vscode-agents-fontWeight-regular` and
129+
`--vscode-agents-fontWeight-semiBold` tokens are deprecated; use the corresponding
130+
generic variables above.
138131

139132
- **No medium (500).** `font-weight: 500` is **off the ramp** — snap it to
140133
`semiBold` (600). The same goes for `700`/`bold` and any other numeric weight:
141134
round to the nearer of 400/600.
142135
- **"Strong" is not a separate size.** A "Body 1 Strong" / "Label 2 Strong"
143-
style reuses the matching `--vscode-fontSize-*` (or `--vscode-agents-fontSize-*`)
144-
token paired with `semiBold`. Never introduce a separate strong *size* token.
136+
style reuses the matching `--vscode-fontSize-*` token paired with `semiBold`.
137+
Never introduce a separate strong *size* token.
145138
- `normal` ≡ 400 → `regular`. **Leave untouched:** `inherit`, `lighter`,
146139
`bolder`, and any `var()`/`calc()` expression. Preserve `!important`.
147140

.github/skills/design-philosophy/SKILL.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,9 @@ vocabulary that lets an agreed design be built consistently**, not as the openin
257257
move in a review. Reach for them *after* you've named the feeling and the
258258
principle, never instead of it.
259259

260-
The size tokens live in
261-
[`baseSizes.ts`](../../../src/vs/platform/theme/common/sizes/baseSizes.ts) and the
262-
font ramp in [`sizes.ts`](../../../src/vs/sessions/common/sizes.ts); the full
263-
reference is in
260+
The size and font tokens live in
261+
[`baseSizes.ts`](../../../src/vs/platform/theme/common/sizes/baseSizes.ts); the
262+
full reference is in
264263
[design-tokens.instructions.md](../../instructions/design-tokens.instructions.md).
265264

266265
<a id="design-tokens"></a>

.github/skills/policy-and-managed-settings/github-managed-settings.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ the schema's nested
8181

8282
| Schema property (path) | Type in schema | Composition (`x-composition.strategy`) |
8383
|------------------------|----------------|----------------------------------------|
84-
| `permissions.disableBypassPermissionsMode` | string enum `"disable"` | most-restrictive-wins (sticky once set) |
84+
| `permissions.disableBypassPermissionsMode` | string enum `"disable"` \| `"allow-auto-only"` | most-restrictive-wins (sticky once set) |
8585
| `model` | string (`auto`, a model family name, or a full model id) ||
8686
| `permissions.model` | string (legacy location for `model`) ||
8787
| `forceRemoteSettingsRefresh` | boolean | MDM wins; controls the server cache rather than a configuration setting |
@@ -372,10 +372,13 @@ constant, configuration policy, or policy-data export.
372372

373373
`forceRemoteSettingsRefresh` is not a user configuration setting. It controls whether the
374374
server-managed-settings cache may satisfy startup, so VS Code preserves it in the cached raw server
375-
bag and always includes it in the native MDM watch schema. `DefaultAccountProvider` resolves an
376-
explicit native MDM boolean ahead of the cached server value; when the result is `true`, it bypasses
377-
an otherwise-fresh server cache for the first fetch for that account in the current process. The
378-
cache remains available as the normal fetch-failure fallback.
375+
bag and always includes it in the native MDM watch schema. `DefaultAccountProvider` resolves the
376+
control across native MDM, cached server, and managed-file delivery before using the server cache.
377+
When the result is `true`, only a fresh successful server response for the current account,
378+
authentication provider, and endpoint satisfies the requirement. A failed refresh may retain cached
379+
restrictions and the flag itself, but the Account Policy gate keeps AI features disabled until a
380+
retry succeeds. Authentication remains available so users can recover from missing or expired
381+
credentials.
379382

380383
Reference tests:
381384
- `src/vs/platform/policy/test/common/copilotManagedSettings.test.ts`

.github/skills/policy-and-managed-settings/local-testing.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,22 @@ Choose the client setup in the GUI:
2525
- **Code OSS from sources:** apply `product.overrides.json`, reload, sign in, and
2626
run **Developer: Sync Account Policy**.
2727
- **Stable, Insiders, CLI, or other clients:** configure the displayed system
28-
proxy mapping.
29-
30-
Use **Clear Policy Cache** when the runtime's fresh managed-settings cache
31-
prevents a network request. The live request log confirms whether the client
32-
reached the server.
28+
proxy mapping and enable Proxyman's platform proxy toggle (**Tools > macOS
29+
Proxy** or **Tools > Override Windows Proxy**). VS Code clients must also add
30+
the displayed `http.proxy` property to `settings.json`.
31+
32+
Use **Clear SDK Policy Cache**, expand the macOS or Windows section, and run the
33+
copied command when the runtime's fresh managed-settings cache prevents a network
34+
request. Select a known policy endpoint in the live request log to open its
35+
response editor.
36+
37+
To test `forceRemoteSettingsRefresh` fail-closed behavior, apply the
38+
`customization-lockdown` managed-settings preset and sync once successfully.
39+
Then select the `server-error` preset or choose the `malformed-json`,
40+
`disconnect`, or `timeout` response behavior and sync again. The successful
41+
first response seeds the cached refresh requirement; the second response
42+
exercises HTTP, parse, immediate-network, or client-timeout failure without
43+
manually editing payloads.
3344

3445
Other Copilot clients share the default cache. For deterministic testing, start
3546
both Code OSS and the mock server with the same isolated `COPILOT_CACHE_HOME`.
Lines changed: 105 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,120 @@
11
---
22
name: update-screenshots
3-
description: Download screenshot baselines from the latest CI run and commit them. Use when asked to update, accept, or refresh component screenshot baselines from CI, or after the screenshot-test GitHub Action reports differences. This skill should be run as a subagent.
3+
description: Update the committed blocks-ci screenshot hashes after the "Screenshots & Tests" check fails, or investigate a screenshot diff reported on a PR. Use when asked to update, accept, or refresh component screenshot baselines from CI. This skill should be run as a subagent.
44
---
55

66
# Update Component Screenshots from CI
77

8-
Screenshot baselines are **no longer stored in the repository**. They are managed by an external screenshot service (`hediet-screenshots.azurewebsites.net`). The CI workflow uploads screenshots to this service and diffs them automatically.
8+
Screenshot **images** are not stored in the repository — they live in an external service
9+
(`hediet-screenshots.azurewebsites.net`), keyed by commit SHA. But a subset of fixtures is
10+
pinned by **hash** in [`test/componentFixtures/blocks-ci-screenshots.md`](../../../test/componentFixtures/blocks-ci-screenshots.md),
11+
and that file **is** committed. When those hashes change, CI fails and you must update the file.
912

10-
When the `Checking Component Screenshots` GitHub Action detects changes, it posts a PR comment with before/after comparisons. No manual baseline updates are needed — the screenshots on the `main` branch commit become the new baselines automatically after merge.
13+
## Two different outcomes, only one of which blocks
1114

12-
## What Changed
15+
The `Screenshots & Tests` job in [`.github/workflows/component-fixtures.yml`](../../workflows/component-fixtures.yml)
16+
produces two independent results:
1317

14-
- Baseline images were removed from `test/componentFixtures/.screenshots/baseline/`.
15-
- Git LFS is no longer used for screenshot storage.
16-
- The screenshot service stores images keyed by commit SHA and handles diffing.
18+
| Result | Blocking? | Action |
19+
| --- | --- | --- |
20+
| Screenshot **diff report** (PR comment with before/after images) | No — informational | Review the visuals. Nothing to commit. |
21+
| **blocks-ci hash mismatch** | **Yes — fails the check** | Update `blocks-ci-screenshots.md` and commit. |
1722

18-
## If Screenshots Need Investigation
23+
A fixture opts into the blocking gate with `labels: { kind: 'screenshot', blocksCi: true }`.
24+
Only those fixtures appear in `blocks-ci-screenshots.md`.
1925

20-
1. Check the PR comment posted by the CI workflow for visual diffs.
21-
2. Download the `screenshots` artifact from the CI run for the raw captured images:
26+
The failure looks like this:
27+
28+
```
29+
##[error]blocks-ci screenshot hashes do not match committed file. See PR comment or job summary for the updated content.
30+
```
31+
32+
## Step 1: Get the expected hashes from CI
33+
34+
> **Never regenerate the hashes locally.** They are hashes of the rendered PNG bytes, produced
35+
> on `ubuntu-latest`. Rendering on macOS or Windows yields different bytes and therefore
36+
> different hashes, so locally generated values will fail CI. Always copy the values from the
37+
> CI job.
38+
39+
Three surfaces carry the same content — use whichever is handy:
40+
41+
- The **PR comment** titled "blocks-ci screenshots changed" (non-fork PRs only) — contains the
42+
full updated file plus a patch.
43+
- The **job summary**, which gets the identical body and is the only surface fork PRs receive.
44+
- The **job log**, whose final step prints a unified diff:
2245

2346
```bash
24-
gh run download <run-id> --name screenshots --dir .tmp/screenshots
47+
gh api repos/microsoft/vscode/actions/jobs/<JOB_ID>/logs > "$TMPDIR/ci-job-log.txt"
48+
grep -n '##\[error\]' "$TMPDIR/ci-job-log.txt"
2549
```
2650

27-
3. Compare locally if needed. The artifact contains the full set of captured screenshots.
51+
Find the failed job id with:
52+
53+
```bash
54+
gh pr checks <PR> --json name,link,bucket --jq '.[] | select(.name == "Screenshots & Tests")'
55+
```
56+
57+
## Step 2: Verify the change is intentional before accepting it
58+
59+
This gate exists to catch **unintended** layout regressions, so accepting new hashes without
60+
looking at the images defeats its purpose. The images are publicly fetchable by hash, so pull
61+
both the old (committed) and new (from CI) versions and compare:
62+
63+
```bash
64+
curl -sL -o old.png "https://hediet-screenshots.azurewebsites.net/images/<OLD_HASH>"
65+
curl -sL -o new.png "https://hediet-screenshots.azurewebsites.net/images/<NEW_HASH>"
66+
```
67+
68+
Then view them, and localize the change rather than eyeballing full screenshots — the delta is
69+
often only a pixel or two:
70+
71+
```bash
72+
python3 -c "
73+
from PIL import Image, ImageChops
74+
a = Image.open('old.png').convert('RGB'); b = Image.open('new.png').convert('RGB')
75+
print('diff bbox:', ImageChops.difference(a, b).getbbox())
76+
"
77+
```
78+
79+
Confirm the delta matches what the PR intends. If the fixture is unrelated to the change, or
80+
the shift is larger than expected, treat it as a regression and fix the code instead of the
81+
hashes.
82+
83+
## Step 3: Apply and commit
84+
85+
Edit only the changed lines in `test/componentFixtures/blocks-ci-screenshots.md`, replacing the
86+
old hash in the image URL with the new one:
87+
88+
```md
89+
#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark
90+
![screenshot](https://hediet-screenshots.azurewebsites.net/images/<NEW_HASH>)
91+
```
92+
93+
The file is generated by [`build/lib/screenshotBlocksCi.ts`](../../../build/lib/screenshotBlocksCi.ts)
94+
and compared **byte-for-byte**, so keep the `<!-- auto-generated by CI — do not edit manually -->`
95+
header, the `#### <fixtureId>` / image-link pairing, the blank line between entries, and the
96+
`fixtureId` sort order intact. Verify your edit is the exact inverse of the diff CI reported:
97+
98+
```bash
99+
git diff test/componentFixtures/blocks-ci-screenshots.md
100+
```
101+
102+
Then commit and push. The check re-runs and should pass; hashes on `main` become the new
103+
baseline after merge.
104+
105+
## Investigating further
106+
107+
Raw captured images and the manifest for a run are uploaded as an artifact:
108+
109+
```bash
110+
gh run download <RUN_ID> --name screenshots --dir .tmp/screenshots
111+
```
112+
113+
`manifest.json` maps each `fixtureId` to its `imageHash` and any render errors.
114+
115+
## Related failures from the same job
116+
117+
The check also fails if a fixture **failed to render** (`Fail if fixtures had errors`) or if the
118+
Playwright fixture tests failed. Those are genuine bugs — updating hashes will not help. Look
119+
for `::error::<fixtureId>:` in the log, and download the `playwright-test-results` artifact for
120+
test failures.

0 commit comments

Comments
 (0)