@firstpick/pi-package-webui 0.9.6 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -5
- package/bin/pi-webui.mjs +480 -96
- package/index.ts +2 -1
- package/lib/git-workflow-preferences.mjs +21 -1
- package/lib/optional-feature-catalog.mjs +1 -1
- package/lib/session-tree-event-targets.mjs +70 -0
- package/lib/subagent-launch-policy.mjs +375 -0
- package/lib/subagent-launch-slots.mjs +2 -1
- package/package.json +1 -1
- package/public/app.js +1348 -131
- package/public/guided-git-command-state.mjs +175 -1
- package/public/index.html +48 -9
- package/public/service-worker.js +1 -1
- package/public/styles.css +387 -34
- package/public/transcript-renderer.mjs +62 -0
- package/tests/boot-failure-diagnostics.test.mjs +3 -3
- package/tests/browser/control-visibility.spec.mjs +141 -2
- package/tests/browser/events-tree-context-menu.spec.mjs +240 -0
- package/tests/browser/footer-model-advanced-layout.spec.mjs +512 -0
- package/tests/browser/guided-git-extension-command.spec.mjs +180 -0
- package/tests/browser/guided-git-fallback.spec.mjs +218 -0
- package/tests/browser/interaction-continuity.spec.mjs +33 -0
- package/tests/codex-fast-mode-static.test.mjs +2 -2
- package/tests/compact-sections-static.test.mjs +4 -0
- package/tests/compaction-static.test.mjs +1 -1
- package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
- package/tests/control-visibility-static.test.mjs +66 -3
- package/tests/controls-layout-static.test.mjs +3 -3
- package/tests/events-tree-context-menu-static.test.mjs +131 -0
- package/tests/fast-mode-client-static.test.mjs +5 -2
- package/tests/feature-decision-output-popup-static.test.mjs +2 -2
- package/tests/file-viewer-image-static.test.mjs +3 -3
- package/tests/fixtures/fake-pi.mjs +34 -3
- package/tests/git-footer-context-menu-static.test.mjs +103 -1
- package/tests/git-workflow-preferences.test.mjs +30 -1
- package/tests/guided-git-activation-http.test.mjs +194 -0
- package/tests/guided-git-activation-static.test.mjs +80 -0
- package/tests/guided-git-activation.test.mjs +244 -0
- package/tests/guided-git-fallback-runtime.test.mjs +419 -0
- package/tests/guided-git-fallback-ui-static.test.mjs +60 -0
- package/tests/guided-git-message-reliability-static.test.mjs +9 -7
- package/tests/guided-git-optional-feature.test.mjs +31 -0
- package/tests/http-endpoints-harness.test.mjs +3 -0
- package/tests/interaction-state-stability-static.test.mjs +1 -1
- package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
- package/tests/main-output-loading-static.test.mjs +11 -9
- package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
- package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
- package/tests/mobile-foundation-static.test.mjs +3 -3
- package/tests/mobile-phone-experience-static.test.mjs +1 -1
- package/tests/mobile-static.test.mjs +92 -9
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/persistent-ui-layout-static.test.mjs +3 -3
- package/tests/prompt-input-vertical-scroll-static.test.mjs +6 -6
- package/tests/prompt-routing-input-clear-static.test.mjs +1 -1
- package/tests/questionnaire-dialog.test.mjs +3 -3
- package/tests/remote-auth-settings-harness.test.mjs +23 -0
- package/tests/resource-defaults-helper.test.mjs +12 -0
- package/tests/session-sampling-helper.test.mjs +1 -0
- package/tests/session-sampling-ui-static.test.mjs +3 -3
- package/tests/session-tree-event-targets.test.mjs +106 -0
- package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
- package/tests/subagent-launch-policy.test.mjs +532 -0
- package/tests/subagent-observability-static.test.mjs +2 -2
- package/tests/subagents-helper.test.mjs +211 -1
- package/tests/syntax-highlighting-static.test.mjs +3 -3
- package/tests/tab-close-continuity-static.test.mjs +25 -0
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/thinking-block-grouping.test.mjs +79 -0
- package/webui-rpc-helper.mjs +220 -3
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
3
|
+
import { createServer } from "node:net";
|
|
4
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { expect, test } from "@playwright/test";
|
|
10
|
+
|
|
11
|
+
test.describe.configure({ mode: "serial" });
|
|
12
|
+
|
|
13
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
14
|
+
const serverScript = join(root, "bin", "pi-webui.mjs");
|
|
15
|
+
const fakePi = join(root, "tests", "fixtures", "fake-pi.mjs");
|
|
16
|
+
|
|
17
|
+
async function freePort() {
|
|
18
|
+
const server = createServer();
|
|
19
|
+
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
20
|
+
const { port } = server.address();
|
|
21
|
+
await new Promise((resolve) => server.close(resolve));
|
|
22
|
+
return port;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let child;
|
|
26
|
+
let baseURL;
|
|
27
|
+
let tempRoot;
|
|
28
|
+
let output = "";
|
|
29
|
+
|
|
30
|
+
async function waitForServer() {
|
|
31
|
+
for (let attempt = 0; attempt < 100; attempt += 1) {
|
|
32
|
+
if (child.exitCode !== null) break;
|
|
33
|
+
try {
|
|
34
|
+
const response = await fetch(`${baseURL}/api/health`, { signal: AbortSignal.timeout(500) });
|
|
35
|
+
if (response.ok) return;
|
|
36
|
+
} catch {}
|
|
37
|
+
await delay(100);
|
|
38
|
+
}
|
|
39
|
+
throw new Error(`Pi Web UI did not start:\n${output}`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
test.beforeAll(async () => {
|
|
43
|
+
const port = await freePort();
|
|
44
|
+
tempRoot = await mkdtemp(join(tmpdir(), "pi-webui-guided-git-extension-"));
|
|
45
|
+
assert.equal(spawnSync("git", ["init", "--quiet"], { cwd: tempRoot }).status, 0);
|
|
46
|
+
await writeFile(join(tempRoot, "fixture.txt"), "guided git extension fixture\n", "utf8");
|
|
47
|
+
const settingsFile = join(tempRoot, "settings.json");
|
|
48
|
+
await writeFile(settingsFile, `${JSON.stringify({
|
|
49
|
+
version: 8,
|
|
50
|
+
gitWorkflow: {
|
|
51
|
+
reviewProcessEnabled: false,
|
|
52
|
+
stagingPolicy: "all",
|
|
53
|
+
generation: {
|
|
54
|
+
provider: "fake",
|
|
55
|
+
modelId: "fake-model",
|
|
56
|
+
thinkingLevel: "off",
|
|
57
|
+
unavailablePolicy: "ask",
|
|
58
|
+
fallback: { provider: "", modelId: "", thinkingLevel: "off" },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
}, null, 2)}\n`, "utf8");
|
|
62
|
+
baseURL = `http://127.0.0.1:${port}`;
|
|
63
|
+
child = spawn(process.execPath, [serverScript, "--cwd", tempRoot, "--host", "127.0.0.1", "--port", String(port), "--pi", fakePi], {
|
|
64
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
65
|
+
env: {
|
|
66
|
+
...process.env,
|
|
67
|
+
PI_WEBUI_RPC_SUPERVISOR: "0",
|
|
68
|
+
PI_CODING_AGENT_DIR: join(tempRoot, "agent"),
|
|
69
|
+
PI_WEBUI_SETTINGS_FILE: settingsFile,
|
|
70
|
+
FAKE_PI_GUIDED_GIT_ACTIVATION: "1",
|
|
71
|
+
FAKE_PI_GUIDED_GIT_ACTIVATION_DELAY_MS: "150",
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
child.stdout.on("data", (chunk) => { output += String(chunk); });
|
|
75
|
+
child.stderr.on("data", (chunk) => { output += String(chunk); });
|
|
76
|
+
await waitForServer();
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test.afterAll(async () => {
|
|
80
|
+
if (child?.exitCode === null) child.kill("SIGTERM");
|
|
81
|
+
if (child?.exitCode === null) await new Promise((resolve) => child.once("exit", resolve));
|
|
82
|
+
await rm(tempRoot, { recursive: true, force: true });
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test("typing /git-guided-workflow opens the originating tab workflow exactly once", async ({ page }) => {
|
|
86
|
+
let preferenceLoads = 0;
|
|
87
|
+
page.on("request", (request) => {
|
|
88
|
+
if (new URL(request.url()).pathname === "/api/git-workflow/preferences") preferenceLoads += 1;
|
|
89
|
+
});
|
|
90
|
+
await page.goto(baseURL);
|
|
91
|
+
const button = page.locator("#gitWorkflowButton");
|
|
92
|
+
await expect(button).toBeVisible();
|
|
93
|
+
await expect(button).toBeEnabled();
|
|
94
|
+
|
|
95
|
+
const prompt = page.locator("#promptInput");
|
|
96
|
+
await prompt.fill("/git-guided-workflow");
|
|
97
|
+
await prompt.press("Enter");
|
|
98
|
+
|
|
99
|
+
await expect(page.locator("#gitWorkflowPanel")).toBeVisible();
|
|
100
|
+
await expect(page.locator("#gitWorkflowKicker")).toHaveText("Git workflow");
|
|
101
|
+
await expect(prompt).toHaveValue("");
|
|
102
|
+
await delay(200);
|
|
103
|
+
assert.equal(preferenceLoads, 1, "one typed extension command must start one browser workflow");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
test("one browser command starts Guided Git only in its originating client", async ({ browser }) => {
|
|
107
|
+
const context = await browser.newContext();
|
|
108
|
+
const origin = await context.newPage();
|
|
109
|
+
const observer = await context.newPage();
|
|
110
|
+
let originPreferenceLoads = 0;
|
|
111
|
+
let observerPreferenceLoads = 0;
|
|
112
|
+
origin.on("request", (request) => {
|
|
113
|
+
if (new URL(request.url()).pathname === "/api/git-workflow/preferences") originPreferenceLoads += 1;
|
|
114
|
+
});
|
|
115
|
+
observer.on("request", (request) => {
|
|
116
|
+
if (new URL(request.url()).pathname === "/api/git-workflow/preferences") observerPreferenceLoads += 1;
|
|
117
|
+
});
|
|
118
|
+
await origin.goto(baseURL);
|
|
119
|
+
await observer.goto(baseURL);
|
|
120
|
+
await expect(origin.locator("#gitWorkflowButton")).toBeEnabled();
|
|
121
|
+
await expect(observer.locator("#gitWorkflowButton")).toBeEnabled();
|
|
122
|
+
|
|
123
|
+
await origin.locator("#promptInput").fill("/git-guided-workflow");
|
|
124
|
+
await origin.locator("#promptInput").press("Enter");
|
|
125
|
+
|
|
126
|
+
await expect(origin.locator("#gitWorkflowPanel")).toBeVisible();
|
|
127
|
+
await delay(250);
|
|
128
|
+
await expect(observer.locator("#gitWorkflowPanel")).toBeHidden();
|
|
129
|
+
assert.equal(originPreferenceLoads, 1, "the initiating browser owns the activation");
|
|
130
|
+
assert.equal(observerPreferenceLoads, 0, "another browser attached to the same Pi tab must ignore the broadcast");
|
|
131
|
+
await context.close();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
test("two initiating clients cannot cross-claim one pending Guided Git activation", async ({ browser }) => {
|
|
135
|
+
const context = await browser.newContext();
|
|
136
|
+
const first = await context.newPage();
|
|
137
|
+
const second = await context.newPage();
|
|
138
|
+
let preferenceLoads = 0;
|
|
139
|
+
for (const page of [first, second]) {
|
|
140
|
+
page.on("request", (request) => {
|
|
141
|
+
if (new URL(request.url()).pathname === "/api/git-workflow/preferences") preferenceLoads += 1;
|
|
142
|
+
});
|
|
143
|
+
await page.goto(baseURL);
|
|
144
|
+
await expect(page.locator("#gitWorkflowButton")).toBeEnabled();
|
|
145
|
+
await page.locator("#promptInput").fill("/git-guided-workflow");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
await Promise.all([
|
|
149
|
+
first.locator("#promptInput").press("Enter"),
|
|
150
|
+
second.locator("#promptInput").press("Enter"),
|
|
151
|
+
]);
|
|
152
|
+
await expect.poll(async () => Number(await first.locator("#gitWorkflowPanel").isVisible()) + Number(await second.locator("#gitWorkflowPanel").isVisible())).toBe(1);
|
|
153
|
+
await delay(250);
|
|
154
|
+
assert.equal(preferenceLoads, 1, "server arbitration and envelope correlation must produce one aggregate start");
|
|
155
|
+
await context.close();
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
test("Guided Git button dispatch preserves the existing composer draft and attachment", async ({ page }) => {
|
|
159
|
+
const promptMessages = [];
|
|
160
|
+
page.on("request", (request) => {
|
|
161
|
+
if (new URL(request.url()).pathname !== "/api/prompt" || request.method() !== "POST") return;
|
|
162
|
+
const data = request.postDataJSON();
|
|
163
|
+
promptMessages.push(data?.message);
|
|
164
|
+
});
|
|
165
|
+
await page.goto(baseURL);
|
|
166
|
+
const prompt = page.locator("#promptInput");
|
|
167
|
+
await prompt.fill("keep this draft");
|
|
168
|
+
await page.locator("#attachmentInput").setInputFiles({
|
|
169
|
+
name: "keep.txt",
|
|
170
|
+
mimeType: "text/plain",
|
|
171
|
+
buffer: Buffer.from("keep this attachment\n"),
|
|
172
|
+
});
|
|
173
|
+
await expect(page.locator(".attachment-pill-name")).toHaveText("keep.txt");
|
|
174
|
+
|
|
175
|
+
await page.locator("#gitWorkflowButton").click();
|
|
176
|
+
await expect(page.locator("#gitWorkflowPanel")).toBeVisible();
|
|
177
|
+
await expect(prompt).toHaveValue("keep this draft");
|
|
178
|
+
await expect(page.locator(".attachment-pill-name")).toHaveText("keep.txt");
|
|
179
|
+
assert.equal(promptMessages.filter((message) => /^\/git-guided-workflow(?::\d+)?$/u.test(String(message || ""))).length, 1);
|
|
180
|
+
});
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
3
|
+
import { createServer } from "node:net";
|
|
4
|
+
import { chmod, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { expect, test } from "@playwright/test";
|
|
10
|
+
|
|
11
|
+
test.describe.configure({ mode: "serial" });
|
|
12
|
+
|
|
13
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
14
|
+
const serverScript = join(root, "bin", "pi-webui.mjs");
|
|
15
|
+
|
|
16
|
+
async function freePort() {
|
|
17
|
+
const server = createServer();
|
|
18
|
+
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
19
|
+
const { port } = server.address();
|
|
20
|
+
await new Promise((resolve) => server.close(resolve));
|
|
21
|
+
return port;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let child;
|
|
25
|
+
let baseURL;
|
|
26
|
+
let tempRoot;
|
|
27
|
+
let output = "";
|
|
28
|
+
|
|
29
|
+
async function waitForServer() {
|
|
30
|
+
for (let attempt = 0; attempt < 100; attempt += 1) {
|
|
31
|
+
if (child.exitCode !== null) break;
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(`${baseURL}/api/health`, { signal: AbortSignal.timeout(500) });
|
|
34
|
+
if (response.ok) return;
|
|
35
|
+
} catch {
|
|
36
|
+
// Wait for the isolated real server and fake RPC fixture.
|
|
37
|
+
}
|
|
38
|
+
await delay(100);
|
|
39
|
+
}
|
|
40
|
+
throw new Error(`Pi Web UI did not start:\n${output}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
test.beforeAll(async () => {
|
|
44
|
+
const port = await freePort();
|
|
45
|
+
tempRoot = await mkdtemp(join(tmpdir(), "pi-webui-guided-git-browser-"));
|
|
46
|
+
const fakePi = join(tempRoot, "fake-pi.mjs");
|
|
47
|
+
const logFile = join(tempRoot, "rpc.jsonl");
|
|
48
|
+
await writeFile(fakePi, `#!/usr/bin/env node
|
|
49
|
+
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
50
|
+
import { join } from "node:path";
|
|
51
|
+
import { createInterface } from "node:readline";
|
|
52
|
+
const logFile = process.env.GUIDED_GIT_BROWSER_LOG;
|
|
53
|
+
const fallbackSuccessFlag = process.env.GUIDED_GIT_BROWSER_FALLBACK_SUCCESS;
|
|
54
|
+
const artifactRoot = process.env.GUIDED_GIT_BROWSER_ARTIFACT_ROOT;
|
|
55
|
+
let model = { provider: "fake", id: "original" };
|
|
56
|
+
let thinkingLevel = "high";
|
|
57
|
+
function send(value) { process.stdout.write(JSON.stringify(value) + "\\n"); }
|
|
58
|
+
function log(value) { appendFileSync(logFile, JSON.stringify(value) + "\\n"); }
|
|
59
|
+
function fallbackSuccessEnabled() { return existsSync(fallbackSuccessFlag); }
|
|
60
|
+
function event(value) { send(value); }
|
|
61
|
+
function assistantFailure() { return { role: "assistant", stopReason: "error", content: [{ type: "text", text: "fixture failure" }] }; }
|
|
62
|
+
function writeCommitArtifacts() {
|
|
63
|
+
const directory = join(artifactRoot, "dev", "COMMIT");
|
|
64
|
+
mkdirSync(directory, { recursive: true });
|
|
65
|
+
writeFileSync(join(directory, "staged-commit-short.txt"), "fallback short\\n");
|
|
66
|
+
writeFileSync(join(directory, "staged-commit-long.txt"), "fallback long\\n");
|
|
67
|
+
}
|
|
68
|
+
function settle({ failed = false, wait = 20 } = {}) {
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
event({ type: "agent_start" });
|
|
71
|
+
if (failed) {
|
|
72
|
+
const message = assistantFailure();
|
|
73
|
+
event({ type: "message_end", message });
|
|
74
|
+
event({ type: "agent_end", willRetry: false, messages: [message] });
|
|
75
|
+
} else {
|
|
76
|
+
event({ type: "message_end", message: { role: "assistant", content: [{ type: "text", text: "fixture success" }] } });
|
|
77
|
+
event({ type: "agent_end" });
|
|
78
|
+
}
|
|
79
|
+
event({ type: "agent_settled" });
|
|
80
|
+
}, wait);
|
|
81
|
+
}
|
|
82
|
+
const models = [
|
|
83
|
+
{ provider: "fake", id: "original", name: "Original", reasoning: true },
|
|
84
|
+
{ provider: "fake", id: "primary", name: "Primary", reasoning: true },
|
|
85
|
+
{ provider: "fake", id: "fallback", name: "Fallback", reasoning: false },
|
|
86
|
+
];
|
|
87
|
+
createInterface({ input: process.stdin }).on("line", (line) => {
|
|
88
|
+
const command = JSON.parse(line);
|
|
89
|
+
if (!command?.id) return;
|
|
90
|
+
log({ type: command.type, modelId: command.modelId, activeModel: model.id, message: command.message });
|
|
91
|
+
const response = { type: "response", id: command.id, command: command.type, success: true };
|
|
92
|
+
if (command.type === "get_state") send({ ...response, data: { model, thinkingLevel, isStreaming: false, isCompacting: false, pendingMessageCount: 0, sessionId: "browser", sessionName: "browser" } });
|
|
93
|
+
else if (command.type === "get_available_models") send({ ...response, data: { models } });
|
|
94
|
+
else if (command.type === "get_commands") send({ ...response, data: { commands: [
|
|
95
|
+
{ name: "git-staged-msg", source: "extension", description: "Generate commit messages" },
|
|
96
|
+
{ name: "git-branch-name", source: "extension", description: "Generate branch names" },
|
|
97
|
+
{ name: "pr", source: "extension", description: "Generate PR text" },
|
|
98
|
+
] } });
|
|
99
|
+
else if (command.type === "get_messages") send({ ...response, data: { messages: [] } });
|
|
100
|
+
else if (command.type === "set_model" && command.modelId === "primary" && !fallbackSuccessEnabled()) send({ ...response, success: false, error: "SECRET primary failure at /private/provider.mjs:12" });
|
|
101
|
+
else if (command.type === "set_model") { model = { provider: command.provider, id: command.modelId }; send({ ...response, data: model }); }
|
|
102
|
+
else if (command.type === "set_thinking_level") { thinkingLevel = command.level; send({ ...response, data: { level: thinkingLevel } }); }
|
|
103
|
+
else if (command.type === "prompt" && model.id === "primary" && fallbackSuccessEnabled()) { send({ ...response, data: {} }); settle({ failed: true }); }
|
|
104
|
+
else if (command.type === "prompt" && model.id === "fallback" && !fallbackSuccessEnabled()) send({ ...response, success: false, error: "SECRET fallback failure at /private/provider.mjs:44" });
|
|
105
|
+
else if (command.type === "prompt" && model.id === "fallback") { send({ ...response, data: {} }); setTimeout(writeCommitArtifacts, 450); settle({ wait: 600 }); }
|
|
106
|
+
else send({ ...response, data: {} });
|
|
107
|
+
});
|
|
108
|
+
`, "utf8");
|
|
109
|
+
await chmod(fakePi, 0o755);
|
|
110
|
+
assert.equal(spawnSync("git", ["init", "--quiet"], { cwd: tempRoot }).status, 0);
|
|
111
|
+
await writeFile(join(tempRoot, "guided-git-browser.txt"), "browser fixture\n", "utf8");
|
|
112
|
+
const settingsFile = join(tempRoot, "settings.json");
|
|
113
|
+
await writeFile(settingsFile, `${JSON.stringify({
|
|
114
|
+
version: 8,
|
|
115
|
+
gitWorkflow: {
|
|
116
|
+
reviewProcessEnabled: false,
|
|
117
|
+
stagingPolicy: "all",
|
|
118
|
+
generation: {
|
|
119
|
+
provider: "fake",
|
|
120
|
+
modelId: "primary",
|
|
121
|
+
thinkingLevel: "low",
|
|
122
|
+
unavailablePolicy: "ask",
|
|
123
|
+
fallback: { provider: "fake", modelId: "fallback", thinkingLevel: "off" },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
}, null, 2)}\n`, "utf8");
|
|
127
|
+
baseURL = `http://127.0.0.1:${port}`;
|
|
128
|
+
child = spawn(process.execPath, [serverScript, "--cwd", tempRoot, "--host", "127.0.0.1", "--port", String(port), "--pi", fakePi], {
|
|
129
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
130
|
+
env: {
|
|
131
|
+
...process.env,
|
|
132
|
+
PI_WEBUI_RPC_SUPERVISOR: "0",
|
|
133
|
+
PI_CODING_AGENT_DIR: join(tempRoot, "agent"),
|
|
134
|
+
PI_WEBUI_SETTINGS_FILE: settingsFile,
|
|
135
|
+
GUIDED_GIT_BROWSER_LOG: logFile,
|
|
136
|
+
GUIDED_GIT_BROWSER_FALLBACK_SUCCESS: join(tempRoot, "fallback-success"),
|
|
137
|
+
GUIDED_GIT_BROWSER_ARTIFACT_ROOT: tempRoot,
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
child.stdout.on("data", (chunk) => { output += String(chunk); });
|
|
141
|
+
child.stderr.on("data", (chunk) => { output += String(chunk); });
|
|
142
|
+
await waitForServer();
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
test.afterAll(async () => {
|
|
146
|
+
if (child?.exitCode === null) child.kill("SIGTERM");
|
|
147
|
+
if (child && child.exitCode === null) await new Promise((resolve) => child.once("exit", resolve));
|
|
148
|
+
await rm(tempRoot, { recursive: true, force: true });
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
test("pre-response fallback lifecycle survives correlation and remains browser-observation-only", async ({ page }) => {
|
|
152
|
+
await page.route("**/api/commands?*", async (route) => {
|
|
153
|
+
await route.fulfill({
|
|
154
|
+
status: 200,
|
|
155
|
+
contentType: "application/json",
|
|
156
|
+
body: JSON.stringify({ ok: true, data: { commands: [
|
|
157
|
+
{ name: "git-staged-msg", source: "extension", description: "Generate commit messages" },
|
|
158
|
+
{ name: "git-branch-name", source: "extension", description: "Generate branch names" },
|
|
159
|
+
{ name: "pr", source: "extension", description: "Generate PR text" },
|
|
160
|
+
] } }),
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
await page.goto(baseURL);
|
|
164
|
+
const guidedGit = page.locator("#gitWorkflowButton");
|
|
165
|
+
await expect(guidedGit).toBeVisible();
|
|
166
|
+
await expect(guidedGit).toBeEnabled();
|
|
167
|
+
await guidedGit.click();
|
|
168
|
+
|
|
169
|
+
const panel = page.locator("#gitWorkflowPanel");
|
|
170
|
+
await expect(panel).toBeVisible();
|
|
171
|
+
await panel.getByRole("button", { name: "Run git add ." }).click();
|
|
172
|
+
await expect(panel.getByRole("button", { name: "Generate commit message" })).toBeVisible();
|
|
173
|
+
await panel.getByRole("button", { name: "Generate commit message" }).click();
|
|
174
|
+
|
|
175
|
+
const outputText = page.locator("#gitWorkflowOutput");
|
|
176
|
+
await expect(outputText).toContainText("Generation continued with the fallback fake/fallback");
|
|
177
|
+
await expect(outputText).toContainText("The fallback Git-writing model fake/fallback at off effort also failed");
|
|
178
|
+
await expect(outputText).toContainText("Guided Git generation failed after the configured model attempts.");
|
|
179
|
+
await expect(outputText).not.toContainText("SECRET");
|
|
180
|
+
await expect(outputText).not.toContainText("/private/provider.mjs");
|
|
181
|
+
|
|
182
|
+
const log = (await import("node:fs/promises")).readFile(join(tempRoot, "rpc.jsonl"), "utf8");
|
|
183
|
+
const entries = (await log).trim().split("\n").filter(Boolean).map((line) => JSON.parse(line));
|
|
184
|
+
assert.equal(entries.filter((entry) => entry.type === "prompt" && entry.activeModel === "fallback").length, 1, "the browser must not dispatch another fallback prompt");
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
test("a slow successful fallback opens the generated message preview automatically", async ({ page }) => {
|
|
188
|
+
await writeFile(join(tempRoot, "fallback-success"), "enabled\n", "utf8");
|
|
189
|
+
await page.route("**/app.js?v=*", async (route) => {
|
|
190
|
+
const response = await route.fetch();
|
|
191
|
+
const source = await response.text();
|
|
192
|
+
assert.match(source, /GIT_WORKFLOW_MESSAGE_POLL_TIMEOUT_MS = 30_000/);
|
|
193
|
+
await route.fulfill({ response, body: source.replace("GIT_WORKFLOW_MESSAGE_POLL_TIMEOUT_MS = 30_000", "GIT_WORKFLOW_MESSAGE_POLL_TIMEOUT_MS = 100") });
|
|
194
|
+
});
|
|
195
|
+
await page.route("**/api/commands?*", async (route) => {
|
|
196
|
+
await route.fulfill({
|
|
197
|
+
status: 200,
|
|
198
|
+
contentType: "application/json",
|
|
199
|
+
body: JSON.stringify({ ok: true, data: { commands: [
|
|
200
|
+
{ name: "git-staged-msg", source: "extension", description: "Generate commit messages" },
|
|
201
|
+
{ name: "git-branch-name", source: "extension", description: "Generate branch names" },
|
|
202
|
+
{ name: "pr", source: "extension", description: "Generate PR text" },
|
|
203
|
+
] } }),
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
await page.goto(baseURL);
|
|
207
|
+
await page.locator("#gitWorkflowButton").click();
|
|
208
|
+
|
|
209
|
+
const panel = page.locator("#gitWorkflowPanel");
|
|
210
|
+
await panel.getByRole("button", { name: "Run git add ." }).click();
|
|
211
|
+
await panel.getByRole("button", { name: "Generate commit message" }).click();
|
|
212
|
+
|
|
213
|
+
const outputText = page.locator("#gitWorkflowOutput");
|
|
214
|
+
await expect(outputText).toContainText("fallback short");
|
|
215
|
+
await expect(outputText).toContainText("fallback long");
|
|
216
|
+
await expect(panel.getByRole("button", { name: "Commit short (default)", exact: true })).toBeVisible();
|
|
217
|
+
await expect(outputText).not.toContainText("Preview current message files");
|
|
218
|
+
});
|
|
@@ -234,10 +234,14 @@ test("main output shows non-blocking inline feedback while transcript data loads
|
|
|
234
234
|
await expect(chat).toHaveAttribute("aria-busy", "true");
|
|
235
235
|
await expect(page.locator("#promptInput")).toBeEnabled();
|
|
236
236
|
assert.equal(await page.evaluate(() => document.querySelectorAll("dialog:modal").length), 0, "loading feedback should not open a popup");
|
|
237
|
+
const loadingChatBounds = await chat.boundingBox();
|
|
238
|
+
assert.ok(loadingChatBounds, "the transcript should have measurable bounds while loading");
|
|
237
239
|
|
|
238
240
|
releaseMessages();
|
|
239
241
|
await expect(loading).toBeHidden();
|
|
240
242
|
await expect(chat).toHaveAttribute("aria-busy", "false");
|
|
243
|
+
const settledChatBounds = await chat.boundingBox();
|
|
244
|
+
assert.deepEqual(settledChatBounds, loadingChatBounds, "showing or hiding loading feedback must not move or resize the transcript");
|
|
241
245
|
} finally {
|
|
242
246
|
releaseMessages?.();
|
|
243
247
|
await page.unroute(messagesPattern);
|
|
@@ -301,6 +305,35 @@ test("only hidden pages disconnect live events and resume from one authoritative
|
|
|
301
305
|
assert.ok(Date.now() - resumedAt < 4_000, "the bounded snapshot resume should complete without replaying the hidden stream duration");
|
|
302
306
|
});
|
|
303
307
|
|
|
308
|
+
test("the main input shows six lines before vertical scrolling", async ({ page }) => {
|
|
309
|
+
await page.setViewportSize({ width: 1280, height: 800 });
|
|
310
|
+
await page.goto(baseURL);
|
|
311
|
+
|
|
312
|
+
const promptInput = page.locator("#promptInput");
|
|
313
|
+
await promptInput.fill(Array.from({ length: 6 }, (_, index) => `line ${index + 1}`).join("\n"));
|
|
314
|
+
const sixLines = await promptInput.evaluate((node) => {
|
|
315
|
+
const style = getComputedStyle(node);
|
|
316
|
+
return {
|
|
317
|
+
clientHeight: node.clientHeight,
|
|
318
|
+
scrollHeight: node.scrollHeight,
|
|
319
|
+
renderedHeight: node.getBoundingClientRect().height,
|
|
320
|
+
lineHeight: style.lineHeight,
|
|
321
|
+
maxHeight: style.maxHeight,
|
|
322
|
+
paddingBlock: `${style.paddingTop} + ${style.paddingBottom}`,
|
|
323
|
+
};
|
|
324
|
+
});
|
|
325
|
+
assert.ok(sixLines.scrollHeight <= sixLines.clientHeight + 1, `six lines overflowed: ${JSON.stringify(sixLines)}`);
|
|
326
|
+
|
|
327
|
+
await promptInput.fill(Array.from({ length: 7 }, (_, index) => `line ${index + 1}`).join("\n"));
|
|
328
|
+
const sevenLines = await promptInput.evaluate((node) => ({
|
|
329
|
+
clientHeight: node.clientHeight,
|
|
330
|
+
scrollHeight: node.scrollHeight,
|
|
331
|
+
renderedHeight: node.getBoundingClientRect().height,
|
|
332
|
+
}));
|
|
333
|
+
assert.ok(sevenLines.scrollHeight > sevenLines.clientHeight + 1, "the seventh line should overflow the six-line input height");
|
|
334
|
+
assert.ok(Math.abs(sevenLines.renderedHeight - sixLines.renderedHeight) <= 1, "the prompt should stop growing after six lines");
|
|
335
|
+
});
|
|
336
|
+
|
|
304
337
|
test("autosizing the main input does not move settled agent output", async ({ page }) => {
|
|
305
338
|
await page.setViewportSize({ width: 1280, height: 800 });
|
|
306
339
|
await page.goto(baseURL);
|
|
@@ -55,7 +55,7 @@ assert.match(app, /statusKey === CODEX_FAST_MODE_STATUS_KEY[\s\S]*?applyCodexFas
|
|
|
55
55
|
assert.match(technical, /## Normal and compact output[\s\S]*?select \*\*Compact\*\*[\s\S]*?`compact-v1`/, "technical reference should document Compact mode with the stable identifier");
|
|
56
56
|
assert.match(development, /### Codex subscription Fast mode[\s\S]*?service_tier: "priority"[\s\S]*?1\.5× faster[\s\S]*?2× Standard credits[\s\S]*?2\.5×/, "development guide should document Fast-mode integration and cost semantics");
|
|
57
57
|
// Intent preserved: browser-asset changes must advance the coherent cache tuple.
|
|
58
|
-
assert.match(serviceWorker, /pi-webui-pwa-
|
|
59
|
-
assert.match(html, /data-app-src="\/app\.js\?v=
|
|
58
|
+
assert.match(serviceWorker, /pi-webui-pwa-v139/, "PWA cache identity should be bumped for changed browser assets");
|
|
59
|
+
assert.match(html, /data-app-src="\/app\.js\?v=172"/, "browser module URL should be cache-busted for Fast-mode wiring");
|
|
60
60
|
|
|
61
61
|
console.log("codex-fast-mode-static.test.mjs passed");
|
|
@@ -70,6 +70,10 @@ const gitTree = ruleBlock(".git-side-panel-tree", compactStart);
|
|
|
70
70
|
assert.equal(propertyValue(gitTree, "gap"), "0", "Git tree rows should not add inter-row gaps");
|
|
71
71
|
assert.equal(propertyValue(gitTree, "padding"), "0.14rem 0.18rem", "Git tree container padding should remain compact");
|
|
72
72
|
const denseGitRowsStart = css.indexOf("/* Keep the Files tree visual language", compactStart);
|
|
73
|
+
const denseGitFileRowStart = css.indexOf("\n.git-side-panel-file {\n grid-template-columns", denseGitRowsStart);
|
|
74
|
+
assert.notEqual(denseGitFileRowStart, -1, "missing compact Git file-row grid rule");
|
|
75
|
+
const denseGitFileRow = ruleBlock(".git-side-panel-file", denseGitFileRowStart);
|
|
76
|
+
assert.equal(propertyValue(denseGitFileRow, "grid-template-columns"), "1rem minmax(4rem, 1fr) auto auto", "Git file rows should keep status, filename, stats, and overflow actions on one line");
|
|
73
77
|
const genericDetailsStart = css.indexOf("\ndetails {\n margin: 0.5rem 0;");
|
|
74
78
|
assert.notEqual(genericDetailsStart, -1, "missing generic details card rule");
|
|
75
79
|
const genericDetails = ruleBlock("details", genericDetailsStart);
|
|
@@ -25,7 +25,7 @@ assert.match(server, /operation\.type === "delete"[\s\S]*queue\.splice\(slots\[o
|
|
|
25
25
|
assert.match(server, /url\.pathname === "\/api\/queue\/mutate" && req\.method === "POST"[\s\S]*request\.source === "webui-compaction"[\s\S]*mutateCompactionFollowUpQueue[\s\S]*status = data\?\.mutated === true \? 200 : conflict \? 409 : 400/, "queue mutation HTTP handling should keep compaction mutations source-specific and map conflicts to 409");
|
|
26
26
|
|
|
27
27
|
assert.match(app, /function isRunActive\(\) \{\n\s+return !!currentState\?\.isStreaming \|\| !!currentState\?\.isCompacting/, "frontend should treat compaction as an active run for composer controls");
|
|
28
|
-
assert.match(app, /const targetWasCompacting = !!
|
|
28
|
+
assert.match(app, /const targetState = targetTabId === activeTabId \? currentState : tabStateCache\.get\(targetTabId\);[\s\S]*const targetWasCompacting = !!targetState\?\.isCompacting;[\s\S]*const targetWasBusy = targetWasStreaming \|\| targetWasCompacting[\s\S]*if \(targetWasBusy\) body\.streamingBehavior = streamingBehavior \|\| busyBehavior/, "prompt send should use the captured target tab's busy behavior while streaming or compacting");
|
|
29
29
|
assert.match(app, /case "webui_compaction_queue_update":[\s\S]*renderQueue\(event\)[\s\S]*queued compaction prompt sent; Pi is resuming/, "frontend should surface compaction queue and resume events");
|
|
30
30
|
|
|
31
31
|
console.log("compaction-static.test.mjs passed");
|
|
@@ -57,8 +57,8 @@ assert.match(app, /function initializeComposerActionOrdering\(\)[\s\S]*MutationO
|
|
|
57
57
|
assert.match(app, /event\.key === COMPOSER_ACTION_ORDER_STORAGE_KEY\) restoreComposerActionOrder\(\)[\s\S]*event\.key === COMPOSER_ACTION_LAYOUT_STORAGE_KEY\) restoreComposerActionSlotLayout\(\)/, "other tabs should apply persisted composer order and sparse-layout changes");
|
|
58
58
|
assert.match(app, /initializeComposerActionOrdering\(\);[\s\S]*restoreSidePanelSectionOrder\(\);/, "composer ordering should initialize during guarded app startup");
|
|
59
59
|
|
|
60
|
-
assert.match(html, /styles\.css\?v=
|
|
61
|
-
assert.match(html, /app\.js\?v=
|
|
62
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
60
|
+
assert.match(html, /styles\.css\?v=142/, "changed composer styles should advance the stylesheet revision");
|
|
61
|
+
assert.match(html, /app\.js\?v=172/, "changed composer behavior should advance the app revision");
|
|
62
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v139"/, "changed browser assets should advance the PWA cache identity");
|
|
63
63
|
|
|
64
64
|
console.log("composer-action-grid-reorder-static.test.mjs passed");
|
|
@@ -246,6 +246,69 @@ assert.match(
|
|
|
246
246
|
"checked menu items should expose a visible check mark as well as aria-checked",
|
|
247
247
|
);
|
|
248
248
|
|
|
249
|
+
// --- Catalog-driven setup dialog -----------------------------------------------
|
|
250
|
+
|
|
251
|
+
assert.equal(catalog.length, 24, "the approved visibility catalog should contain 24 entries");
|
|
252
|
+
assert.equal(groupLabels.length, 5, "the setup should retain the five approved groups");
|
|
253
|
+
assert.match(
|
|
254
|
+
html,
|
|
255
|
+
/<dialog id="controlVisibilitySetupDialog"[^>]*aria-labelledby="controlVisibilitySetupDialogTitle"[^>]*aria-describedby="controlVisibilitySetupDescription"[\s\S]*?<div id="controlVisibilitySetupBody"[^>]*><\/div>[\s\S]*?<button id="controlVisibilitySetupCloseButton"[^>]*type="button">Close<\/button>/,
|
|
256
|
+
"the setup should use a labelled native dialog with a generated body and explicit Close button",
|
|
257
|
+
);
|
|
258
|
+
assert.equal(
|
|
259
|
+
app.match(/controlVisibilityMenuAction\("open-setup", "Open setup"\)/g)?.length,
|
|
260
|
+
2,
|
|
261
|
+
"both the direct and grouped visibility menus should offer Open setup",
|
|
262
|
+
);
|
|
263
|
+
assert.match(
|
|
264
|
+
app,
|
|
265
|
+
/function renderControlVisibilitySetupDialog\(\)[\s\S]*CONTROL_VISIBILITY_GROUP_LABELS\.map[\s\S]*CONTROL_VISIBILITY_CATALOG\.filter[\s\S]*checkbox\.dataset\.visibilitySetupId = entry\.id[\s\S]*body\.replaceChildren\(\.\.\.groups\)/,
|
|
266
|
+
"the five setup groups and their checkboxes should be generated from the canonical catalog",
|
|
267
|
+
);
|
|
268
|
+
assert.match(
|
|
269
|
+
app,
|
|
270
|
+
/controlVisibilitySetupBody\?\.addEventListener\("change"[\s\S]*CONTROL_VISIBILITY_REGISTRY\.get\(checkbox\.dataset\.visibilitySetupId\)[\s\S]*setControlVisibilityHidden\(entry\.id, !checkbox\.checked\)/,
|
|
271
|
+
"native setup checkbox changes should persist immediately through the existing setter",
|
|
272
|
+
);
|
|
273
|
+
assert.match(
|
|
274
|
+
app,
|
|
275
|
+
/function applyControlVisibility\(hiddenIdsOverride\)[\s\S]*refreshControlVisibilitySetupDialog\(\)/,
|
|
276
|
+
"normal visibility application should synchronize an open setup dialog",
|
|
277
|
+
);
|
|
278
|
+
assert.match(
|
|
279
|
+
app,
|
|
280
|
+
/controlVisibilitySetupShowAllButton\?\.addEventListener\("click"[\s\S]*showAllControls\(\)[\s\S]*refreshControlVisibilitySetupDialog\(\)[\s\S]*controlVisibilitySetupResetButton\?\.addEventListener\("click"[\s\S]*resetControlVisibilityDefaults\(\)[\s\S]*refreshControlVisibilitySetupDialog\(\)/,
|
|
281
|
+
"setup quick actions should retain the existing [] and null setters and refresh checkbox state",
|
|
282
|
+
);
|
|
283
|
+
assert.match(
|
|
284
|
+
app,
|
|
285
|
+
/if \(action === "open-setup"\) \{[\s\S]*closeVisibilityContextMenu\(\{ returnFocus: false \}\)[\s\S]*openControlVisibilitySetupDialog\(trigger\)/,
|
|
286
|
+
"Open setup should transfer the context-menu trigger to the dialog without intermediate focus restoration",
|
|
287
|
+
);
|
|
288
|
+
{
|
|
289
|
+
const restoreSetupFocus = app.match(/function restoreControlVisibilitySetupFocus\(\) \{[\s\S]*?^\}/m)?.[0] || "";
|
|
290
|
+
assert.match(
|
|
291
|
+
restoreSetupFocus,
|
|
292
|
+
/trigger\.isConnected[\s\S]*!trigger\.closest\?\.\("\[hidden\], \.webui-user-hidden"\)[\s\S]*if \(triggerSurvives\) trigger\.focus[\s\S]*else elements\.promptInput\?\.focus/,
|
|
293
|
+
"Close and Escape should restore a surviving opener or use the prompt fallback",
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
assert.match(
|
|
297
|
+
app,
|
|
298
|
+
/controlVisibilitySetupDialog\?\.addEventListener\("close", restoreControlVisibilitySetupFocus\)/,
|
|
299
|
+
"native dialog dismissal should share the setup focus-restoration path",
|
|
300
|
+
);
|
|
301
|
+
assert.match(
|
|
302
|
+
styles,
|
|
303
|
+
/\.control-visibility-setup-body \{[\s\S]*overflow: auto;[\s\S]*overscroll-behavior: contain;[\s\S]*@media \(max-width: 34rem\)[\s\S]*\.control-visibility-setup-grid \{ grid-template-columns: minmax\(0, 1fr\); \}[\s\S]*min-height: 44px;/,
|
|
304
|
+
"the generated catalog should scroll independently and retain usable narrow-screen controls",
|
|
305
|
+
);
|
|
306
|
+
assert.doesNotMatch(
|
|
307
|
+
app.match(/function renderControlVisibilitySetupDialog\(\)[\s\S]*?function refreshControlVisibilitySetupDialog/)?.[0] || "",
|
|
308
|
+
/send/i,
|
|
309
|
+
"the setup renderer should not introduce a Send-specific entry outside the catalog",
|
|
310
|
+
);
|
|
311
|
+
|
|
249
312
|
// --- Keyboard-only recovery from Send ------------------------------------------
|
|
250
313
|
|
|
251
314
|
assert.match(
|
|
@@ -285,10 +348,10 @@ assert.match(
|
|
|
285
348
|
|
|
286
349
|
assert.match(
|
|
287
350
|
serviceWorker,
|
|
288
|
-
/const CACHE_NAME = "pi-webui-pwa-
|
|
351
|
+
/const CACHE_NAME = "pi-webui-pwa-v139";/,
|
|
289
352
|
"browser asset changes should advance the PWA cache identity",
|
|
290
353
|
);
|
|
291
|
-
assert.match(html, /styles\.css\?v=
|
|
292
|
-
assert.match(html, /data-app-src="\/app\.js\?v=
|
|
354
|
+
assert.match(html, /styles\.css\?v=142/, "visibility styles should advance the stylesheet query revision");
|
|
355
|
+
assert.match(html, /data-app-src="\/app\.js\?v=172"/, "visibility behavior should advance the app query revision");
|
|
293
356
|
|
|
294
357
|
console.log("control-visibility-static.test.mjs passed");
|
|
@@ -15,8 +15,8 @@ assert.equal((html.match(/class="control-row-label"[^>]*data-tooltip=/g) || []).
|
|
|
15
15
|
assert.match(app, /function initializeControlSettingTooltips\(\)[\s\S]*#sidePanelSectionControls \.control-row-label\[data-tooltip\][\s\S]*bindStyledTooltipEvents\(label\)[\s\S]*showFooterTooltip\(label\)/, "Controls help should use the viewport-safe floating tooltip for hover and keyboard access");
|
|
16
16
|
assert.match(html, /class="control-row remote-auth-control-row" hidden[\s\S]*id="remoteAuthToggle"/, "optional PIN protection should retain its guarded visibility");
|
|
17
17
|
assert.match(app, /remoteAuthToggle\?\.closest\("\.remote-auth-control-row"\)[\s\S]*remoteAuthRow\.hidden = false/, "loading remote status should reveal the optional PIN protection setting");
|
|
18
|
-
assert.match(html, /styles\.css\?v=
|
|
19
|
-
assert.match(html, /app\.js\?v=
|
|
20
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
18
|
+
assert.match(html, /styles\.css\?v=142/, "Controls stylesheet changes should advance the cache query");
|
|
19
|
+
assert.match(html, /app\.js\?v=172/, "Controls tooltip wiring should advance the app cache query");
|
|
20
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v139"/, "Controls browser assets should advance the PWA cache identity");
|
|
21
21
|
|
|
22
22
|
console.log("controls-layout-static.test.mjs passed");
|