@firstpick/pi-package-webui 0.10.9 → 0.11.1
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/DEVELOPMENT.md +42 -2
- package/README.md +9 -3
- package/TECHNICAL.md +23 -1
- package/bin/pi-webui.mjs +72 -25
- package/lib/codex-cli-usage.mjs +232 -0
- package/lib/codex-usage-auth.mjs +39 -3
- package/lib/codex-usage-source.mjs +36 -0
- package/package.json +14 -8
- package/public/app.js +56 -24
- package/public/codex-speed-mode.mjs +36 -0
- package/public/index.html +6 -5
- package/public/service-worker.js +2 -1
- package/public/theme-contract.mjs +1 -1
- package/tests/boot-failure-diagnostics.test.mjs +2 -2
- package/tests/codex-cli-usage.test.mjs +189 -0
- package/tests/codex-fast-mode-static.test.mjs +12 -11
- package/tests/codex-speed-mode-browser-state.test.mjs +149 -0
- package/tests/codex-speed-mode.test.mjs +36 -0
- package/tests/codex-usage-auth.test.mjs +168 -9
- package/tests/codex-usage-http.test.mjs +124 -0
- package/tests/codex-usage-source.test.mjs +145 -0
- package/tests/composer-action-grid-reorder-static.test.mjs +2 -2
- package/tests/control-visibility-static.test.mjs +2 -2
- package/tests/controls-layout-static.test.mjs +2 -2
- package/tests/events-tree-context-menu-static.test.mjs +2 -2
- package/tests/fast-mode-client-static.test.mjs +1 -1
- package/tests/feature-decision-output-popup-static.test.mjs +1 -1
- package/tests/file-viewer-image-static.test.mjs +2 -2
- package/tests/fixtures/fake-codex-app-server.mjs +61 -0
- package/tests/fixtures/fake-pi.mjs +18 -8
- package/tests/guided-git-activation-static.test.mjs +2 -2
- package/tests/guided-git-fallback-ui-static.test.mjs +2 -2
- package/tests/host-peer-dependencies.test.mjs +24 -0
- package/tests/http-endpoints-harness.test.mjs +60 -0
- package/tests/intercom-conversation-viewer-static.test.mjs +2 -2
- package/tests/main-output-loading-static.test.mjs +2 -2
- package/tests/middle-button-drag-scroll-static.test.mjs +2 -2
- package/tests/mobile-continuity-tablet-static.test.mjs +2 -2
- package/tests/mobile-foundation-static.test.mjs +2 -2
- package/tests/mobile-phone-experience-static.test.mjs +1 -1
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/optional-feature-prompt-impact-static.test.mjs +2 -2
- package/tests/persistent-ui-layout-static.test.mjs +2 -2
- package/tests/prompt-input-vertical-scroll-static.test.mjs +2 -2
- package/tests/questionnaire-dialog.test.mjs +2 -2
- package/tests/session-sampling-ui-static.test.mjs +2 -2
- package/tests/side-panel-section-height-removal-static.test.mjs +2 -2
- package/tests/subagent-observability-static.test.mjs +2 -2
- package/tests/syntax-highlighting-static.test.mjs +2 -2
- package/tests/theme-contract.test.mjs +10 -3
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/windows-drive-cwd-picker-static.test.mjs +2 -2
|
@@ -59,8 +59,8 @@ assert.match(css, /body\.terminal-tabs-left \.main-output-surface \{ grid-row: 4
|
|
|
59
59
|
assert.match(css, /body\.subagent-terminal-active \.main-output-surface,[\s\S]*body\.subagent-terminal-active \.main-output-loading,/, "dedicated subagent output should hide the main transcript and its loading status");
|
|
60
60
|
|
|
61
61
|
assert.match(html, /styles\.css\?v=154/, "the stylesheet cache query should advance");
|
|
62
|
-
assert.match(html, /app\.js\?v=
|
|
63
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
62
|
+
assert.match(html, /app\.js\?v=185/, "the app cache query should advance");
|
|
63
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "the PWA cache identity should advance with browser assets");
|
|
64
64
|
assert.match(readme, /Loading conversation history/, "user documentation should describe the plain-language loading feedback");
|
|
65
65
|
assert.match(development, /main output loading/i, "developer documentation should preserve the request-ownership contract");
|
|
66
66
|
|
|
@@ -17,8 +17,8 @@ assert.match(app, /installMiddleButtonDragScroll\(\{[\s\S]*onDirection: \(\{ tar
|
|
|
17
17
|
assert.match(app, /event\?\.type === "middle-drag"\) return event\.deltaY > 0;/, "moving below the press point should be recognized as intent to read later chat output");
|
|
18
18
|
assert.match(css, /body\.middle-button-auto-scrolling,[\s\S]*cursor: all-scroll !important;[\s\S]*user-select: none !important;/, "active automatic scrolling should expose a directional-scroll affordance and suppress accidental selection");
|
|
19
19
|
assert.match(html, /styles\.css\?v=154/, "changed drag-scroll styles should advance the stylesheet revision");
|
|
20
|
-
assert.match(html, /app\.js\?v=
|
|
21
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
20
|
+
assert.match(html, /app\.js\?v=185/, "changed drag-scroll wiring should advance the app revision");
|
|
21
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156";[\s\S]*"\/middle-button-drag-scroll\.mjs"/, "offline PWA installs should refresh and cache the new controller module");
|
|
22
22
|
assert.match(JSON.parse(packageJson).scripts.check, /node --check public\/middle-button-drag-scroll\.mjs/, "the package check should parse the startup-critical controller module");
|
|
23
23
|
|
|
24
24
|
console.log("middle-button-drag-scroll-static.test.mjs passed");
|
|
@@ -47,9 +47,9 @@ assert.match(css, /html\[data-tablet-shell="v2"\] \.mobile-shell-nav[\s\S]*?widt
|
|
|
47
47
|
assert.match(css, /html\[data-tablet-shell="v2"\] \.mobile-shell-surface[\s\S]*?width: min\(30rem, 72vw\)/, "tablet inspector must be a bounded right-side sheet");
|
|
48
48
|
assert.match(css, /html\[data-tablet-shell="v2"\] \.file-viewer-pane[\s\S]*?position: fixed[\s\S]*?inset: 0/, "tablet files must default to full-screen replacement");
|
|
49
49
|
assert.match(css, /and \(pointer: coarse\)[\s\S]*?min-height: 44px/, "coarse tablet pointers must retain the 44px target floor");
|
|
50
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
50
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "continuity/tablet assets need a coherent cache identity");
|
|
51
51
|
assert.match(html, /styles\.css\?v=154/, "tablet CSS must have a coherent HTML revision");
|
|
52
|
-
assert.match(html, /app\.js\?v=
|
|
52
|
+
assert.match(html, /app\.js\?v=185/, "continuity app logic must have a coherent HTML revision");
|
|
53
53
|
assert.match(technical, /tabletShell=v2[\s\S]*tabletShell=legacy/, "technical reference should document tablet preview and rollback");
|
|
54
54
|
|
|
55
55
|
console.log("mobile-continuity-tablet-static.test.mjs passed");
|
|
@@ -37,9 +37,9 @@ assert.match(pkg.scripts.check, /node --check public\/transcript-renderer\.mjs/,
|
|
|
37
37
|
assert.match(server, /STATIC_PUBLIC_FILE_EXTENSIONS[\s\S]*"\.mjs"/, "the server must serve typed startup modules from the public asset boundary");
|
|
38
38
|
assert.match(serviceWorker, /"\/mobile-shell-state\.mjs"/, "the PWA shell must cache the new startup module");
|
|
39
39
|
assert.match(serviceWorker, /"\/transcript-renderer\.mjs"/, "the PWA shell must cache the transcript startup module");
|
|
40
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
40
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "the cache identity must change with the startup graph");
|
|
41
41
|
assert.match(html, /styles\.css\?v=154/, "the stylesheet revision must change with mobile/tablet CSS fixes");
|
|
42
|
-
assert.match(html, /app\.js\?v=
|
|
42
|
+
assert.match(html, /app\.js\?v=185/, "the app revision must change with continuity/tablet wiring");
|
|
43
43
|
assert.match(serviceWorker, /const APP_SHELL_NETWORK_TIMEOUT_MS = 8_000;[\s\S]*?event\.waitUntil\([\s\S]*?cache\.put\(request, response\.clone\(\)\)[\s\S]*?return networkResponse;/, "runtime cache writes must extend the event lifetime without blocking bounded network responses");
|
|
44
44
|
assert.match(serviceWorker, /MOBILE_NAVIGATION_MESSAGE_TYPE = "pi-webui:navigate:v1"/, "the service worker must use a versioned active-client navigation message");
|
|
45
45
|
assert.match(serviceWorker, /client\.postMessage\(\{ type: MOBILE_NAVIGATION_MESSAGE_TYPE, target \}\)/, "existing clients must receive only a validated target message");
|
|
@@ -60,6 +60,6 @@ assert.match(css, /data-mobile-presentation="essential"/, "Essential presentatio
|
|
|
60
60
|
assert.match(css, /html\[data-mobile-shell="v2"\] body\.mobile-keyboard-open \.widget-area,[\s\S]*?\.composer-actions-button \{ display: block !important; \}/, "v2 keyboard mode must keep run widgets and the actions entry available");
|
|
61
61
|
assert.match(css, /@media \(prefers-reduced-motion: reduce\)/, "reduced-motion behavior is required");
|
|
62
62
|
assert.match(css, /@media \(forced-colors: active\)/, "forced-color affordances are required");
|
|
63
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
63
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "browser asset changes need a coherent cache tuple");
|
|
64
64
|
|
|
65
65
|
console.log("mobile-phone-experience-static.test.mjs passed");
|
|
@@ -68,7 +68,7 @@ assert.match(server, /STATIC_PUBLIC_FILE_EXTENSIONS[\s\S]*"\.mjs"/, "the server
|
|
|
68
68
|
assert.match(serviceWorker, /"\/issue-wizard-state\.mjs"/, "the PWA shell must keep caching the pure wizard module");
|
|
69
69
|
assert.match(serviceWorker, /"\/issue-bot-client\.mjs"/, "the PWA shell must cache the browser client module");
|
|
70
70
|
// Intent preserved: changing the public startup graph advances the PWA cache identity.
|
|
71
|
-
assert.match(serviceWorker, /pi-webui-pwa-
|
|
71
|
+
assert.match(serviceWorker, /pi-webui-pwa-v156/, "the PWA cache name must change with browser wiring updates");
|
|
72
72
|
assert.match(packageJson, /node --check public\/issue-wizard-state\.mjs/, "the package check must keep syntax-checking the pure wizard module");
|
|
73
73
|
assert.match(packageJson, /node --check public\/issue-bot-client\.mjs/, "the package check must syntax-check the browser client module");
|
|
74
74
|
|
|
@@ -61,7 +61,7 @@ assert.match(readme, /\+.*initial system prompt[\s\S]*?\+\.\.\..*session is runn
|
|
|
61
61
|
assert.match(technical, /prompt-impact indicators[\s\S]*?tool schemas and ordinary user or tool messages are not counted/i, "technical reference should state the measurement boundary");
|
|
62
62
|
assert.match(development, /reports\/pi-default-system-prompt-evaluation\.md[\s\S]*?promptImpact/, "contributor guide should identify the evidence source and catalog field");
|
|
63
63
|
assert.match(html, /styles\.css\?v=154/, "indicator styles should advance the stylesheet revision");
|
|
64
|
-
assert.match(html, /app\.js\?v=
|
|
65
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
64
|
+
assert.match(html, /app\.js\?v=185/, "indicator rendering should advance the app revision");
|
|
65
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "browser asset changes should advance the PWA cache identity");
|
|
66
66
|
|
|
67
67
|
console.log("optional-feature-prompt-impact-static.test.mjs passed");
|
|
@@ -271,8 +271,8 @@ assert.match(
|
|
|
271
271
|
|
|
272
272
|
// --- Coherent browser asset revisions --------------------------------------
|
|
273
273
|
|
|
274
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
274
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "changed browser assets should advance the PWA cache identity");
|
|
275
275
|
assert.match(html, /styles\.css\?v=154/, "the page should request the updated layout stylesheet revision");
|
|
276
|
-
assert.match(html, /data-app-src="\/app\.js\?v=
|
|
276
|
+
assert.match(html, /data-app-src="\/app\.js\?v=185"/, "the boot loader should request the updated app module revision");
|
|
277
277
|
|
|
278
278
|
console.log("persistent-ui-layout-static.test.mjs passed");
|
|
@@ -20,7 +20,7 @@ assert.match(css, /#promptInput \{[\s\S]*--prompt-input-block-chrome: calc\(1\.8
|
|
|
20
20
|
assert.match(resizePromptInput, /input\.style\.height = "auto";[\s\S]*borderTopWidth[\s\S]*borderBottomWidth[\s\S]*naturalHeight = input\.scrollHeight \+ borderBlock[\s\S]*isCapped \? "auto" : "hidden"/, "auto-resizing should include the textarea borders and enable vertical scrolling only after the six-line cap");
|
|
21
21
|
assert.doesNotMatch(resizePromptInput, /input\.style\.overflowY = "auto";/, "auto-resizing must not force a scrollbar below the six-line cap");
|
|
22
22
|
assert.match(html, /styles\.css\?v=154/, "the page should request the six-line prompt stylesheet revision");
|
|
23
|
-
assert.match(html, /app\.js\?v=
|
|
24
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
23
|
+
assert.match(html, /app\.js\?v=185/, "the page should request the current app revision");
|
|
24
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "the PWA cache identity should advance with the prompt scroll assets");
|
|
25
25
|
|
|
26
26
|
console.log("prompt-input-vertical-scroll-static.test.mjs passed");
|
|
@@ -505,7 +505,7 @@ assert.match(css, /\.questionnaire-options button\s*\{\s*min-height:\s*3\.35rem/
|
|
|
505
505
|
assert.match(css, /@media \(prefers-reduced-motion: reduce\)\s*\{[\s\S]*?\*, \*::before, \*::after[\s\S]*?transition-duration:\s*1ms !important/, "global reduced-motion rules must cover questionnaire transitions");
|
|
506
506
|
|
|
507
507
|
assert.match(html, /styles\.css\?v=154/, "questionnaire CSS needs the current stylesheet revision");
|
|
508
|
-
assert.match(html, /app\.js\?v=
|
|
509
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
508
|
+
assert.match(html, /app\.js\?v=185/, "questionnaire behavior needs the current app revision");
|
|
509
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "questionnaire public assets need a coherent PWA cache revision");
|
|
510
510
|
|
|
511
511
|
console.log("questionnaire-dialog.test.mjs passed");
|
|
@@ -57,10 +57,10 @@ assert.match(css, /\.sampling-parameter-control\.unsupported:hover:not\(\.sampli
|
|
|
57
57
|
assert.match(css, /\.sampling-parameter-control\.unsupported:focus-visible:not\(\.sampling-tooltip-dismissed\) > \.sampling-parameter-unsupported-tooltip/, "keyboard focus should reveal dismissible unsupported reasons");
|
|
58
58
|
assert.match(css, /\.sampling-parameter-unsupported-tooltip\.sampling-tooltip-below/, "bounded placement should support flipping below top-edge rows");
|
|
59
59
|
assert.match(css, /pointer-events: auto;/, "a visible unsupported tooltip should remain pointer-hoverable");
|
|
60
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
60
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "native-control assets should advance the cache identity");
|
|
61
61
|
assert.match(serviceWorker, /"\/sampling-parameter-controls\.mjs"/, "the pure sampling module should be part of the offline app shell");
|
|
62
62
|
assert.match(html, /styles\.css\?v=154/, "the changed stylesheet should have a new revision");
|
|
63
|
-
assert.match(html, /app\.js\?v=
|
|
63
|
+
assert.match(html, /app\.js\?v=185/, "the changed app module should have a new revision");
|
|
64
64
|
|
|
65
65
|
// --- Browser state behavior -------------------------------------------------
|
|
66
66
|
|
|
@@ -28,7 +28,7 @@ assert.match(app, /const UI_LAYOUT_SIDE_PANEL_FIELDS = \["placement", "sectionLa
|
|
|
28
28
|
assert.match(app, /function clearRemovedSidePanelSectionHeightState\(\)[\s\S]*localStorage\.removeItem\(REMOVED_SIDE_PANEL_SECTION_HEIGHT_STORAGE_KEY\)[\s\S]*record\.field === "sidePanel" && record\.subfield === "sectionHeights"/, "startup should remove the retired cache and pending mutations");
|
|
29
29
|
assert.match(app, /clearRemovedSidePanelSectionHeightState\(\);\s*restoreDurableUiLayoutPendingJournal\(\);/, "retired height state should be cleared before pending layout restoration");
|
|
30
30
|
assert.match(html, /styles\.css\?v=154/, "removing section resize styles should advance the stylesheet revision");
|
|
31
|
-
assert.match(html, /app\.js\?v=
|
|
32
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
31
|
+
assert.match(html, /app\.js\?v=185/, "removing section resize behavior should advance the app revision");
|
|
32
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "removing browser assets should advance the PWA cache identity");
|
|
33
33
|
|
|
34
34
|
console.log("side-panel-section-height-removal-static.test.mjs passed");
|
|
@@ -28,7 +28,7 @@ assert.match(app, /const SUBAGENT_ASYNC_WIDGET_KEY = "subagent-async"[\s\S]*case
|
|
|
28
28
|
assert.match(app, /for \(const \[key, value\] of widgets\)[\s\S]*if \(key === SUBAGENT_ASYNC_WIDGET_KEY\) continue;/, "stale cached async-status widgets should remain hidden defensively");
|
|
29
29
|
assert.match(css, /\.subagent-source-badge[\s\S]*text-overflow: ellipsis[\s\S]*@media \(max-width: 720px\)/, "source badges should remain compact and responsive");
|
|
30
30
|
assert.match(html, /Managed and registered Pi agent runs[\s\S]*External agents/, "help should explain managed, registered, and external groups");
|
|
31
|
-
assert.match(html, /styles\.css\?v=154[\s\S]*app\.js\?v=
|
|
32
|
-
assert.match(worker, /pi-webui-pwa-
|
|
31
|
+
assert.match(html, /styles\.css\?v=154[\s\S]*app\.js\?v=185/, "browser assets should use the current subagent-observability revisions");
|
|
32
|
+
assert.match(worker, /pi-webui-pwa-v156/, "PWA cache identity should advance with subagent widget suppression");
|
|
33
33
|
|
|
34
34
|
console.log("subagent-observability-static.test.mjs passed");
|
|
@@ -60,9 +60,9 @@ assert.match(css, /\.markdown-code \.syntax-comment \{[^}]*font-style: italic;/,
|
|
|
60
60
|
|
|
61
61
|
// --- Offline/PWA startup closure and coherent revisions ---
|
|
62
62
|
assert.match(serviceWorker, /"\/syntax-highlight\.mjs",/, "the eagerly imported tokenizer must be part of the offline app shell");
|
|
63
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
63
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "adding a startup module should advance the PWA cache identity");
|
|
64
64
|
assert.match(html, /styles\.css\?v=154/, "new token styles should advance the stylesheet revision");
|
|
65
|
-
assert.match(html, /data-app-src="\/app\.js\?v=
|
|
65
|
+
assert.match(html, /data-app-src="\/app\.js\?v=185"/, "new renderer wiring should advance the app module revision");
|
|
66
66
|
assert.match(pkg, /node --check public\/syntax-highlight\.mjs/, "the package check should syntax-check the startup-critical tokenizer");
|
|
67
67
|
|
|
68
68
|
const appShell = serviceWorker.slice(serviceWorker.indexOf("const APP_SHELL"), serviceWorker.indexOf("];", serviceWorker.indexOf("const APP_SHELL")));
|
|
@@ -4,6 +4,7 @@ import { dirname, join } from "node:path";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import {
|
|
6
6
|
PI_THEME_EXPORT_FIELDS,
|
|
7
|
+
PI_THEME_SCHEMA_URL,
|
|
7
8
|
REQUIRED_THEME_TOKENS,
|
|
8
9
|
THEME_TOKEN_GROUPS,
|
|
9
10
|
ThemeContractError,
|
|
@@ -18,8 +19,9 @@ import {
|
|
|
18
19
|
xterm256ToRgb,
|
|
19
20
|
} from "../public/theme-contract.mjs";
|
|
20
21
|
|
|
21
|
-
const
|
|
22
|
-
const schemaPath = join(
|
|
22
|
+
const piRoot = join(dirname(fileURLToPath(import.meta.resolve("@earendil-works/pi-coding-agent"))), "..");
|
|
23
|
+
const schemaPath = join(piRoot, "schemas", "theme.schema.json");
|
|
24
|
+
const legacySchemaPath = join(piRoot, "dist", "modes", "interactive", "theme", "theme-schema.json");
|
|
23
25
|
|
|
24
26
|
function fixture(overrides = {}) {
|
|
25
27
|
return {
|
|
@@ -36,7 +38,11 @@ assert.equal(new Set(REQUIRED_THEME_TOKENS).size, 51, "required tokens must be u
|
|
|
36
38
|
assert.equal(THEME_TOKEN_GROUPS.length, 7, "the documented token inventory has seven groups");
|
|
37
39
|
assert.deepEqual(THEME_TOKEN_GROUPS.map(({ tokens }) => tokens.length), [11, 11, 10, 3, 9, 6, 1]);
|
|
38
40
|
|
|
39
|
-
const installedSchema = JSON.parse(await readFile(schemaPath, "utf8"))
|
|
41
|
+
const installedSchema = JSON.parse(await readFile(schemaPath, "utf8").catch((error) => {
|
|
42
|
+
if (error.code !== "ENOENT") throw error;
|
|
43
|
+
return readFile(legacySchemaPath, "utf8");
|
|
44
|
+
}));
|
|
45
|
+
assert.equal(PI_THEME_SCHEMA_URL, "https://pi.dev/schemas/theme.schema.json");
|
|
40
46
|
assert.deepEqual(
|
|
41
47
|
[...REQUIRED_THEME_TOKENS].sort(),
|
|
42
48
|
[...installedSchema.properties.colors.required].sort(),
|
|
@@ -58,6 +64,7 @@ const explicitMax = fixture({ colors: { ...valid.colors, thinkingMax: "primary"
|
|
|
58
64
|
assert.equal(effectiveThemeColors(explicitMax).thinkingMax, "primary");
|
|
59
65
|
|
|
60
66
|
const native = canonicalizeTheme(valid);
|
|
67
|
+
assert.equal(native.$schema, PI_THEME_SCHEMA_URL);
|
|
61
68
|
assert.deepEqual(Object.keys(native.export), ["pageBg", "cardBg", "infoBg"]);
|
|
62
69
|
assert.equal(Object.hasOwn(native.export, "backgroundImage"), false, "WebUI-only export fields must not enter Pi-native files");
|
|
63
70
|
assert.deepEqual(Object.keys(native.colors), REQUIRED_THEME_TOKENS, "canonical colors must retain documented order");
|
|
@@ -34,7 +34,7 @@ assert.match(html, /role="alert" hidden>[\s\S]*Replace this exact target\?/, "ov
|
|
|
34
34
|
|
|
35
35
|
assert.match(app, /from "\.\/theme-contract\.mjs"/, "frontend should consume the shared browser-safe theme contract");
|
|
36
36
|
assert.match(serviceWorker, /"\/theme-contract\.mjs"/, "the PWA app shell should cache the startup-critical theme contract");
|
|
37
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
37
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v156"/, "adding the theme contract to the startup graph should advance the PWA cache identity");
|
|
38
38
|
assert.match(pkg, /node --check public\/theme-contract\.mjs/, "the package check should syntax-check the startup-critical theme contract");
|
|
39
39
|
assert.match(app, /function themeDraftFromCatalog\(theme, name = theme\?\.name\)[\s\S]*colors: cloneThemeDraft\(theme\?\.colors \|\| \{\}\)/, "catalog metadata should be projected into a schema-only editable draft");
|
|
40
40
|
assert.match(app, /for \(const \{ name, label \} of group\.tokens\)/, "visual controls should render from the exact shared token inventory");
|
|
@@ -75,7 +75,7 @@ assert.match(development, /virtual \*\*This PC\*\* response with an empty cwd an
|
|
|
75
75
|
assert.ok(packageJson.files.includes("TECHNICAL.md"), "the published package should include its advanced user reference");
|
|
76
76
|
assert.ok(packageJson.files.includes("DEVELOPMENT.md"), "the published package should include its contributor guide");
|
|
77
77
|
assert.match(html, /styles\.css\?v=154/, "the existing picker layout should retain its stylesheet revision");
|
|
78
|
-
assert.match(html, /app\.js\?v=
|
|
79
|
-
assert.match(serviceWorker, /pi-webui-pwa-
|
|
78
|
+
assert.match(html, /app\.js\?v=185/, "the changed picker behavior should advance the app revision");
|
|
79
|
+
assert.match(serviceWorker, /pi-webui-pwa-v156/, "the changed browser assets should advance the PWA cache identity");
|
|
80
80
|
|
|
81
81
|
console.log("windows-drive-cwd-picker-static.test.mjs passed");
|