Skip to content

Commit 17890eb

Browse files
Merge vps2/f3-mode-profile-writes (8cc8f33, #1560) into vps2/f4-cross-instance-reset
#1560 settled the profile-write plumbing this unit extends, so this head carries that plumbing plus this unit's cross-instance behaviour, resolved file by file. Hand-resolved files: - src/core/webview/ClineProvider.ts: kept main's write machinery - the previousManagerGate/getSelectionAndModeConfigs snapshot with its id-gated restore, the hasConfig fail-closed classification of a rejected profile read, the name-and-id deleteConfig, the launch invalid-pin repair ordering, main's displaySettings fields read through this unit's merged overlay copy, and main's settled dispose() cleanup tail with its loadViewState reload - and kept this unit's cross-instance machinery beside it: the runExclusiveAcrossInstances join around the store write, the sibling overlay snapshot with its commit-time pin recheck and its fail-closed refusal to overwrite the shared store, the sibling postState guards with their named logs, modeSlugResolves, preserveForeignTask, and the boolean-returning loadViewState delivery seam annotated at both ends. - src/core/webview/webviewMessageHandler.ts: kept main's launch repair (an unresolvable view profile re-pins only this view through the durable writes when the shared selection is still valid) and main's mode-slug validation surface, and kept this unit's cross-instance section around the profile save and the rename compensation that depends on it. - src/core/webview/__tests__/webviewMessageHandler.spec.ts: kept main's launch tests, which assert that re-pin contract, and retired this unit's two activation-based variants that the repair replaced; the launch fixture carries main's activateProviderProfile signature with this unit's activate options. - src/core/webview/ClineProvider.spec.ts: union of both suites. This unit's rival double gained the read-back getProfile the writer now performs so the critical-section ordering test still exercises the save inside the section. Five of this unit's tests were retired as superseded by main's counterparts: the two that asserted dispose rejecting on a failing cleanup step (main's tail runs every later step and reports the failure) and the one that expected an unset view-profile provider to default to Anthropic rather than follow the shared selection. - src/core/webview/__tests__/ClineProvider.parallelMode.spec.ts: the two registrations of the manager mock now form one double carrying main's gate (getSelectionAndModeConfigs, hasConfig, gate-backed activation) and this unit's cross-instance section, exporting the manager's typed not-found class with a declared fallback because the original-module import can hand back a partially initialized module for this chain. Main's re-point and replacement-activation bodies won their titles; this unit's sibling-overlay guard tests stayed; main's log-and-continue variant was retired as the guard replaces its outcome and the abort test keeps that coverage; and a deleted profile lookup now rejects with the manager's own ProviderSettingsNotFoundError, as ProviderSettingsManager.getProfile does, so a stale pin is not mistaken for a store outage. - src/activate/registerCommands.ts and its spec: took main's reviewed superset (the postActions helper, the tab-priority focus panel post, the all-instances-aware diagnostics handler); this unit's only own content there was the pre-refactor inline post forms main's helper supersedes, and this unit's all-instances diagnostics test was ported onto main's handler shape with its module mock. - src/extension/api.ts, its configuration spec, and the webview-ui api spec: main's versions wholesale; the set-configuration spec keeps this unit's five lines beside main'sseventeen additions. - src/eslint-suppressions.json: the provider spec's any-suppressions pruned 191 to 188 after the retirements, proved with --prune-suppressions; no count increased. - .gitignore: main's scratch-file ignore entries. Verified: tsc clean; eslint --max-warnings=0 clean on every merged path with no new suppressions; prettier --check clean; 1008 tests across the affected suites green (api-configuration, api-set-configuration, registerCommands, ContextProxy, ProviderSettingsManager, ClineProvider, parallelMode, apiHandlerRebuild, webviewMessageHandler, sticky-mode, sticky-profile, Task.sticky-profile-race).
2 parents b0e1c67 + 8cc8f33 commit 17890eb

124 files changed

Lines changed: 12886 additions & 988 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/workflows/code-qa.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
merge_group:
1010
types: [checks_requested]
1111

12+
# Cancel superseded runs when a pull request is updated. Non-PR events keep
13+
# unique groups, so main, merge-queue, and manual runs are never cancelled.
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
16+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
17+
1218
# Least privilege: every job below escalates only where it needs to.
1319
permissions:
1420
contents: read

‎.github/workflows/codeql.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
schedule:
88
- cron: "24 19 * * 3"
99

10+
# Cancel superseded runs when a pull request is updated. Non-PR events keep
11+
# unique groups, so main pushes and scheduled scans are never cancelled.
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
1016
# Least privilege: the analyze job escalates to security-events: write via its
1117
# own job-level permissions block.
1218
permissions:

‎.github/workflows/e2e.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
merge_group:
88
types: [checks_requested]
99

10+
# Cancel superseded runs when a pull request is updated. Non-PR events keep
11+
# unique groups, so merge-queue and manual runs are never cancelled.
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
1016
permissions:
1117
contents: read
1218

‎.github/workflows/mutation-pr-comment.yml‎

Lines changed: 428 additions & 0 deletions
Large diffs are not rendered by default.

‎.github/workflows/mutation-testing.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
if: github.event_name == 'pull_request'
5151
env:
5252
HEAD_SHA: ${{ github.sha }}
53+
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
5354
run: |
5455
BASE_SHA="$(git rev-parse "$HEAD_SHA^1")"
5556
node scripts/stryker-diff.mjs ci --base "$BASE_SHA" --head "$HEAD_SHA"

‎.github/workflows/release-validation.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ on:
1616
- "releases/**"
1717
- ".github/workflows/release-validation.yml"
1818

19+
# Cancel superseded runs when a pull request is updated. Non-PR events keep
20+
# unique groups, so manual runs are never cancelled.
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
24+
1925
permissions:
2026
contents: read
2127

‎.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ plans/
6262
roo-cli-*.tar.gz*
6363
.merge-*
6464
.zdt-*
65+
.eslint-*.txt
66+
.fix-commit*.txt
67+
.prettier-check.txt
68+
.suites*.txt
69+
.tsc.txt

‎apps/vscode-e2e/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"lint": "eslint src --ext=ts --max-warnings=0",
66
"check-types": "tsc -p tsconfig.esm.json --noEmit",
77
"format": "prettier --write src",
8-
"test:ci": "pnpm -w bundle && pnpm --filter @roo-code/vscode-webview build && pnpm test:run",
9-
"test:ci:mock": "pnpm -w bundle && pnpm --filter @roo-code/vscode-webview build && USE_MOCK=true pnpm test:run",
8+
"test:ci": "pnpm -w bundle && pnpm test:run",
9+
"test:ci:mock": "pnpm -w bundle && USE_MOCK=true pnpm test:run",
1010
"test:record": "AIMOCK_RECORD=true pnpm test:ci",
1111
"test:run": "rimraf out && tsc -p tsconfig.json && dotenv -e .env.local -- node ./out/runTest.js",
12-
"themes:build": "pnpm -w bundle && pnpm --filter @roo-code/vscode-webview build && rimraf out && tsc -p tsconfig.json",
12+
"themes:build": "pnpm -w bundle && rimraf out && tsc -p tsconfig.json",
1313
"themes:update": "pnpm themes:build && node ./out/theme-fixtures/generate.js update",
1414
"themes:check": "pnpm themes:build && node ./out/theme-fixtures/generate.js check",
1515
"themes:test": "pnpm --filter @roo-code/types build && rimraf out && tsc -p tsconfig.json && node --test ./out/theme-fixtures/fixtures.test.js",
-898 Bytes
Loading

‎apps/vscode-e2e/src/visual/electron.visual.ts‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,21 @@ for (const scenario of scenarios) {
8989
const tokenCountMask = webviewFrame
9090
.frameLocator("iframe")
9191
.locator('[data-testid="context-tokens-count"],[data-testid="context-window-size"]')
92+
// The time under each message is the real send time, so it changes on every run, and so does the length
93+
// of its text ("Today 9:05 AM" and "Yesterday 12:36 PM" are not equally long). A mask covers the
94+
// element's box, so that box needs a fixed size as well: without it the masked area differs between
95+
// runs, in width and, when the text wraps onto a second line, in height.
96+
await contentFrame.evaluate(() => {
97+
document.querySelectorAll<HTMLElement>('[data-testid="message-timestamp"]').forEach((time) => {
98+
time.style.setProperty("width", "160px", "important")
99+
time.style.setProperty("white-space", "nowrap", "important")
100+
time.style.setProperty("overflow", "hidden", "important")
101+
})
102+
})
103+
// Mask it, as the token counters above, and keep the rest of the scene byte-stable.
104+
const messageTimeMask = webviewFrame.frameLocator("iframe").locator('[data-testid="message-timestamp"]')
92105
await expect(sidebar).toHaveScreenshot(`electron-${scenario.name}-sidebar.png`, {
93-
mask: [tokenCountMask],
106+
mask: [tokenCountMask, messageTimeMask],
94107
})
95108

96109
if (scenario.webviewSnapshot) {

0 commit comments

Comments
 (0)