@firstpick/pi-package-webui 0.10.0 → 0.10.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 +7 -2
- package/README.md +5 -3
- package/TECHNICAL.md +4 -0
- package/bin/pi-webui.mjs +5 -4
- package/package.json +1 -1
- package/public/app.js +145 -33
- package/public/index.html +10 -7
- package/public/service-worker.js +1 -1
- package/public/styles.css +51 -7
- package/tests/boot-failure-diagnostics.test.mjs +3 -3
- package/tests/browser/interaction-continuity.spec.mjs +9 -3
- package/tests/codex-fast-mode-static.test.mjs +2 -2
- package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
- package/tests/control-visibility-static.test.mjs +3 -3
- package/tests/controls-layout-static.test.mjs +3 -3
- package/tests/events-tree-context-menu-static.test.mjs +3 -3
- package/tests/fast-mode-client-static.test.mjs +1 -1
- package/tests/feature-decision-output-popup-static.test.mjs +2 -2
- package/tests/file-viewer-image-static.test.mjs +3 -3
- package/tests/guided-git-activation-static.test.mjs +3 -3
- package/tests/guided-git-fallback-ui-static.test.mjs +2 -2
- package/tests/guided-git-publication-backend-static.test.mjs +10 -5
- package/tests/http-endpoints-harness.test.mjs +5 -9
- package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
- package/tests/main-output-loading-static.test.mjs +18 -12
- 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 +8 -5
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/optional-feature-prompt-impact-static.test.mjs +67 -0
- package/tests/persistent-ui-layout-static.test.mjs +3 -3
- package/tests/prompt-input-vertical-scroll-static.test.mjs +3 -3
- package/tests/questionnaire-dialog.test.mjs +3 -3
- package/tests/session-sampling-ui-static.test.mjs +3 -3
- package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
- package/tests/streaming-ui-coupling.test.mjs +2 -0
- package/tests/subagent-observability-static.test.mjs +2 -2
- package/tests/syntax-highlighting-static.test.mjs +3 -3
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/windows-drive-cwd-picker-static.test.mjs +3 -3
|
@@ -1882,12 +1882,15 @@ assert.match(app, /async function acceptCurrentGitStaging\([\s\S]*summary\?\.sta
|
|
|
1882
1882
|
assert.match(app, /function gitWorkflowRequest\([\s\S]*response\.hint \? `\\n\\nHint:/, "guided git failures should show actionable backend hints");
|
|
1883
1883
|
assert.match(app, /function gitWorkflowRequest\([\s\S]*if \(response\.code\) failure\.code = response\.code;[\s\S]*if \(response\.hint\) failure\.hint = response\.hint;[\s\S]*if \(response\.data\) failure\.data = response\.data;[\s\S]*throw failure;/, "guided git request failures should preserve the structured backend code, hint, and process result");
|
|
1884
1884
|
assert.match(app, /async function pushGitWorkflow\([\s\S]*if \(error\?\.code === "NO_REMOTE"\) \{[\s\S]*await publishGitWorkflowRepository\(tabId, error\)/, "guided git push should offer GitHub publication only for structured NO_REMOTE failures");
|
|
1885
|
-
assert.match(app, /async function publishGitWorkflowRepository\(tabId, failure\)[\s\S]*Publish this repository to GitHub with the authenticated GitHub CLI \(gh\) account
|
|
1886
|
-
assert.match(app, /async function publishGitWorkflowRepository\([\s\S]*const confirmed = await appConfirmText\(\[[\s\S]*Repository name: \$\{repoName\}[\s\S]*Visibility: \$\{visibility\}[\s\S]*Branch to push: \$\{branch\}[\s\S]*Resulting remote: origin[\s\S]*if \(!confirmed\) return false;[\s\S]*gitWorkflowRequest\("\/api\/git-workflow\/publish", \{ body: \{
|
|
1885
|
+
assert.match(app, /async function publishGitWorkflowRepository\(tabId, failure\)[\s\S]*const repoName = cleanGitHubRepoNameInput\(failure\?\.data\?\.repoName \|\| defaultGitInitRepoName\(targetTab\)\);[\s\S]*Publish this repository to GitHub as \$\{repoName\} with the authenticated GitHub CLI \(gh\) account\?[\s\S]*if \(!publishRequested\) return false;[\s\S]*visibility = await promptGitPublishVisibility\(repoName\);[\s\S]*if \(!visibility\) return false;/, "guided git publication should derive the repository name and ask only for explicit visibility");
|
|
1886
|
+
assert.match(app, /async function publishGitWorkflowRepository\([\s\S]*const confirmed = await appConfirmText\(\[[\s\S]*Repository name: \$\{repoName\}[\s\S]*Visibility: \$\{visibility\}[\s\S]*Branch to push: \$\{branch\}[\s\S]*Resulting remote: origin[\s\S]*if \(!confirmed\) return false;[\s\S]*gitWorkflowRequest\("\/api\/git-workflow\/publish", \{ body: \{ visibility, confirmed: true \}/, "guided git publication should confirm the derived name and omit a client-controlled name from the publish request");
|
|
1887
1887
|
assert.match(app, /async function publishGitWorkflowRepository\([\s\S]*Published \$\{result\.repoName \|\| repoName\} as \$\{result\.visibility \|\| visibility\}\.[\s\S]*Remote: \$\{result\.remote \|\| "origin"\}[\s\S]*Branch: \$\{result\.branch \|\| branch\}[\s\S]*scheduleRefreshFooter\(\)/, "successful publication should report branch/remote metadata and refresh the footer");
|
|
1888
|
-
assert.
|
|
1889
|
-
assert.match(
|
|
1890
|
-
assert.match(
|
|
1888
|
+
assert.doesNotMatch(app, /function promptGitPublishRepoName\(/, "publication should not ask the user to name a repository");
|
|
1889
|
+
assert.match(server, /case "\/api\/git-workflow\/publish": \{[\s\S]*const root = await getGitRoot\(cwd\);[\s\S]*const repoName = cleanGitHubRepoName\(path\.basename\(root\)\);[\s\S]*\["repo", "create", repoName, `--\$\{visibility\}`, "--source", "\.", "--remote", "origin", "--push"\][\s\S]*\{ cwd: root, timeoutMs:/, "server publication should derive the Git root directory name and let gh use system configuration while adding origin and pushing");
|
|
1890
|
+
assert.match(html, /<select id="textPromptSelect" class="dialog-input" aria-labelledby="textPromptTitle" hidden><\/select>/, "the application prompt should provide a native dropdown control");
|
|
1891
|
+
assert.match(app, /function appPromptSelect\([\s\S]*placeholderOption\.disabled = true;[\s\S]*placeholderOption\.selected = true;[\s\S]*select\.value = "";/, "selection prompts should require an explicit choice with no preselected value");
|
|
1892
|
+
assert.match(app, /async function promptGitPublishVisibility\(repoName\) \{[\s\S]*await appPromptSelect\(\{[\s\S]*\{ value: "public", label: "Public" \}[\s\S]*\{ value: "private", label: "Private" \}[\s\S]*placeholder: "Choose visibility…"/, "repository visibility should use a public/private dropdown with no default");
|
|
1893
|
+
assert.doesNotMatch(app, /async function promptGitPublishVisibility\(repoName\) \{[\s\S]{0,500}window\.prompt/, "repository visibility should not use the browser text prompt");
|
|
1891
1894
|
assert.match(app, /function cleanGitPublishVisibilityInput\(value\)[\s\S]*if \(visibility !== "public" && visibility !== "private"\)[\s\S]*nothing was published/, "publication visibility must be exactly public or private");
|
|
1892
1895
|
assert.doesNotMatch(app, /visibility = "(?:public|private)"/, "publication visibility should never be defaulted in the frontend");
|
|
1893
1896
|
assert.match(server, /async function gitAddAllPayload\([\s\S]*platform\(\) === "win32"[\s\S]*findWindowsReservedGitPath\([\s\S]*windowsReservedGitPathFailure\(/, "guided git add should preflight Windows-reserved untracked paths before staging");
|
|
@@ -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-v153/, "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
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
|
|
4
|
+
const [app, css, html, serviceWorker, readme, technical, development] = await Promise.all([
|
|
5
|
+
readFile(new URL("../public/app.js", import.meta.url), "utf8"),
|
|
6
|
+
readFile(new URL("../public/styles.css", import.meta.url), "utf8"),
|
|
7
|
+
readFile(new URL("../public/index.html", import.meta.url), "utf8"),
|
|
8
|
+
readFile(new URL("../public/service-worker.js", import.meta.url), "utf8"),
|
|
9
|
+
readFile(new URL("../README.md", import.meta.url), "utf8"),
|
|
10
|
+
readFile(new URL("../TECHNICAL.md", import.meta.url), "utf8"),
|
|
11
|
+
readFile(new URL("../DEVELOPMENT.md", import.meta.url), "utf8"),
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
const expectedImpact = new Map([
|
|
15
|
+
["bangCommandAutocomplete", "none"],
|
|
16
|
+
["fishUserBash", "none"],
|
|
17
|
+
["btwCommand", "none"],
|
|
18
|
+
["gitWorkflow", "none"],
|
|
19
|
+
["releaseNpm", "none"],
|
|
20
|
+
["releaseAur", "initial"],
|
|
21
|
+
["aurReview", "none"],
|
|
22
|
+
["workflows", "initial"],
|
|
23
|
+
["featureSystemPrompt", "conditional"],
|
|
24
|
+
["safetyGuard", "none"],
|
|
25
|
+
["tuiSkillsCommand", "none"],
|
|
26
|
+
["todoProgressWidget", "initial"],
|
|
27
|
+
["tuiToolsCommand", "none"],
|
|
28
|
+
["remoteWebui", "none"],
|
|
29
|
+
["questionnaire", "initial"],
|
|
30
|
+
["naturalConversation", "conditional"],
|
|
31
|
+
["gitFooterStatus", "none"],
|
|
32
|
+
["statsCommand", "none"],
|
|
33
|
+
["codexFastMode", "none"],
|
|
34
|
+
["themeBundle", "none"],
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
function optionalFeatureBlock(featureId) {
|
|
38
|
+
const match = app.match(new RegExp(`\\{\\n\\s+id: "${featureId}",[\\s\\S]*?\\n\\s+\\},`));
|
|
39
|
+
assert.ok(match, `optional feature ${featureId} should remain declared`);
|
|
40
|
+
return match[0];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
for (const [featureId, impact] of expectedImpact) {
|
|
44
|
+
assert.match(optionalFeatureBlock(featureId), new RegExp(`promptImpact: "${impact}"`), `${featureId} should declare ${impact} prompt impact`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const catalog = app.slice(app.indexOf("const OPTIONAL_FEATURES = ["), app.indexOf("const OPTIONAL_FEATURE_PROMPT_IMPACTS"));
|
|
48
|
+
const declaredImpacts = [...catalog.matchAll(/promptImpact: "(initial|conditional|none)"/g)];
|
|
49
|
+
assert.equal(declaredImpacts.length, expectedImpact.size, "every optional feature should declare exactly one recognized prompt-impact class");
|
|
50
|
+
|
|
51
|
+
assert.match(app, /initial: Object\.freeze\(\{ symbol: "\+", label: "Adds to the initial system prompt" \}\)/, "+ should describe initial system-prompt text");
|
|
52
|
+
assert.match(app, /conditional: Object\.freeze\(\{ symbol: "\+\.\.\.", label: "Can add system-prompt text while the session is running" \}\)/, "+... should describe conditional session-time prompt text");
|
|
53
|
+
assert.match(app, /none: Object\.freeze\(\{ symbol: "-", label: "No additional system-prompt text measured" \}\)/, "- should describe no measured system-prompt text");
|
|
54
|
+
assert.doesNotMatch(app, /renderOptionalFeaturePromptImpactLegend|optional-feature-prompt-impact-legend/, "the panel should not repeat a prompt-impact legend above the feature list");
|
|
55
|
+
assert.match(app, /function renderOptionalFeatureRow\(feature\)[\s\S]*?System prompt impact: \$\{impact\.label\}[\s\S]*?renderOptionalFeaturePromptImpactBadge\(feature\)/, "each feature row should expose the impact in its tooltip and visible heading");
|
|
56
|
+
assert.match(css, /\.optional-feature-prompt-impact \{[\s\S]*?width: 2\.8rem;[\s\S]*?min-width: 2\.8rem;[\s\S]*?\.optional-feature-prompt-impact\.initial[\s\S]*?\.optional-feature-prompt-impact\.conditional[\s\S]*?\.optional-feature-prompt-impact\.none/, "all three row indicator classes should use the same fixed width");
|
|
57
|
+
assert.doesNotMatch(css, /optional-feature-prompt-impact-legend/, "removed legend styles should not remain in the browser bundle");
|
|
58
|
+
assert.match(app, /const statusTags = make\("div", "optional-feature-status-tags"\);[\s\S]*?statusTags\.append\(renderOptionalFeaturePromptImpactBadge\(feature\), make\("span", `optional-feature-pill/, "the impact and feature-status badges should share one dedicated row");
|
|
59
|
+
assert.match(css, /\.optional-feature-title \{[\s\S]*?flex-direction: column;[\s\S]*?\.optional-feature-status-tags \{[\s\S]*?display: inline-flex;[\s\S]*?gap: 0\.34rem;[\s\S]*?\.optional-feature-pill \{[\s\S]*?flex: 0 0 auto;/, "title width should not stretch the feature-status badge or the gap between badges");
|
|
60
|
+
assert.match(readme, /\+.*initial system prompt[\s\S]*?\+\.\.\..*session is running[\s\S]*?-.*no measured system-prompt text/i, "README should explain the symbols in user language");
|
|
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
|
+
assert.match(development, /reports\/pi-default-system-prompt-evaluation\.md[\s\S]*?promptImpact/, "contributor guide should identify the evidence source and catalog field");
|
|
63
|
+
assert.match(html, /styles\.css\?v=152/, "indicator styles should advance the stylesheet revision");
|
|
64
|
+
assert.match(html, /app\.js\?v=182/, "indicator rendering should advance the app revision");
|
|
65
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v153"/, "browser asset changes should advance the PWA cache identity");
|
|
66
|
+
|
|
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-
|
|
275
|
-
assert.match(html, /styles\.css\?v=
|
|
276
|
-
assert.match(html, /data-app-src="\/app\.js\?v=
|
|
274
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v153"/, "changed browser assets should advance the PWA cache identity");
|
|
275
|
+
assert.match(html, /styles\.css\?v=152/, "the page should request the updated layout stylesheet revision");
|
|
276
|
+
assert.match(html, /data-app-src="\/app\.js\?v=182"/, "the boot loader should request the updated app module revision");
|
|
277
277
|
|
|
278
278
|
console.log("persistent-ui-layout-static.test.mjs passed");
|
|
@@ -19,8 +19,8 @@ const resizePromptInput = app.slice(resizeStart, resizeEnd);
|
|
|
19
19
|
assert.match(css, /#promptInput \{[\s\S]*--prompt-input-block-chrome: calc\(1\.8rem \+ 2px\);[\s\S]*max-height: calc\(6lh \+ var\(--prompt-input-block-chrome\)\);[\s\S]*overflow-y: auto;[\s\S]*overscroll-behavior-y: contain;/, "the prompt should show six complete lines before native vertical scrolling begins");
|
|
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
|
-
assert.match(html, /styles\.css\?v=
|
|
23
|
-
assert.match(html, /app\.js\?v=
|
|
24
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
22
|
+
assert.match(html, /styles\.css\?v=152/, "the page should request the six-line prompt stylesheet revision");
|
|
23
|
+
assert.match(html, /app\.js\?v=182/, "the page should request the current app revision");
|
|
24
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v153"/, "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");
|
|
@@ -504,8 +504,8 @@ assert.match(css, /@media \(max-width: 720px\), \(max-device-width: 720px\), \(p
|
|
|
504
504
|
assert.match(css, /\.questionnaire-options button\s*\{\s*min-height:\s*3\.35rem/, "mobile questionnaire targets must exceed the 44px floor");
|
|
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
|
-
assert.match(html, /styles\.css\?v=
|
|
508
|
-
assert.match(html, /app\.js\?v=
|
|
509
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
507
|
+
assert.match(html, /styles\.css\?v=152/, "questionnaire CSS needs the current stylesheet revision");
|
|
508
|
+
assert.match(html, /app\.js\?v=182/, "questionnaire behavior needs the current app revision");
|
|
509
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v153"/, "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-v153"/, "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
|
-
assert.match(html, /styles\.css\?v=
|
|
63
|
-
assert.match(html, /app\.js\?v=
|
|
62
|
+
assert.match(html, /styles\.css\?v=152/, "the changed stylesheet should have a new revision");
|
|
63
|
+
assert.match(html, /app\.js\?v=182/, "the changed app module should have a new revision");
|
|
64
64
|
|
|
65
65
|
// --- Browser state behavior -------------------------------------------------
|
|
66
66
|
|
|
@@ -27,8 +27,8 @@ assert.doesNotMatch(layout, /sectionHeightMin|sectionHeightMax|validateSectionHe
|
|
|
27
27
|
assert.match(app, /const UI_LAYOUT_SIDE_PANEL_FIELDS = \["placement", "sectionLayout", "collapsedSectionIds", "hiddenSectionIds", "collapsedPanels", "panelWidths"\];/, "the browser durable layout field list should omit section heights");
|
|
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
|
-
assert.match(html, /styles\.css\?v=
|
|
31
|
-
assert.match(html, /app\.js\?v=
|
|
32
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
30
|
+
assert.match(html, /styles\.css\?v=152/, "removing section resize styles should advance the stylesheet revision");
|
|
31
|
+
assert.match(html, /app\.js\?v=182/, "removing section resize behavior should advance the app revision");
|
|
32
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v153"/, "removing browser assets should advance the PWA cache identity");
|
|
33
33
|
|
|
34
34
|
console.log("side-panel-section-height-removal-static.test.mjs passed");
|
|
@@ -259,6 +259,8 @@ assert.match(findCaseBody(handleEvent, "tool_execution_end"), /claimToolBoundary
|
|
|
259
259
|
assert.match(findFunctionBody(app, "scheduleSemanticReconcile"), /mergeSemanticReconcileRequest\(semanticReconcilePending, dirty, tabContext\)[\s\S]*?semanticReconcileFrame !== null\) return;/, "WS2a: semantic reconciliation must coalesce partitioned requests to one pending flush");
|
|
260
260
|
assert.match(findFunctionBody(app, "mergeSemanticReconcileRequest"), /semanticReconcileContextKey\(tabContext\)[\s\S]*?pendingByContext\.set\(key, request\)/, "WS2a: semantic dirty flags must remain partitioned by tab generation");
|
|
261
261
|
assert.match(flushSemanticReconcile, /if \(dirty\.workflow\) reconcileGitWorkflowContinuation\(tabContext\.tabId\);[\s\S]*?if \(!isCurrentTabContext\(tabContext\)\) continue;/, "WS2a: originating workflow settlement must run before stale active-DOM work no-ops");
|
|
262
|
+
const reconcileGitWorkflowContinuation = findFunctionBody(app, "reconcileGitWorkflowContinuation");
|
|
263
|
+
assert.match(reconcileGitWorkflowContinuation, /workflow\.step === "readmeGenerating"[\s\S]*?prepareGitInitFiles\(\{ afterReadmePrompt: true,[\s\S]*?workflow\.step === "gitignoreGenerating"[\s\S]*?prepareGitInitFiles\(\{ afterGitignorePrompt: true,/, "WS2a: settlement must continue README and .gitignore initialization after Pi finishes");
|
|
262
264
|
for (const [caseLabel, flag] of [["agent_start", "state: true"], ["agent_end", "messages: true"], ["message_end", "messages: true"], ["agent_settled", "messages: true"]]) {
|
|
263
265
|
assert.match(findCaseBody(handleEvent, caseLabel), new RegExp(`scheduleSemanticReconcile\\(\\{[\\s\\S]*?${flag}`), `WS2a: ${caseLabel} must reconcile chrome through the coalesced semantic scheduler`);
|
|
264
266
|
}
|
|
@@ -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=
|
|
32
|
-
assert.match(worker, /pi-webui-pwa-
|
|
31
|
+
assert.match(html, /styles\.css\?v=152[\s\S]*app\.js\?v=182/, "browser assets should use the current subagent-observability revisions");
|
|
32
|
+
assert.match(worker, /pi-webui-pwa-v153/, "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-
|
|
64
|
-
assert.match(html, /styles\.css\?v=
|
|
65
|
-
assert.match(html, /data-app-src="\/app\.js\?v=
|
|
63
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v153"/, "adding a startup module should advance the PWA cache identity");
|
|
64
|
+
assert.match(html, /styles\.css\?v=152/, "new token styles should advance the stylesheet revision");
|
|
65
|
+
assert.match(html, /data-app-src="\/app\.js\?v=182"/, "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")));
|
|
@@ -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-v153"/, "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");
|
|
@@ -74,8 +74,8 @@ assert.match(technical, /working-directory picker accepts a direct path[\s\S]*\*
|
|
|
74
74
|
assert.match(development, /virtual \*\*This PC\*\* response with an empty cwd and `selectable: false`/i, "the contributor guide should record the server/browser virtual-view contract");
|
|
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
|
-
assert.match(html, /styles\.css\?v=
|
|
78
|
-
assert.match(html, /app\.js\?v=
|
|
79
|
-
assert.match(serviceWorker, /pi-webui-pwa-
|
|
77
|
+
assert.match(html, /styles\.css\?v=152/, "the existing picker layout should retain its stylesheet revision");
|
|
78
|
+
assert.match(html, /app\.js\?v=182/, "the changed picker behavior should advance the app revision");
|
|
79
|
+
assert.match(serviceWorker, /pi-webui-pwa-v153/, "the changed browser assets should advance the PWA cache identity");
|
|
80
80
|
|
|
81
81
|
console.log("windows-drive-cwd-picker-static.test.mjs passed");
|