@firstpick/pi-package-webui 0.11.0 → 0.11.2
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 +181 -12
- package/README.md +41 -9
- package/TECHNICAL.md +91 -8
- package/bin/pi-webui.mjs +5432 -11428
- package/index.ts +10 -3
- 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/lib/component-update-state.mjs +2 -2
- package/lib/git-workflow-preference-values.mjs +122 -0
- package/lib/git-workflow-preferences.mjs +35 -563
- package/lib/package-updates.mjs +260 -0
- package/lib/rpc-supervisor-client.mjs +8 -4
- package/lib/server/app-runners.mjs +1667 -0
- package/lib/server/codex-fast-mode.mjs +161 -0
- package/lib/server/conversation-mode.mjs +218 -0
- package/lib/server/conversation-voice.mjs +318 -0
- package/lib/server/extension-ui-requests.mjs +114 -0
- package/lib/server/git-generation.mjs +459 -0
- package/lib/server/git-mutations.mjs +1827 -0
- package/lib/server/git-reads.mjs +608 -0
- package/lib/server/git-worktree-sessions.mjs +408 -0
- package/lib/server/helper-requests.mjs +82 -0
- package/lib/server/no-project-workspaces.mjs +103 -0
- package/lib/server/rpc-transports.mjs +394 -0
- package/lib/server/settings-store.mjs +544 -0
- package/lib/server/sse-delivery.mjs +138 -0
- package/lib/server/workspace-files.mjs +563 -0
- package/lib/update/supervisor.mjs +4 -0
- package/lib/webui-workspaces.mjs +2 -0
- package/package.json +5 -5
- package/public/activity-agents-controller.mjs +269 -0
- package/public/activity-events-controller.mjs +236 -0
- package/public/activity-intercom-controller.mjs +627 -0
- package/public/activity-queue-controller.mjs +534 -0
- package/public/activity-todo-view.mjs +89 -0
- package/public/activity-usage-controller.mjs +589 -0
- package/public/app.js +3761 -3878
- package/public/conversation-overview.css +84 -0
- package/public/conversation-overview.mjs +193 -0
- package/public/draft-conversations.mjs +135 -0
- package/public/focused-composer-controls.css +111 -0
- package/public/focused-composer-controls.mjs +143 -0
- package/public/focused-composer-disclosure.mjs +223 -0
- package/public/focused-shell-adapter.css +264 -0
- package/public/focused-shell-adapter.mjs +257 -0
- package/public/index.html +137 -80
- package/public/model-catalog-order.mjs +63 -0
- package/public/platform-event-stream.mjs +64 -0
- package/public/project-artifact-controller.mjs +218 -0
- package/public/project-file-viewer-controller.mjs +383 -0
- package/public/project-git-tools-controller.mjs +181 -0
- package/public/project-runners-controller.mjs +220 -0
- package/public/service-worker.js +52 -1
- package/public/session-attention-scheduler.mjs +182 -0
- package/public/session-composer-store.mjs +56 -0
- package/public/session-context.mjs +51 -0
- package/public/session-extension-requests.mjs +63 -0
- package/public/session-shelf-state.mjs +151 -0
- package/public/session-shelves.css +171 -0
- package/public/session-shelves.mjs +95 -0
- package/public/settings-navigation-controller.mjs +249 -0
- package/public/settings-navigation.css +61 -0
- package/public/settings-resource-controller.mjs +232 -0
- package/public/settings-workspace.css +19 -0
- package/public/settings-workspace.mjs +175 -0
- package/public/shell-actions.mjs +87 -0
- package/public/shell-attention-inbox.css +72 -0
- package/public/shell-attention-inbox.mjs +198 -0
- package/public/shell-context-actions.css +61 -0
- package/public/shell-context-actions.mjs +168 -0
- package/public/shell-inspector-resize.mjs +124 -0
- package/public/shell-navigation-resize.mjs +107 -0
- package/public/shell-navigation.mjs +127 -0
- package/public/shell-preferences.mjs +108 -0
- package/public/shell-surfaces.mjs +99 -0
- package/public/shell-tools-launcher.css +97 -0
- package/public/shell-tools-launcher.mjs +222 -0
- package/public/shell-view-host.mjs +115 -0
- package/public/shell-workspace.css +266 -0
- package/public/shell-workspace.mjs +402 -0
- package/public/sidebar-update-menu.css +190 -0
- package/public/sidebar-update-menu.mjs +512 -0
- package/public/styles.css +320 -169
- package/public/subagent-launch-slot-state.mjs +2 -2
- package/public/theme-contract.mjs +1 -1
- package/public/themed-selects.css +156 -0
- package/public/workspace-choices.mjs +104 -0
- package/tests/activity-agents-controller.test.mjs +652 -0
- package/tests/activity-events-controller.test.mjs +511 -0
- package/tests/app-runner-terminal-static.test.mjs +3 -3
- package/tests/append-system-http.test.mjs +7 -6
- package/tests/append-system-selector-static.test.mjs +6 -6
- package/tests/aur-review-widget-static.test.mjs +11 -3
- package/tests/boot-failure-diagnostics.test.mjs +8 -3
- package/tests/browser/activity-intercom-controller.spec.mjs +457 -0
- package/tests/browser/activity-navigation-integration.spec.mjs +45 -0
- package/tests/browser/activity-owner-integration.spec.mjs +201 -0
- package/tests/browser/activity-queue-controller.spec.mjs +405 -0
- package/tests/browser/activity-section-picker.spec.mjs +294 -0
- package/tests/browser/activity-todo-view.spec.mjs +60 -0
- package/tests/browser/activity-usage-controller.spec.mjs +416 -0
- package/tests/browser/compact-layout-integration.spec.mjs +58 -0
- package/tests/browser/composer-action-grid-reorder.spec.mjs +16 -0
- package/tests/browser/composer-disclosure.spec.mjs +389 -0
- package/tests/browser/composer-toolbar-polish.spec.mjs +343 -0
- package/tests/browser/control-deck-component-updates.spec.mjs +5 -14
- package/tests/browser/control-deck-side-panels.spec.mjs +27 -12
- package/tests/browser/control-visibility.spec.mjs +5 -0
- package/tests/browser/controls-layout.spec.mjs +21 -2
- package/tests/browser/conversation-overview.spec.mjs +251 -0
- package/tests/browser/draft-conversations.spec.mjs +276 -0
- package/tests/browser/empty-startup-fixture.mjs +135 -0
- package/tests/browser/empty-startup.spec.mjs +282 -0
- package/tests/browser/events-tree-context-menu.spec.mjs +1 -0
- package/tests/browser/focused-composer-more.spec.mjs +127 -0
- package/tests/browser/focused-model-shortcuts.spec.mjs +120 -0
- package/tests/browser/focused-navigation-fixture.mjs +32 -0
- package/tests/browser/focused-project-activity.spec.mjs +111 -0
- package/tests/browser/focused-shell-integration.spec.mjs +208 -0
- package/tests/browser/folder-picker-layout-fixture.mjs +13 -0
- package/tests/browser/folder-picker-layout.spec.mjs +302 -0
- package/tests/browser/footer-model-advanced-layout.spec.mjs +27 -14
- package/tests/browser/git-setup-cancel.spec.mjs +251 -0
- package/tests/browser/guided-git-fallback.spec.mjs +40 -21
- package/tests/browser/inspector-header.spec.mjs +221 -0
- package/tests/browser/inspector-overview-integration.spec.mjs +104 -0
- package/tests/browser/inspector-resize.spec.mjs +227 -0
- package/tests/browser/inspector-topic-overflow.spec.mjs +56 -0
- package/tests/browser/interaction-action-discovery.spec.mjs +332 -0
- package/tests/browser/interaction-attention-inbox.spec.mjs +364 -0
- package/tests/browser/interaction-attention-integration.spec.mjs +53 -0
- package/tests/browser/interaction-composer-controls.spec.mjs +267 -0
- package/tests/browser/interaction-composer-integration.spec.mjs +175 -0
- package/tests/browser/interaction-continuity.spec.mjs +50 -26
- package/tests/browser/interaction-model-picker.spec.mjs +86 -0
- package/tests/browser/last-terminal-close.spec.mjs +280 -0
- package/tests/browser/mobile-foundation.spec.mjs +172 -20
- package/tests/browser/model-catalog-groups.spec.mjs +104 -0
- package/tests/browser/more-row-menus.spec.mjs +258 -0
- package/tests/browser/new-tab-hit-target.spec.mjs +228 -0
- package/tests/browser/no-project-conversation.spec.mjs +113 -0
- package/tests/browser/optimistic-prompt.spec.mjs +3 -0
- package/tests/browser/overhaul-w7-accessibility.spec.mjs +227 -0
- package/tests/browser/overhaul-w7-capabilities.spec.mjs +298 -0
- package/tests/browser/overhaul-w7-companions.spec.mjs +290 -0
- package/tests/browser/overhaul-w7-focus-repairs.spec.mjs +210 -0
- package/tests/browser/overhaul-w7-layout-repairs.spec.mjs +183 -0
- package/tests/browser/overhaul-w7-parent-repairs.spec.mjs +97 -0
- package/tests/browser/overhaul-w7-pwa.spec.mjs +247 -0
- package/tests/browser/overhaul-w7-responsive.spec.mjs +450 -0
- package/tests/browser/overhaul-w7-update.spec.mjs +215 -0
- package/tests/browser/overhaul-w7-zoom.spec.mjs +243 -0
- package/tests/browser/overview-agent-ownership.spec.mjs +45 -0
- package/tests/browser/persistent-ui-layout.spec.mjs +3 -0
- package/tests/browser/project-artifact-controller.spec.mjs +324 -0
- package/tests/browser/project-artifact-integration.spec.mjs +103 -0
- package/tests/browser/project-file-buffer-integration.spec.mjs +230 -0
- package/tests/browser/project-git-tools-integration.spec.mjs +369 -0
- package/tests/browser/session-fixture.mjs +118 -0
- package/tests/browser/session-ownership.spec.mjs +175 -0
- package/tests/browser/session-shelves-integration.spec.mjs +219 -0
- package/tests/browser/session-shelves.spec.mjs +340 -0
- package/tests/browser/session-sidebar-resize.spec.mjs +138 -0
- package/tests/browser/session-summary.spec.mjs +17 -12
- package/tests/browser/settings-complete-home.spec.mjs +463 -0
- package/tests/browser/settings-entrypoint.spec.mjs +104 -0
- package/tests/browser/settings-navigation-controller.spec.mjs +383 -0
- package/tests/browser/settings-navigation-integration.spec.mjs +348 -0
- package/tests/browser/settings-resource-lifetime.spec.mjs +349 -0
- package/tests/browser/settings-workspace-integration.spec.mjs +132 -0
- package/tests/browser/shell-ownership.spec.mjs +398 -0
- package/tests/browser/shell-rollout-fixture.mjs +259 -0
- package/tests/browser/shell-rollout.spec.mjs +357 -0
- package/tests/browser/shell-tools-launcher.spec.mjs +260 -0
- package/tests/browser/shell-workspace.spec.mjs +433 -0
- package/tests/browser/side-panel-section-reorder.spec.mjs +3 -1
- package/tests/browser/sidebar-floating-tooltips.spec.mjs +37 -0
- package/tests/browser/sidebar-update-integration.spec.mjs +277 -0
- package/tests/browser/sidebar-update-menu.spec.mjs +402 -0
- package/tests/browser/sidebar-update-progress.spec.mjs +472 -0
- package/tests/browser/stream-output-isolation.spec.mjs +6 -3
- package/tests/browser/themed-selects.spec.mjs +297 -0
- package/tests/browser/thread-start-flow.spec.mjs +481 -0
- package/tests/browser/ui-polish-activity-controls.spec.mjs +177 -0
- package/tests/browser/ui-polish-features.spec.mjs +85 -0
- package/tests/browser/ui-polish-file-header.spec.mjs +43 -0
- package/tests/browser/ui-polish-local-git.spec.mjs +183 -0
- package/tests/browser/ui-polish-mobile-recovery.spec.mjs +36 -0
- package/tests/browser/ui-polish-navigation.spec.mjs +127 -0
- package/tests/browser/ui-polish-session-actions.spec.mjs +282 -0
- package/tests/browser/user-noticeable-fixes.spec.mjs +10 -3
- package/tests/browser/windows-drive-parent.spec.mjs +4 -2
- package/tests/browser/workspace-draft-selection.spec.mjs +266 -0
- package/tests/codex-cli-usage.test.mjs +189 -0
- package/tests/codex-fast-mode-static.test.mjs +16 -11
- package/tests/codex-speed-mode-browser-state.test.mjs +6 -3
- 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 +146 -0
- package/tests/component-update-api-static.test.mjs +2 -2
- package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
- package/tests/control-deck-component-updates-static.test.mjs +9 -4
- package/tests/control-visibility-static.test.mjs +3 -3
- package/tests/controls-layout-static.test.mjs +5 -5
- package/tests/conversation-overview-adapter.test.mjs +100 -0
- package/tests/document-artifact-static.test.mjs +2 -1
- package/tests/draft-conversations.test.mjs +205 -0
- package/tests/empty-startup-launcher.test.mjs +197 -0
- package/tests/events-tree-context-menu-static.test.mjs +22 -18
- package/tests/fake-pi-session-ownership.test.mjs +302 -0
- package/tests/fast-mode-client-static.test.mjs +1 -1
- package/tests/feature-decision-output-popup-static.test.mjs +2 -2
- package/tests/feature-system-prompt-optional-feature-static.test.mjs +1 -1
- package/tests/file-viewer-image-static.test.mjs +15 -11
- package/tests/file-viewer-search-static.test.mjs +5 -5
- package/tests/fixtures/fake-codex-app-server.mjs +61 -0
- package/tests/fixtures/fake-pi.mjs +41 -9
- package/tests/footer-provider-usage-visual-static.test.mjs +7 -6
- package/tests/foreground-transcript-catch-up-static.test.mjs +7 -4
- package/tests/git-footer-context-menu-static.test.mjs +1 -1
- package/tests/git-panel-file-preview-static.test.mjs +41 -48
- package/tests/git-panel-live-updates-static.test.mjs +2 -1
- package/tests/git-workflow-dispatch.test.mjs +66 -0
- package/tests/git-workflow-preferences.test.mjs +9 -1
- package/tests/guided-git-activation-static.test.mjs +14 -11
- package/tests/guided-git-fallback-ui-static.test.mjs +8 -5
- package/tests/guided-git-message-reliability-static.test.mjs +10 -6
- package/tests/guided-git-publication-backend-static.test.mjs +16 -11
- package/tests/http-endpoints-harness.test.mjs +29 -9
- package/tests/interaction-state-stability-static.test.mjs +4 -3
- package/tests/intercom-conversation-viewer-static.test.mjs +29 -17
- package/tests/intercom-tag-layout-static.test.mjs +13 -12
- package/tests/intercom-tag-overflow-layout.test.mjs +11 -10
- package/tests/main-output-loading-static.test.mjs +4 -4
- package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
- package/tests/mobile-compact-layout.test.mjs +2 -2
- package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
- package/tests/mobile-foundation-static.test.mjs +10 -7
- package/tests/mobile-phone-experience-static.test.mjs +3 -2
- package/tests/mobile-static.test.mjs +173 -135
- package/tests/model-catalog-order.test.mjs +103 -0
- package/tests/native-parity.test.mjs +6 -4
- package/tests/native-session-choice-owner.test.mjs +102 -0
- package/tests/native-update-lifecycle.test.mjs +10 -5
- package/tests/no-project-http-harness.test.mjs +328 -0
- package/tests/no-project-navigation.test.mjs +54 -0
- package/tests/no-project-workspaces.test.mjs +77 -0
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/optional-feature-migration-frontend.test.mjs +4 -4
- package/tests/optional-feature-prompt-impact-static.test.mjs +3 -3
- package/tests/package-updates.test.mjs +630 -0
- package/tests/persistent-ui-layout-static.test.mjs +3 -3
- package/tests/platform-event-stream.test.mjs +253 -0
- package/tests/project-file-viewer-controller.test.mjs +652 -0
- package/tests/project-git-tools-adapter.test.mjs +103 -0
- package/tests/project-git-tools-controller.test.mjs +577 -0
- package/tests/project-runners-controller.test.mjs +453 -0
- package/tests/prompt-input-vertical-scroll-static.test.mjs +3 -3
- package/tests/prompt-routing-input-clear-static.test.mjs +2 -2
- package/tests/questionnaire-dialog.test.mjs +6 -6
- package/tests/queue-edit-reorder-static.test.mjs +48 -51
- package/tests/rpc-supervisor-host.test.mjs +4 -1
- package/tests/safety-guard-auto-review-static.test.mjs +1 -1
- package/tests/sampling-native-controls-user-flow.test.mjs +7 -1
- package/tests/server-app-runners.test.mjs +536 -0
- package/tests/server-codex-fast-mode.test.mjs +346 -0
- package/tests/server-conversation-mode.test.mjs +386 -0
- package/tests/server-conversation-voice.test.mjs +426 -0
- package/tests/server-extension-ui-requests.test.mjs +357 -0
- package/tests/server-git-generation.test.mjs +558 -0
- package/tests/server-git-mutations.test.mjs +729 -0
- package/tests/server-git-reads.test.mjs +381 -0
- package/tests/server-git-worktree-sessions.test.mjs +502 -0
- package/tests/server-helper-requests.test.mjs +364 -0
- package/tests/server-rpc-transports.test.mjs +553 -0
- package/tests/server-settings-store.test.mjs +132 -0
- package/tests/server-shell-rollout.test.mjs +478 -0
- package/tests/server-sse-delivery.test.mjs +410 -0
- package/tests/server-workspace-files.test.mjs +546 -0
- package/tests/session-attention-scheduler.test.mjs +514 -0
- package/tests/session-composer-store.test.mjs +153 -0
- package/tests/session-context.test.mjs +134 -0
- package/tests/session-extension-requests.test.mjs +193 -0
- package/tests/session-ownership-adapter.test.mjs +130 -0
- package/tests/session-sampling-ui-static.test.mjs +10 -4
- package/tests/session-send-lifetime.test.mjs +140 -0
- package/tests/session-shelf-state.test.mjs +348 -0
- package/tests/session-shelves-adapter.test.mjs +79 -0
- package/tests/session-summary-lifetime.test.mjs +54 -0
- package/tests/settings-resource-controller.test.mjs +548 -0
- package/tests/shell-action-adapter.test.mjs +169 -0
- package/tests/shell-actions.test.mjs +182 -0
- package/tests/shell-navigation.test.mjs +348 -0
- package/tests/shell-preferences.test.mjs +367 -0
- package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
- package/tests/stream-output-isolation-static.test.mjs +1 -1
- package/tests/subagent-gate-visibility.test.mjs +1 -1
- package/tests/subagent-launch-slot-state.test.mjs +2 -2
- package/tests/subagent-launch-slots-static.test.mjs +1 -1
- package/tests/subagent-observability-static.test.mjs +2 -2
- package/tests/subagent-reliability-integration.test.mjs +13 -30
- package/tests/syntax-highlighting-static.test.mjs +3 -3
- package/tests/tab-close-continuity-static.test.mjs +1 -1
- package/tests/tab-metadata-ordering.test.mjs +99 -0
- package/tests/terminal-cwd-grouping-static.test.mjs +2 -2
- package/tests/terminal-tab-prompt-tooltip-static.test.mjs +2 -0
- package/tests/terminal-tab-workspace-static.test.mjs +5 -4
- package/tests/terminal-tabs-resize-static.test.mjs +1 -1
- package/tests/theme-contract.test.mjs +10 -3
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/thread-display-title.test.mjs +44 -0
- package/tests/update-api-harness.test.mjs +15 -14
- package/tests/update-tab-restore-harness.test.mjs +3 -0
- package/tests/webui-settings-locking.test.mjs +2 -2
- package/tests/windows-drive-cwd-picker-static.test.mjs +7 -9
- package/tests/workspace-choices.test.mjs +114 -0
- package/tests/workspace-save-load-static.test.mjs +7 -4
|
@@ -5,11 +5,11 @@ import { dirname, join } from "node:path";
|
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
|
|
7
7
|
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
-
const app = await readFile(join(root, "public", "
|
|
8
|
+
const app = await readFile(join(root, "public", "activity-intercom-controller.mjs"), "utf8");
|
|
9
9
|
|
|
10
10
|
function functionSource(name, nextName) {
|
|
11
11
|
const start = app.indexOf(`function ${name}(`);
|
|
12
|
-
const end = app.indexOf(`\
|
|
12
|
+
const end = app.indexOf(`\n function ${nextName}(`, start);
|
|
13
13
|
assert.ok(start >= 0 && end > start, `${name} should remain a standalone frontend helper`);
|
|
14
14
|
return app.slice(start, end);
|
|
15
15
|
}
|
|
@@ -46,17 +46,18 @@ const container = {
|
|
|
46
46
|
querySelector: (selector) => selector === "button.composer-intercom-tag.overflow" ? overflow : null,
|
|
47
47
|
};
|
|
48
48
|
const context = {
|
|
49
|
-
|
|
49
|
+
disposed: false,
|
|
50
|
+
nodes: { intercomConversationTags: container },
|
|
50
51
|
intercomConversationOverflowOpen: false,
|
|
51
|
-
|
|
52
|
-
getComputedStyle: () => ({ columnGap: "5px", gap: "5px" }),
|
|
52
|
+
setOverflowOpen: (open) => overflowStateCalls.push(open),
|
|
53
|
+
window: { getComputedStyle: () => ({ columnGap: "5px", gap: "5px" }) },
|
|
53
54
|
};
|
|
54
55
|
vm.runInNewContext(
|
|
55
|
-
`${functionSource("
|
|
56
|
+
`${functionSource("fitTags", "scheduleTagLayout")}\nthis.fitTags = fitTags;`,
|
|
56
57
|
context,
|
|
57
58
|
);
|
|
58
59
|
|
|
59
|
-
context.
|
|
60
|
+
context.fitTags();
|
|
60
61
|
assert.deepEqual(tags.map((tag) => tag.hidden), [false, false, true], "the strip should keep the maximum complete conversation tags that fit");
|
|
61
62
|
assert.deepEqual(menuItems.map((tag) => tag.hidden), [true, true, false], "the popup should contain only conversations hidden from the strip");
|
|
62
63
|
assert.equal(overflow.hidden, false, "the overflow chip should remain visible while conversations are hidden");
|
|
@@ -65,14 +66,14 @@ assert.equal(overflow.attributes.get("aria-label"), "Show 1 more agent conversat
|
|
|
65
66
|
assert.equal(overflow.measurements, 1, "fitting should measure one overflow width per digit count");
|
|
66
67
|
|
|
67
68
|
container.clientWidth = 320;
|
|
68
|
-
context.
|
|
69
|
+
context.fitTags();
|
|
69
70
|
assert.deepEqual(tags.map((tag) => tag.hidden), [false, false, false], "widening the input should reveal every conversation without a data refresh");
|
|
70
71
|
assert.deepEqual(menuItems.map((tag) => tag.hidden), [true, true, true], "the popup should not duplicate visible conversations");
|
|
71
72
|
assert.equal(overflow.hidden, true, "the +X chip should disappear when every conversation fits");
|
|
72
73
|
assert.deepEqual(overflowStateCalls, [false], "revealing every conversation should close an open overflow popup");
|
|
73
74
|
|
|
74
75
|
container.clientWidth = 130;
|
|
75
|
-
context.
|
|
76
|
+
context.fitTags();
|
|
76
77
|
assert.deepEqual(tags.map((tag) => tag.hidden), [false, true, true], "narrowing the input should hide whole tags instead of crushing every label");
|
|
77
78
|
assert.deepEqual(menuItems.map((tag) => tag.hidden), [true, false, false], "responsive fitting should update the selectable popup contents");
|
|
78
79
|
assert.equal(overflow.textContent, "+2", "responsive fitting should keep the overflow count current");
|
|
@@ -80,7 +81,7 @@ assert.equal(overflow.textContent, "+2", "responsive fitting should keep the ove
|
|
|
80
81
|
container.clientWidth = 0;
|
|
81
82
|
const zeroWidthState = tags.map((tag) => tag.hidden);
|
|
82
83
|
const zeroWidthOverflowText = overflow.textContent;
|
|
83
|
-
context.
|
|
84
|
+
context.fitTags();
|
|
84
85
|
assert.deepEqual(tags.map((tag) => tag.hidden), zeroWidthState, "a temporarily unmeasurable strip should preserve its last stable visibility state");
|
|
85
86
|
assert.equal(overflow.textContent, zeroWidthOverflowText, "a zero-width pass should not expose a stale overflow count");
|
|
86
87
|
|
|
@@ -45,7 +45,7 @@ assert.match(refreshMessages, /beginMainOutputLoading\(tabContext, loadDelta \?
|
|
|
45
45
|
assert.match(refreshMessages, /updateMainOutputLoading\(loadingRequest, "Loading conversation history…"\)[\s\S]*api\("\/api\/messages"/, "delta fallback should report that it is loading the complete transcript");
|
|
46
46
|
assert.match(refreshMessages, /updateMainOutputLoading\(loadingRequest, "Preparing your conversation…"\)[\s\S]*renderMessages\(latestMessages\)/, "the status should report transcript rendering after data arrives");
|
|
47
47
|
assert.match(refreshMessages, /finally \{\s*finishMainOutputLoading\(loadingRequest\);\s*\}/, "success, failure, and stale responses should all clear their request token");
|
|
48
|
-
assert.match(app, /activeTabId =
|
|
48
|
+
assert.match(app, /activeTabId = context\.tabId;\s*activeTabGeneration = context\.generation;\s*renderMainOutputLoading\(\);/, "tab changes should immediately reconcile stale and current request visibility");
|
|
49
49
|
|
|
50
50
|
assert.match(css, /\.main-output-loading\[hidden\] \{ display: none !important; \}/, "hidden loading feedback should not render");
|
|
51
51
|
assert.match(css, /\.main-output-surface \{[\s\S]*?position: relative;[\s\S]*?flex: 1 1 auto;[\s\S]*?min-height: 0;/, "the transcript should retain its flexible layout surface");
|
|
@@ -58,9 +58,9 @@ assert.match(css, /@media \(prefers-reduced-motion: reduce\)[\s\S]*?animation-du
|
|
|
58
58
|
assert.match(css, /body\.terminal-tabs-left \.main-output-surface \{ grid-row: 4; \}[\s\S]*body\.terminal-tabs-left \.footer-status-host \{ grid-row: 7; \}[\s\S]*body\.terminal-tabs-left \.context-meter-bar \{ grid-row: 8; \}/, "sidebar tab placement should keep the loading overlay anchored to the footer host");
|
|
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
|
-
assert.match(html, /styles\.css\?v=
|
|
62
|
-
assert.match(html, /app\.js\?v=
|
|
63
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
61
|
+
assert.match(html, /styles\.css\?v=167/, "the stylesheet cache query should advance");
|
|
62
|
+
assert.match(html, /app\.js\?v=220/, "the app cache query should advance");
|
|
63
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v200"/, "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
|
|
|
@@ -16,9 +16,9 @@ assert.match(app, /import \{ installMiddleButtonDragScroll \} from "\.\/middle-b
|
|
|
16
16
|
assert.match(app, /installMiddleButtonDragScroll\(\{[\s\S]*onDirection: \(\{ target, offsetY \}\)[\s\S]*noteChatUserScrollIntent\(\{ type: "middle-drag", deltaY: offsetY \}\)/, "chat auto-scroll direction should feed the existing follow/pause intent state");
|
|
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
|
-
assert.match(html, /styles\.css\?v=
|
|
20
|
-
assert.match(html, /app\.js\?v=
|
|
21
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
19
|
+
assert.match(html, /styles\.css\?v=167/, "changed drag-scroll styles should advance the stylesheet revision");
|
|
20
|
+
assert.match(html, /app\.js\?v=220/, "changed drag-scroll wiring should advance the app revision");
|
|
21
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v200";[\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");
|
|
@@ -12,8 +12,8 @@ const [html, css, app, technical] = await Promise.all([
|
|
|
12
12
|
]);
|
|
13
13
|
|
|
14
14
|
assert.match(html, /id="terminalTabsToggleButton"[^>]*aria-controls="terminalTabsDrawerContent"[^>]*aria-expanded="false"/, "terminal summary should control the collapsed drawer");
|
|
15
|
-
assert.match(html, /id="terminalTabsDrawerContent"[^>]*aria-label="
|
|
16
|
-
assert.match(html, /id="terminalTabsBackdrop"[^>]*aria-label="Close
|
|
15
|
+
assert.match(html, /id="terminalTabsDrawerContent"[^>]*aria-label="Thread navigation"[\s\S]*id="tabBar"[\s\S]*class="terminal-sidebar-actions"[^>]*aria-label="Thread and workspace actions"[\s\S]*id="closeAllTabsButton"/, "drawer should reuse canonical tabs and workspace actions");
|
|
16
|
+
assert.match(html, /id="terminalTabsBackdrop"[^>]*aria-label="Close thread navigation"[^>]*hidden/, "drawer should expose an accessible backdrop close target");
|
|
17
17
|
assert.match(css, /body\.mobile-tabs-expanded \.terminal-tabs-shell \{[\s\S]*?position:\s*fixed;[\s\S]*?top:\s*0;[\s\S]*?right:\s*0;[\s\S]*?left:\s*0;[\s\S]*?width:\s*100vw;[\s\S]*?height:\s*var\(--visual-viewport-height, 100dvh\);[\s\S]*?border-radius:\s*0;/, "expanded terminal navigation should fill the visual viewport");
|
|
18
18
|
assert.match(css, /body\.mobile-tabs-expanded \.terminal-tabs \{[\s\S]*?position:\s*static;[\s\S]*?flex-direction:\s*column;[\s\S]*?overflow-y:\s*auto/, "drawer tabs should follow the vertical left-sidebar model");
|
|
19
19
|
assert.match(app, /function setMobileTabsExpanded\(expanded, \{ restoreFocus = false \} = \{\}\)[\s\S]*?setComposerActionsOpen\(false\)[\s\S]*?terminalTabsBackdrop\.hidden = !mobileTabsExpanded[\s\S]*?focusReturn\.focus/, "drawer state should coordinate competing surfaces and restore focus");
|
|
@@ -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-
|
|
51
|
-
assert.match(html, /styles\.css\?v=
|
|
52
|
-
assert.match(html, /app\.js\?v=
|
|
50
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v200"/, "continuity/tablet assets need a coherent cache identity");
|
|
51
|
+
assert.match(html, /styles\.css\?v=167/, "tablet CSS must have a coherent HTML revision");
|
|
52
|
+
assert.match(html, /app\.js\?v=220/, "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");
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
|
+
|
|
3
4
|
import { dirname, join } from "node:path";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
5
6
|
|
|
7
|
+
const sseDelivery = await readFile(new URL("../lib/server/sse-delivery.mjs", import.meta.url), "utf8");
|
|
8
|
+
|
|
6
9
|
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
7
10
|
const [app, css, html, server, serviceWorker, packageRaw] = await Promise.all([
|
|
8
11
|
readFile(join(root, "public", "app.js"), "utf8"),
|
|
@@ -37,9 +40,9 @@ assert.match(pkg.scripts.check, /node --check public\/transcript-renderer\.mjs/,
|
|
|
37
40
|
assert.match(server, /STATIC_PUBLIC_FILE_EXTENSIONS[\s\S]*"\.mjs"/, "the server must serve typed startup modules from the public asset boundary");
|
|
38
41
|
assert.match(serviceWorker, /"\/mobile-shell-state\.mjs"/, "the PWA shell must cache the new startup module");
|
|
39
42
|
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-
|
|
41
|
-
assert.match(html, /styles\.css\?v=
|
|
42
|
-
assert.match(html, /app\.js\?v=
|
|
43
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v200"/, "the cache identity must change with the startup graph");
|
|
44
|
+
assert.match(html, /styles\.css\?v=167/, "the stylesheet revision must change with mobile/tablet CSS fixes");
|
|
45
|
+
assert.match(html, /app\.js\?v=220/, "the app revision must change with continuity/tablet wiring");
|
|
43
46
|
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
47
|
assert.match(serviceWorker, /MOBILE_NAVIGATION_MESSAGE_TYPE = "pi-webui:navigate:v1"/, "the service worker must use a versioned active-client navigation message");
|
|
45
48
|
assert.match(serviceWorker, /client\.postMessage\(\{ type: MOBILE_NAVIGATION_MESSAGE_TYPE, target \}\)/, "existing clients must receive only a validated target message");
|
|
@@ -57,10 +60,10 @@ assert.match(server, /requestId was already used for a different prompt/, "reque
|
|
|
57
60
|
assert.match(server, /runId: null/, "tab activity must expose an opaque parent-run field");
|
|
58
61
|
assert.match(server, /activity\.runId = randomUUID\(\)/, "parent-run IDs must be server-issued opaque values");
|
|
59
62
|
assert.match(server, /function markTabFailed\([\s\S]*?activity\.status = "failed"[\s\S]*?activity\.completionSerial/, "failed parent turns must be represented distinctly from successful completion");
|
|
60
|
-
assert.match(
|
|
61
|
-
assert.match(
|
|
62
|
-
assert.match(
|
|
63
|
-
assert.match(
|
|
63
|
+
assert.match(sseDelivery, /SSE_BACKPRESSURE_MAX_PENDING_BYTES = 4 \* 1024 \* 1024/, "SSE backpressure buffering must remain explicitly bounded above the healthy fixture burst");
|
|
64
|
+
assert.match(sseDelivery, /res\.once\("drain", \(\) => flushSseClient\(client\)\)/, "healthy SSE clients must resume after transient write backpressure");
|
|
65
|
+
assert.match(sseDelivery, /client\.tab\?\.sseClients\?\.delete\(client\)/, "eviction must remove only the slow client");
|
|
66
|
+
assert.match(sseDelivery, /client\.res\?\.end\(\)/, "slow-client eviction must finish chunked SSE responses gracefully");
|
|
64
67
|
assert.match(css, /--mobile-control-size:\s*40px;/, "phone density should expose the selected 40px control floor");
|
|
65
68
|
assert.match(css, /\.terminal-tabs-toggle-button,[\s\S]*?\.terminal-close-all-button \{ min-height:\s*var\(--mobile-control-size\)/, "phone tab targets should use the shared compact control size");
|
|
66
69
|
assert.match(css, /\.side-panel-toggle-button,[\s\S]*?\.composer-attach-button,[\s\S]*?width:\s*var\(--mobile-control-size\);[\s\S]*?height:\s*var\(--mobile-control-size\);/, "phone icon controls should use the shared compact square size");
|
|
@@ -35,7 +35,8 @@ assert.match(app, /mobileCanonicalMountContent\(host, \["sidePanelSectionQueue"\
|
|
|
35
35
|
assert.match(app, /mobileCanonicalMountContent\(host, topic\[1\]/, "More must reuse canonical settings/action nodes");
|
|
36
36
|
assert.match(app, /await appConfirm\(\{ title: "Abort active run\?"/, "Abort must have visible tap-confirm parity");
|
|
37
37
|
assert.match(app, /elements\.optionsConversationModeButton\?\.click\(\)/, "voice entry must retain the existing action");
|
|
38
|
-
assert.match(app, /
|
|
38
|
+
assert.match(app, /shellHistory\.write\(\{ state: \{ piMobileShellV2: true/, "route and sheet transitions must use the shared history owner");
|
|
39
|
+
assert.match(app, /if \(!commitMobileNavigation\(next\)\) return;/, "a failed history write must not update the rendered view");
|
|
39
40
|
assert.match(app, /document\.addEventListener\("keydown", \(event\) => \{[\s\S]*?event\.key !== "Escape"[\s\S]*?document\.querySelector\("dialog\[open\]"\)/, "Escape must share mobile Back handling without dismissing a surface under a native dialog");
|
|
40
41
|
assert.match(app, /projectTopics\?\.addEventListener\("keydown"[\s\S]*?"ArrowLeft"[\s\S]*?"Home"[\s\S]*?activateProjectTopic/, "Project tabs require arrow/Home/End keyboard activation");
|
|
41
42
|
assert.match(app, /function syncMobileShellInteractivity\([\s\S]*?layout\.inert = layoutObscured[\s\S]*?destination\.setAttribute\("role", "main"\)/, "full-screen destinations must inert the obscured layout and own the main landmark");
|
|
@@ -60,6 +61,6 @@ assert.match(css, /data-mobile-presentation="essential"/, "Essential presentatio
|
|
|
60
61
|
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
62
|
assert.match(css, /@media \(prefers-reduced-motion: reduce\)/, "reduced-motion behavior is required");
|
|
62
63
|
assert.match(css, /@media \(forced-colors: active\)/, "forced-color affordances are required");
|
|
63
|
-
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-
|
|
64
|
+
assert.match(serviceWorker, /const CACHE_NAME = "pi-webui-pwa-v200"/, "browser asset changes need a coherent cache tuple");
|
|
64
65
|
|
|
65
66
|
console.log("mobile-phone-experience-static.test.mjs passed");
|