Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f139b1e
feat: register open surfaces by connection identity (WI-6)
tnaum-ms Nov 23, 2026
b45e579
feat: resolve surface clients without changing identity (WI-6)
tnaum-ms Nov 23, 2026
95dd27b
feat: bind Collection View sessions to connection identity (WI-6)
tnaum-ms Nov 23, 2026
9de6a42
feat: add the shared unavailable connection banner (WI-6)
tnaum-ms Nov 23, 2026
798161c
feat: keep disconnected views open under a recovery overlay (WI-6)
tnaum-ms Nov 24, 2026
e08833e
feat: bind Document View and Dashboard host operations (WI-6)
tnaum-ms Nov 24, 2026
baef826
feat: map unavailable reasons to supported tab repairs (WI-6)
tnaum-ms Nov 24, 2026
65f7917
test: let browser scenarios release stale replies explicitly (WI-6)
tnaum-ms Nov 24, 2026
1681981
feat: preserve Document View drafts through unavailable connections (…
tnaum-ms Nov 24, 2026
fc58cdf
test: cover Document View recovery and late saves in the browser (WI-6)
tnaum-ms Nov 24, 2026
7e6b786
feat: preserve Dashboard data through connection recovery (WI-6)
tnaum-ms Nov 24, 2026
87fff80
fix: keep webview transfers on the initiating connection identity (WI-6)
tnaum-ms Nov 24, 2026
e968cb2
feat: preserve Collection View state through unavailable connections …
tnaum-ms Nov 24, 2026
714381d
feat: use Fluent Dialog for unavailable views (WI-6)
tnaum-ms Nov 24, 2026
aeb0ea1
feat: limit unavailable views to original-identity Retry (WI-6)
tnaum-ms Nov 24, 2026
5443d2f
Merge PR4 connection recovery into WI-6
tnaum-ms Nov 24, 2026
ab1b043
chore: version the PR5 operator test VSIX as 1.1.1-alpha.2
tnaum-ms Nov 24, 2026
d2f89c7
feat: let disconnected views expose their contents for copying (WI-6)
tnaum-ms Nov 24, 2026
9853022
chore: version the copy-hatch operator VSIX as 1.1.1-alpha.3
tnaum-ms Nov 24, 2026
c684fa3
chore: prepare identity-bound views for Case 2 verification (WI-6)
tnaum-ms Nov 24, 2026
081bc56
fix: satisfy type-aware lint in webview disposal and mocks (WI-6)
tnaum-ms Nov 24, 2026
501e66f
docs: record simpler saved-edit recovery policy and PR5 dispositions
tnaum-ms Nov 24, 2026
5975620
fix: guard Dashboard commands with their original binding (WI-6)
tnaum-ms Nov 24, 2026
e2fe7af
fix: distinguish interrupted inventory from an empty database (WI-6)
tnaum-ms Nov 24, 2026
9cc97ff
fix: clear interrupted index creation placeholders (WI-6)
tnaum-ms Nov 24, 2026
20df3fe
fix: stop interrupted Query Insights stages without replay (WI-6)
tnaum-ms Nov 24, 2026
c19d0c1
docs: record PR5 review fixes and Case 2 verification
tnaum-ms Nov 24, 2026
aaa8e65
fix: classify bound transfer startup failures (PR5 R9)
tnaum-ms Nov 24, 2026
ba00634
fix: report bound drops against the client that ran them (PR5 R5)
tnaum-ms Nov 24, 2026
b29cccc
fix: cancel Dashboard delete confirmations across disconnect (PR5 R1)
tnaum-ms Nov 24, 2026
8d01ee1
fix: stop bound imports when their connection fails (PR5 R7)
tnaum-ms Nov 24, 2026
b6cc175
fix: suppress duplicate Query Insights action errors (PR5 R11)
tnaum-ms Nov 24, 2026
912d83c
fix: keep answered Dashboard collection reads usable (PR5 R15)
tnaum-ms Nov 24, 2026
29ee3e9
fix: surface unavailable state for uncached Dashboard actions (PR5 R13)
tnaum-ms Nov 24, 2026
15843d1
fix: preserve unavailable errors starting Query Insights streams (PR5…
tnaum-ms Nov 24, 2026
28fa2e6
fix: classify Query Insights metadata startup (PR5 R19)
tnaum-ms Nov 24, 2026
cf7c713
fix: propagate terminal index advisor stats failures (PR5 R8)
tnaum-ms Nov 24, 2026
3ac77a1
fix: clear interrupted collection markers after a successful read (PR…
tnaum-ms Nov 24, 2026
4f97ace
fix: settle Dashboard delete progress after cancellation (PR5 R14)
tnaum-ms Nov 24, 2026
18c4e02
fix: retain the acknowledged document ID without replacing newer edit…
tnaum-ms Nov 24, 2026
238337c
fix: clear abandoned query generation progress (PR5 R17)
tnaum-ms Nov 24, 2026
ea03b33
fix: block Collection View transfers in copy-only mode (PR5 R18)
tnaum-ms Nov 24, 2026
eff9c1d
test: verify the uncached Dashboard action path (PR5 R13)
tnaum-ms Nov 24, 2026
5d1ccb0
docs: record PR5 Copilot review dispositions and verification
tnaum-ms Nov 24, 2026
35153c5
fix: satisfy PR5 lint and formatting checks
tnaum-ms Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions build/verification/browser/core.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ describe('Shared browser fixture core', (): void => {
]);
});

it('releases a held reply and drops an aborted request', async (): Promise<void> => {
const messages = vi.spyOn(window, 'postMessage').mockImplementation((): void => {});
const path = 'localQuickStart.checkPort';
const api = fakeVsCodeApi({ [path]: { ...rpc[path], holdReply: true } }, [])();
api.postMessage({ id: 'aborted', op: { type: 'query', path } });
api.postMessage({ id: 'second', op: { type: 'query', path } });
api.postMessage({ id: 'aborted', op: { type: 'abort', path } });
await Promise.resolve();

expect(messages).not.toHaveBeenCalled();
expect(window.__harnessReleaseReply(path)).toBe(true);
expect(window.__harnessReleaseReply(path)).toBe(false);
expect(messages.mock.calls.map((call): unknown => call[0])).toEqual([
{ id: 'second', result: port },
{ id: 'second', complete: true },
]);
});

it('records escaping actions and answers only from fixtures without opening or copying anything', async (): Promise<void> => {
const errors: string[] = [];
const messages = vi.spyOn(window, 'postMessage').mockImplementation((): void => {});
Expand Down
27 changes: 24 additions & 3 deletions build/verification/browser/core/fakeVsCodeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface HarnessCall {
declare global {
interface Window {
__harnessCalls: HarnessCall[];
__harnessReleaseReply: (path: FixturePaths) => boolean;
}
}

Expand All @@ -38,6 +39,18 @@ export function fakeVsCodeApi(rpc: RpcFixtures, errors: string[]): typeof window
const calls: HarnessCall[] = [];
window.__harnessCalls = calls;
const subscriptions = new Set<string>();
const seenPaths = new Set<string>();
const heldReplies = new Map<string, { readonly path: string; readonly sendReply: () => void }>();
window.__harnessReleaseReply = (path): boolean => {
for (const [id, reply] of [...heldReplies].reverse()) {
if (reply.path === path) {
heldReplies.delete(id);
reply.sendReply();
return true;
}
}
return false;
};
let acquired = false;

function send(message: VsCodeLinkResponseMessage): void {
Expand All @@ -52,6 +65,7 @@ export function fakeVsCodeApi(rpc: RpcFixtures, errors: string[]): typeof window
const { id, op } = value;
if (op.type === 'subscription.stop' || op.type === 'abort') {
subscriptions.delete(id);
heldReplies.delete(id);
return;
}
calls.push({ path: op.path, type: op.type, input: op.input });
Expand All @@ -65,11 +79,13 @@ export function fakeVsCodeApi(rpc: RpcFixtures, errors: string[]): typeof window
if (response.keepOpen) {
subscriptions.add(id);
}
queueMicrotask((): void => {
const reply = seenPaths.has(op.path) ? (response.afterFirst ?? response) : response;
seenPaths.add(op.path);
const sendReply = (): void => {
if (response.keepOpen && !subscriptions.has(id)) {
return;
}
for (const result of response.results) {
for (const result of reply.results) {
send({ id, result });
}
if (response.undefinedResult) {
Expand All @@ -78,7 +94,12 @@ export function fakeVsCodeApi(rpc: RpcFixtures, errors: string[]): typeof window
if (!response.keepOpen) {
send({ id, complete: true });
}
});
};
if (reply.holdReply) {
heldReplies.set(id, { path: op.path, sendReply });
} else {
queueMicrotask(sendReply);
}
}

return <StateType = unknown>(): WebviewApi<StateType> => {
Expand Down
13 changes: 9 additions & 4 deletions build/verification/browser/core/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export interface RpcFixture {
readonly results: readonly unknown[];
readonly keepOpen?: boolean;
readonly undefinedResult?: boolean;
readonly holdReply?: boolean;
readonly afterFirst?: { readonly results: readonly unknown[]; readonly holdReply?: boolean };
}

export type RpcFixtures = Readonly<Partial<Record<FixturePaths, RpcFixture>>>;
Expand All @@ -37,12 +39,15 @@ export type FixtureAtPath<T, P extends string> = P extends `${infer Head}.${infe
: never;

type StreamItem<T> = T extends AsyncIterable<infer Item> ? Item : T;
// tRPC's JSON-serialized output inference represents void procedures as never. The wire protocol
// deliberately supports explicit undefined results, so these fixtures retain the host's void type.
type FixtureResult<T> = [T] extends [never] ? void : StreamItem<T>;
// tRPC infers never for void outputs, but the extension host sends null for those results.
type FixtureResult<T> = [T] extends [never] ? void | null : StreamItem<T>;
export type TypedRpcFixtures = {
readonly [P in FixturePaths]?: Omit<RpcFixture, 'results'> & {
readonly [P in FixturePaths]?: Omit<RpcFixture, 'results' | 'afterFirst'> & {
readonly results: readonly FixtureResult<FixtureAtPath<FixtureOutputs, P>>[];
readonly afterFirst?: {
readonly results: readonly FixtureResult<FixtureAtPath<FixtureOutputs, P>>[];
readonly holdReply?: boolean;
};
};
};

Expand Down
2 changes: 1 addition & 1 deletion build/verification/browser/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface HarnessFixture extends ViewFixture {
function reply<T>(
type: RpcFixture['type'],
result: T,
): Omit<RpcFixture, 'results'> & { readonly results: readonly T[] } {
): Omit<RpcFixture, 'results' | 'afterFirst'> & { readonly results: readonly T[] } {
if (result === undefined) {
return { type, results: [], undefinedResult: true };
}
Expand Down
49 changes: 47 additions & 2 deletions build/verification/browser/scenario-playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,50 @@ export async function runScenario(page: IntegratedPage, origin: string, route: S
if (await page.evaluate((): boolean => document.documentElement.dataset.ready === 'failed')) {
throw new Error(`Page failed before step: ${step.name}`);
}
if (step.action === 'post') {
await page.evaluate(
(message): void => window.postMessage(message, window.location.origin),
step.message,
);
continue;
}
if (step.action === 'releaseReply') {
await wait((path) => window.__harnessReleaseReply(path), step.path, step.name);
// The reply is an asynchronous message. Give the app a render before reading the result.
await page.evaluate(() => new Promise<void>((resolve) => requestAnimationFrame(() => resolve())));
continue;
}
if (step.action === 'waitFor') {
await wait((selector) => document.querySelector(selector) !== null, step.selector, step.name);
continue;
}
const locator = page.getByRole(step.role, { name: step.name, exact: true });
if (step.action === 'click') {
if (step.action === 'press') {
await locator.press(step.key, { timeout: 60000 });
} else if (step.action === 'click') {
await locator.click({ timeout: 60000 });
} else if (step.action === 'replaceText') {
const modifier = await page.evaluate(() =>
/Mac|iPhone|iPad/.test(navigator.platform) ? 'Meta' : 'Control',
);
const renderedEditor = `.monaco-editor:has([aria-label="${step.name}"]) .view-lines`;
await locator.press(`${modifier}+A`, { timeout: 60000 });
await locator.press('Backspace', { timeout: 60000 });
await wait(
(selector) => document.querySelector(selector)?.textContent?.trim() === '',
renderedEditor,
'cleared editor',
);
await page.keyboard.insertText(step.value);
await wait(
({ selector, value }) =>
document
.querySelector(selector)
?.textContent?.replace(/\u00a0/g, ' ')
.includes(value) === true,
{ selector: renderedEditor, value: step.value },
'editor text to render',
);
} else {
await locator.fill(step.value, { timeout: 60000 });
}
Expand Down Expand Up @@ -92,6 +133,7 @@ export async function runScenario(page: IntegratedPage, origin: string, route: S
count: calls.length,
matching: calls.filter(
(call): boolean =>
expected.checkInput === false ||
JSON.stringify(call.input) === JSON.stringify(expected.input),
).length,
};
Expand All @@ -102,7 +144,10 @@ export async function runScenario(page: IntegratedPage, origin: string, route: S
name: assertion.name,
passed: actual.count === assertion.count && actual.matching === assertion.count,
actual,
expected: { count: assertion.count, input: assertion.input },
expected:
assertion.checkInput === false
? { count: assertion.count }
: { count: assertion.count, input: assertion.input },
});
} else if (assertion.kind === 'order') {
const actual = await page.evaluate(
Expand Down
6 changes: 3 additions & 3 deletions build/verification/browser/scenarios.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ describe('L2-dev manifest and routes', (): void => {

it('round-trips every scenario and theme, without duplicate routes', (): void => {
const routes = scenarioRoutes();
expect(routes).toHaveLength(171);
expect(new Set(routes.map((route): string => route.path)).size).toBe(171);
expect(routes).toHaveLength(186);
expect(new Set(routes.map((route): string => route.path)).size).toBe(186);
for (const route of routes) expect(parseScenarioRoute(route.path)).toEqual(route);
});

Expand Down Expand Up @@ -71,7 +71,7 @@ describe('L2-dev manifest and routes', (): void => {
});

it('provides path-only all/view/theme helpers and rejects unknown subsets', (): void => {
expect(runnerRoutes('/scenarios/run-all.js')).toHaveLength(171);
expect(runnerRoutes('/scenarios/run-all.js')).toHaveLength(186);
expect(runnerRoutes('/scenarios/run-all/connectionDiagnostics.js')).toHaveLength(84);
expect(runnerRoutes('/scenarios/run-all/localQuickStart.js')).toHaveLength(75);
expect(runnerRoutes('/scenarios/run-all/localQuickStart/dark.js')).toHaveLength(25);
Expand Down
Loading
Loading