@firstpick/pi-package-webui 0.9.5 → 0.9.7
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 +11 -5
- package/bin/pi-webui.mjs +457 -77
- package/lib/git-workflow-preferences.mjs +21 -1
- package/lib/optional-feature-catalog.mjs +1 -1
- package/lib/session-actions.mjs +20 -2
- 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 +2539 -292
- package/public/index.html +87 -31
- package/public/service-worker.js +4 -1
- package/public/stream-derived-output.mjs +799 -0
- package/public/stream-markdown-tail.mjs +204 -0
- package/public/stream-output-controller.mjs +193 -51
- package/public/stream-render-scheduler.mjs +85 -0
- package/public/styles.css +501 -19
- package/public/transcript-renderer.mjs +73 -24
- package/tests/boot-failure-diagnostics.test.mjs +3 -3
- package/tests/browser/composer-action-grid-reorder.spec.mjs +114 -31
- package/tests/browser/control-visibility.spec.mjs +141 -2
- package/tests/browser/events-tree-context-menu.spec.mjs +240 -0
- package/tests/browser/guided-git-fallback.spec.mjs +153 -0
- package/tests/browser/mobile-foundation.spec.mjs +28 -0
- package/tests/browser/stream-output-isolation.spec.mjs +308 -3
- package/tests/browser/user-noticeable-fixes.spec.mjs +204 -0
- package/tests/codex-fast-mode-static.test.mjs +2 -2
- package/tests/compact-sections-static.test.mjs +4 -0
- package/tests/composer-action-grid-reorder-static.test.mjs +8 -7
- package/tests/control-visibility-static.test.mjs +66 -3
- package/tests/controls-layout-static.test.mjs +3 -3
- package/tests/cwd-footer-reliability-static.test.mjs +1 -1
- 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 +57 -10
- package/tests/fixtures/streaming-workloads.mjs +36 -0
- package/tests/footer-provider-usage-visual-static.test.mjs +15 -0
- package/tests/foreground-transcript-catch-up-static.test.mjs +7 -1
- package/tests/git-workflow-preferences.test.mjs +30 -1
- package/tests/guided-git-fallback-runtime.test.mjs +418 -0
- package/tests/guided-git-fallback-ui-static.test.mjs +60 -0
- package/tests/guided-git-message-reliability-static.test.mjs +8 -7
- package/tests/interaction-state-stability-static.test.mjs +3 -1
- package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
- package/tests/intercom-conversations-http.test.mjs +16 -0
- package/tests/main-output-loading-static.test.mjs +3 -3
- 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 +80 -67
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/persistent-ui-layout-static.test.mjs +4 -4
- package/tests/prompt-input-vertical-scroll-static.test.mjs +26 -0
- 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/runtime-error-visibility.test.mjs +3 -3
- package/tests/session-auth-harness.test.mjs +26 -1
- 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/stream-derived-output.test.mjs +121 -0
- package/tests/stream-markdown-tail.test.mjs +218 -0
- package/tests/stream-output-controller.test.mjs +119 -4
- package/tests/stream-output-isolation-static.test.mjs +27 -6
- package/tests/stream-output-workloads.test.mjs +40 -3
- package/tests/stream-render-scheduler.test.mjs +115 -0
- package/tests/streaming-ui-coupling.test.mjs +1 -1
- 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 +23 -0
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/thinking-format-parser.test.mjs +15 -0
- package/tests/todo-filter-static.test.mjs +148 -0
- package/tests/transcript-markdown-tail.test.mjs +137 -0
- package/webui-rpc-helper.mjs +220 -3
|
@@ -45,7 +45,7 @@ const companionDependencies = {
|
|
|
45
45
|
"@firstpick/pi-extension-bang-command-autocomplete": "^0.2.2",
|
|
46
46
|
"@firstpick/pi-extension-btw": "^0.1.4",
|
|
47
47
|
"@firstpick/pi-extension-fish-user-bash": "^0.2.2",
|
|
48
|
-
"@firstpick/pi-extension-git-footer-status": "^0.
|
|
48
|
+
"@firstpick/pi-extension-git-footer-status": "^0.5.0",
|
|
49
49
|
"@firstpick/pi-extension-release-aur": "^0.1.8",
|
|
50
50
|
"@firstpick/pi-extension-release-npm": "^0.4.4",
|
|
51
51
|
"@firstpick/pi-extension-safety-guard": "^0.2.6",
|
|
@@ -287,11 +287,11 @@ assert.match(html, /data-side-panel-section="controls"/, "side panel controls sh
|
|
|
287
287
|
assert.match(html, /data-side-panel-section="commands"/, "side panel commands should live in a collapsible section");
|
|
288
288
|
assert.match(html, /class="side-panel-section-toggle"[^>]*aria-controls="sidePanelSectionControls"/, "side panel section toggles should target their content panels");
|
|
289
289
|
assert.match(html, /class="side-panel-section-label">Events<\/span>/, "side panel events should expose a section toggle label");
|
|
290
|
-
assert.match(app, /function addEvent\(message, level = "info", \{ toolCallId = ""
|
|
290
|
+
assert.match(app, /function addEvent\(message, level = "info", \{ toolCallId = "", toolEventPhase = "", details = \[\], notify = true,[\s\S]*?make\("button", `event \$\{level\}`[\s\S]*?chatEventTimestamp[\s\S]*?jumpToChatEvent\(line\)/, "event log entries should be keyboard-accessible controls that navigate into the chat");
|
|
291
291
|
assert.match(app, /function chatEventTargetForLine\(line\)[\s\S]*?chatToolCallId[\s\S]*?data-tool-call-id[\s\S]*?\.message\[data-chat-timestamp\]/, "event navigation should prefer exact tool cards and otherwise match the closest chat timestamp");
|
|
292
292
|
assert.match(app, /function jumpToChatEvent\(line\)[\s\S]*?setChatScrollTopInstant[\s\S]*?highlightChatEventTarget[\s\S]*?setSidePanelCollapsed\(true, \{ persist: false \}\)/, "event navigation should dismiss overlay sidebars, scroll the chat, and highlight its target");
|
|
293
293
|
assert.match(app, /function applyChatEventMetadata\(bubble, message\)[\s\S]*?bubble\.dataset\.chatTimestamp/, "rendered chat events should expose timestamps for sidebar navigation");
|
|
294
|
-
assert.match(app, /addEvent\(
|
|
294
|
+
assert.match(app, /case "tool_execution_start":[\s\S]*?addEvent\(\.\.\.toolLifecycleEventArguments\(event, "start"\)\)/, "tool start events should retain exact tool-card navigation while adding bounded lifecycle details");
|
|
295
295
|
assert.match(css, /\.event:hover,[\s\S]*?\.message\.chat-event-target[\s\S]*?@keyframes chat-event-target-pulse/, "clickable events and highlighted chat targets should have visible interaction states");
|
|
296
296
|
const sidePanelToggleStates = Array.from(
|
|
297
297
|
html.matchAll(/class="side-panel-section-toggle"[^>]*aria-expanded="([^"]+)"/g),
|
|
@@ -324,7 +324,7 @@ assert.match(html, /id="busyPromptBehaviorMenu"[\s\S]*data-busy-prompt-behavior=
|
|
|
324
324
|
assert.match(app, /const LONG_INPUT_ATTACHMENT_LINE_THRESHOLD = 20/, "long composer text should use a 20-line threshold before becoming an attachment");
|
|
325
325
|
assert.match(app, /function attachLongTextAsFile\(text, source = "input text"\)/, "long composer text should be attachable as a generated text file");
|
|
326
326
|
assert.match(app, /function handleAttachmentPaste\(event\)[\s\S]*attachLongTextAsFile\(text, "clipboard text"\)/, "long pasted text should be attached instead of inserted into the prompt textarea");
|
|
327
|
-
assert.
|
|
327
|
+
assert.doesNotMatch(app, /moveLongPromptInputToAttachment/, "typed composer text must stay editable inline; only pasted text becomes an attachment");
|
|
328
328
|
assert.match(html, /id="attachmentTextDialog"[\s\S]*id="attachmentTextEditor"/, "text attachments should have an in-Web UI editing dialog");
|
|
329
329
|
assert.match(app, /attachment-edit-button[\s\S]*openTextAttachmentEditor\(attachment\.id\)/, "editable text attachments should expose an Edit action in the tray");
|
|
330
330
|
assert.match(app, /function saveTextAttachmentEdit\(\)[\s\S]*attachment\.file = nextFile/, "text attachment dialog should save edits back to the attachment file");
|
|
@@ -450,19 +450,21 @@ assert.match(css, /\.path-picker-clear-search-button:hover,[\s\S]*?var\(--ctp-ma
|
|
|
450
450
|
assert.match(css, /height:\s*var\(--visual-viewport-height, 100dvh\)/, "layout should consume visual viewport height");
|
|
451
451
|
assert.match(css, /@media \(max-width: 1050px\)[\s\S]*?\.chat-panel \{[\s\S]*?height:\s*calc\(var\(--visual-viewport-height, 100dvh\) - 2rem\);[\s\S]*?max-height:\s*calc\(var\(--visual-viewport-height, 100dvh\) - 2rem\);[\s\S]*?\.chat \{ flex-basis:\s*0; \}/, "narrow stacked layout should bound the transcript so terminal tabs and bottom controls stay visible");
|
|
452
452
|
assert.match(css, /@media \(max-width: 1050px\)[\s\S]*?\.side-panel-backdrop \{[\s\S]*?position:\s*fixed[\s\S]*?\.side-panel \{[\s\S]*?position:\s*fixed/, "narrow stacked layout should use the mobile-style side-panel overlay drawer");
|
|
453
|
-
assert.match(css,
|
|
454
|
-
assert.match(css,
|
|
455
|
-
assert.match(css,
|
|
453
|
+
assert.match(css, /body\.control-deck-overlay:not\(\.side-panel-collapsed\) \{ overflow:\s*hidden; \}/, "narrow side-panel overlay should prevent background page scrolling while open");
|
|
454
|
+
assert.match(css, /body:where\(:not\(\.control-deck-left\):not\(\.control-deck-both\)\) \.layout \{ grid-template-columns:/, "the default two-column layout rule must keep low specificity so overlay/collapsed rules win on narrow and touch viewports");
|
|
455
|
+
assert.match(css, /body\.control-deck-overlay:not\(\.side-panel-collapsed\) \.workspace-column \{[\s\S]*?visibility:\s*hidden;[\s\S]*?pointer-events:\s*none;/, "narrow side-panel overlay should suppress the underlying workspace so it cannot cover side-panel controls");
|
|
456
|
+
assert.match(css, /body\.control-deck-overlay \.side-panel-backdrop \{[\s\S]*?z-index:\s*110;/, "overlay backdrop should sit above the workspace");
|
|
457
|
+
assert.match(css, /@media \(max-width: 1050px\)[\s\S]*?\.side-panel \{[\s\S]*?z-index:\s*111;[\s\S]*?body\.side-panel-collapsed \.terminal-tabs-shell \{[\s\S]*?padding-right:\s*4\.85rem;[\s\S]*?\.side-panel-expand-button \{[\s\S]*?z-index:\s*120/, "narrow side-panel overlay and expand button should stay above and reserve space from terminal header controls");
|
|
456
458
|
assert.match(css, /@media \(max-width: 720px\), \(max-device-width: 720px\), \(pointer: coarse\) and \(hover: none\)[\s\S]*?body\.side-panel-collapsed \.terminal-tabs-shell \{ padding-right:\s*calc\(44px \+ 0\.8rem\); \}[\s\S]*?\.side-panel-expand-button \{[\s\S]*?z-index:\s*120[\s\S]*?\.side-panel-backdrop \{[\s\S]*?z-index:\s*110;[\s\S]*?\.side-panel \{[\s\S]*?z-index:\s*111;/, "mobile side-panel controls should not hide behind terminal header buttons");
|
|
457
459
|
assert.match(css, /button, select, input \{ min-height: 44px; \}/, "base controls should meet 44px touch-target height");
|
|
458
460
|
// Intent superseded: Phase 0 raises all phone/coarse composer hit areas to 44px.
|
|
459
461
|
assert.match(css, /\.composer-row button \{\n\s+width:\s*100%;\n\s+min-height:\s*44px/, "mobile composer buttons should retain compact layout with 44px footer hit areas");
|
|
460
462
|
assert.match(css, /\.composer-abort-button,\n\.composer-row button\.primary \{[\s\S]*?min-width:/, "Abort and Send should share stable bottom-row sizing");
|
|
461
|
-
assert.match(css, /\.composer-abort-button\.long-pressing::after[\s\S]*?animation:\s*abort-long-press-fill var\(--abort-long-press-duration,
|
|
463
|
+
assert.match(css, /\.composer-abort-button\.long-pressing::after[\s\S]*?animation:\s*abort-long-press-fill var\(--abort-long-press-duration, 1200ms\) linear forwards/, "Abort should expose a visible long-press progress affordance");
|
|
462
464
|
assert.match(css, /body\.mobile-composer-disclosure \.composer-row \{[\s\S]*?grid-template-columns:\s*repeat\(5, minmax\(0, 1fr\)\)/, "mobile composer should reserve one compact row for primary run controls");
|
|
463
465
|
assert.match(css, /body\.mobile-composer-disclosure\.pi-run-active:not\(\.mobile-keyboard-open\) \.composer-row > #abortButton \{ order:\s*1; \}[\s\S]*?#steerButton \{ order:\s*2; \}[\s\S]*?#followUpButton \{ order:\s*3; \}[\s\S]*?\.composer-actions-button \{ order:\s*4; \}[\s\S]*?#sendButton \{ order:\s*5; \}/, "active mobile runs should keep Abort, Steer, Follow-up, More, and Send on one ordered row");
|
|
464
466
|
assert.match(css, /#promptInput \{[\s\S]*?min-height:\s*calc\(1\.5em \+ 1\.8rem\)/, "prompt input should default to a compact single-line height");
|
|
465
|
-
assert.match(css, /#promptInput \{[\s\S]*?overflow-y:\s*
|
|
467
|
+
assert.match(css, /#promptInput \{[\s\S]*?overflow-y:\s*auto/, "prompt input should auto-grow to a bounded height and then scroll vertically");
|
|
466
468
|
assert.match(css, /\.composer-context-tags \{[\s\S]*?top:\s*-0\.48rem;[\s\S]*?left:\s*0\.75rem;/, "busy prompt behavior and skill tags should sit at the top-left of the input frame");
|
|
467
469
|
assert.match(css, /\.composer-context-tags \{[^}]*width:\s*calc\(100% - 4\.5rem\);[^}]*min-width:\s*0;[^}]*pointer-events:\s*none;/, "context tags should claim the available prompt-frame width while leaving empty overlay space clickable through to the prompt");
|
|
468
470
|
assert.match(css, /\.composer-busy-mode-tag,[\s\S]*?\.composer-workflow-mode-chip \{\s*pointer-events:\s*auto;/, "interactive context chips should remain clickable through the pointer-transparent full-width overlay");
|
|
@@ -558,7 +560,7 @@ assert.match(css, /body\.subagent-terminal-active \.workspace-dashboard,[\s\S]*b
|
|
|
558
560
|
assert.match(css, /\.subagent-run-indicator[\s\S]*\.subagent-run-indicator \.run-indicator-meta/, "subagent output should reuse the main live run-indicator treatment with wrapping activity metadata");
|
|
559
561
|
assert.match(css, /\.subagent-terminal-transcript > \.message \{[\s\S]*width: 100%;[\s\S]*max-width: none;/, "dedicated subagent transcript cards should fill the available tab width");
|
|
560
562
|
assert.doesNotMatch(css, /\.extension-dialog\.subagent-overlay-dialog/, "subagent output should not retain blocking dialog styles");
|
|
561
|
-
assert.match(css, /\.subagent-
|
|
563
|
+
assert.match(css, /\.subagent-state-dot\.running \{[\s\S]*?background: var\(--ctp-yellow\);[\s\S]*?animation: subagent-running-pulse/, "running subagents should expose a blinking yellow activity indicator");
|
|
562
564
|
assert.match(css, /@keyframes subagent-running-pulse/, "running subagents should expose a live activity animation");
|
|
563
565
|
assert.match(css, /\.optional-feature-pill\.enabled/, "optional features should visually distinguish enabled state");
|
|
564
566
|
assert.match(css, /\.todo-widget \{[\s\S]*?display:\s*grid/, "todo-progress widget should render as a styled checklist card");
|
|
@@ -633,7 +635,7 @@ assert.match(css, /\.terminal-tabs-toggle-button \{ display: none; \}/, "termina
|
|
|
633
635
|
assert.match(html, /id="terminalTabsDrawerContent"[^>]*aria-label="Terminal navigation"[\s\S]*class="terminal-sidebar-actions"[^>]*aria-label="Tab and workspace actions"[\s\S]*id="closeAllTabsButton"/, "mobile terminal disclosure should group canonical tabs and workspace actions in one labelled drawer");
|
|
634
636
|
assert.match(html, /id="terminalTabsBackdrop"[^>]*aria-label="Close terminal navigation"[^>]*hidden/, "mobile terminal drawer should expose an accessible backdrop close target");
|
|
635
637
|
assert.match(css, /\.command-palette-close-button \{[\s\S]*?min-width:\s*44px;[\s\S]*?min-height:\s*44px/, "command palette close button should meet touch-target sizing by default");
|
|
636
|
-
assert.match(css, /@media \(max-width: 720px\) \{[\s\S]*?\.command-palette-dialog \{[\s\S]*?width:\s*min\(100vw - 0\.5rem, 42rem\)[\s\S]*?\.command-palette-list \{[\s\S]*?align-content:\s*start;[\s\S]*?grid-auto-rows:\s*max-content;[\s\S]*?scrollbar-gutter:\s*auto;[\s\S]*?\.command-palette-item \{[\s\S]*?grid-template-columns:\s*minmax\(3\.4rem, 0\.26fr\) minmax\(0, 1fr\);[\s\S]*?min-height:\s*
|
|
638
|
+
assert.match(css, /@media \(max-width: 720px\) \{[\s\S]*?\.command-palette-dialog \{[\s\S]*?width:\s*min\(100vw - 0\.5rem, 42rem\)[\s\S]*?\.command-palette-list \{[\s\S]*?align-content:\s*start;[\s\S]*?grid-auto-rows:\s*max-content;[\s\S]*?scrollbar-gutter:\s*auto;[\s\S]*?\.command-palette-item \{[\s\S]*?grid-template-columns:\s*minmax\(3\.4rem, 0\.26fr\) minmax\(0, 1fr\);[\s\S]*?min-height:\s*3rem;/, "mobile command palette results should keep text-height rows and use compact two-column cards");
|
|
637
639
|
assert.match(css, /@media \(max-width: 720px\) \{[\s\S]*?\.command-palette-item-kind \{[\s\S]*?font-size:\s*var\(--text-xs\);[\s\S]*?\.command-palette-item-label \{ font-size:\s*0\.82rem; \}[\s\S]*?\.command-palette-item-description \{ font-size:\s*var\(--text-xs\); \}/, "mobile command palette result text should respect the typography floor");
|
|
638
640
|
assert.match(css, /body\.terminal-tabs-left \.chat-panel \{[\s\S]*?grid-template-columns:\s*minmax\(13rem, var\(--terminal-tabs-sidebar-width\)\) minmax\(0, 1fr\)/, "terminal tabs left layout should split the chat panel into a resizable sidebar and transcript area");
|
|
639
641
|
assert.match(css, /body\.terminal-tabs-left \.terminal-tabs-shell \{[\s\S]*?grid-column:\s*1;[\s\S]*?grid-row:\s*1 \/ -1;[\s\S]*?flex-direction:\s*column/, "terminal tabs left layout should turn the top tab strip into a vertical sidebar");
|
|
@@ -712,7 +714,7 @@ assert.match(app, /"Resolve with agent"[\s\S]*api\("\/api\/git-operation\/resolv
|
|
|
712
714
|
assert.match(server, /function gitConflictResolutionAgentPrompt\(operation\)[\s\S]*Conflicted files:[\s\S]*Do not continue, skip, abort, commit, reset, or push[\s\S]*diff-filter=U is empty/, "server should build a bounded conflict handoff with operation safety and verification instructions");
|
|
713
715
|
assert.match(server, /"\/api\/git-operation\/resolve-with-agent"[\s\S]*openGitConflictResolutionAgentTab\(tab\)/, "server should expose conflict-resolution agent tab creation through the git operation routes");
|
|
714
716
|
assert.match(app, /async function pullGitChangesDialog\(\)[\s\S]*api\("\/api\/git-changes\/pull", \{ method: "POST"/, "git changes modal should post to the pull endpoint from the Pull button");
|
|
715
|
-
assert.match(app, /async function pullGitFooterSync\(tabId = activeTabId\)[\s\S]*api\("\/api\/git-changes\/pull", \{ method: "POST", body: \{ remote: "origin" \}, tabId \}\)[\s\S]*requestGitFooterWebuiPayload\(tabContext, \{ force: true \}\)/, "incoming-only footer Sync should pull directly from origin and refresh the footer payload");
|
|
717
|
+
assert.match(app, /async function pullGitFooterSync\(tabId = activeTabId, \{ syncValue = "" \} = \{\}\)[\s\S]*api\("\/api\/git-changes\/pull", \{ method: "POST", body: \{ remote: "origin" \}, tabId \}\)[\s\S]*requestGitFooterWebuiPayload\(tabContext, \{ force: true \}\)/, "incoming-only footer Sync should pull directly from origin and refresh the footer payload");
|
|
716
718
|
assert.doesNotMatch(app.match(/async function pullGitFooterSync[\s\S]*?\n\}/)?.[0] || "", /git-workflow\/push|appConfirmText/, "the direct footer pull path should neither push nor open a confirmation");
|
|
717
719
|
assert.match(html, /id="gitPullErrorDialog"[\s\S]*aria-labelledby="gitPullErrorDialogTitle"[\s\S]*id="gitPullErrorOutput"[\s\S]*id="gitPullErrorRecovery"[^>]*hidden[\s\S]*id="gitPullErrorReviewButton"[\s\S]*id="gitPullErrorRebaseButton"[\s\S]*id="gitPullErrorMergeButton"[\s\S]*id="gitPullErrorCopyButton"[\s\S]*id="gitPullErrorCloseButton"/, "footer pull failures should use a labelled native dialog with review, rebase, merge, copy, and close actions");
|
|
718
720
|
assert.match(css, /\.extension-dialog\.git-pull-error-dialog[\s\S]*\.git-pull-error-output \{[\s\S]*user-select: text;[\s\S]*white-space: pre-wrap;[\s\S]*\.git-pull-error-recovery-actions \{[\s\S]*flex-wrap: wrap;/, "Git pull error output and recovery actions should remain readable, selectable, and responsive");
|
|
@@ -980,9 +982,9 @@ assert.match(css, /\.release-dialog-danger \{ color: var\(--ctp-red\); \}/, "rel
|
|
|
980
982
|
assert.match(app, /const MOBILE_VIEW_QUERY = "\(max-width: 720px\), \(max-device-width: 720px\), \(pointer: coarse\) and \(hover: none\)"/, "mobile detection should include phones that report desktop-like layout widths");
|
|
981
983
|
assert.match(app, /const SIDE_PANEL_OVERLAY_QUERY = "\(max-width: 1050px\), \(max-device-width: 720px\), \(pointer: coarse\) and \(hover: none\)"/, "side-panel overlay mode should also activate at the stacked narrow layout breakpoint");
|
|
982
984
|
assert.match(app, /function isSidePanelOverlayView\(\)[\s\S]*sidePanelOverlayMedia\?\.matches/, "side-panel overlay detection should be separate from full mobile mode");
|
|
983
|
-
assert.match(app, /const showBackdrop = !collapsed &&
|
|
985
|
+
assert.match(app, /const overlay = isControlDeckOverlayPresentation\(\);[\s\S]*?const showBackdrop = !collapsed && overlay;/, "side-panel backdrop should show for the overlay presentation, not only phone layouts");
|
|
984
986
|
// Intent preserved for legacy; v2 suppresses this legacy surface writer.
|
|
985
|
-
assert.match(app, /function restoreSidePanelState\(\) \{\n\s+if \(isMobileShellV2Active\(\)\) return;\n\s+if \(
|
|
987
|
+
assert.match(app, /function restoreSidePanelState\(\) \{\n\s+if \(isMobileShellV2Active\(\)\) return;\n\s+if \(isControlDeckOverlayPresentation\(\)\) \{\n\s+setSidePanelCollapsed\(true, \{ persist: false \}\);/, "legacy side-panel should start collapsed in narrow overlay mode");
|
|
986
988
|
assert.match(app, /function bindSidePanelOverlayViewChanges\(\)/, "side-panel overlay breakpoint changes should be monitored separately from full mobile changes");
|
|
987
989
|
assert.match(app, /if \(isSidePanelOverlayView\(\) && !document\.body\.classList\.contains\("side-panel-collapsed"\)\)/, "Escape should close the side-panel overlay at narrow widths");
|
|
988
990
|
assert.match(app, /const THEME_STORAGE_KEY = "pi-webui-theme"/, "theme selection should be persisted in browser storage");
|
|
@@ -1087,7 +1089,7 @@ assert.match(app, /function setOptionsMenuOpen\(open\)[\s\S]*scheduleMobileDropd
|
|
|
1087
1089
|
assert.match(app, /function focusPromptInput\(\{ defer = false \} = \{\}\)/, "frontend should focus the prompt composer programmatically after tab/app startup");
|
|
1088
1090
|
assert.match(app, /async function switchTab\(tabId\)[\s\S]*?restoreActiveDraft\(\);\n\s+focusPromptInput\(\{ defer: true \}\);/, "switching to a newly opened tab should focus the prompt input immediately");
|
|
1089
1091
|
assert.match(app, /async function initializeTabs\(\)[\s\S]*?restoreActiveDraft\(\);[\s\S]*if \(!loadedTabs\.length\)[\s\S]*focusPromptInput\(\{ defer: true \}\);/, "starting the Web UI should prompt for cwd when needed and focus active tabs");
|
|
1090
|
-
assert.match(app, /resizePromptInput\(\);\nclearRemovedSidePanelSectionHeightState\(\);\nrestoreDurableUiLayoutPendingJournal\(\);\nrestoreSidePanelWidthPreference\(\);\nrestoreFileViewerWidthPreference\(\);\nfocusPromptInput\(\{ defer: true \}\);\nrestoreStoredSkillUsage\(\);\nrestoreBusyPromptBehaviorSetting\(\);\nupdateComposerModeButtons\(\);/, "startup should clear retired section-height state, restore resizable panel preferences, request prompt focus, and restore skill tags before waiting for tab state refreshes");
|
|
1092
|
+
assert.match(app, /resizePromptInput\(\);\nclearRemovedSidePanelSectionHeightState\(\);\nrestoreDurableUiLayoutPendingJournal\(\);\nrestoreSidePanelWidthPreference\(\);\nrestoreFileViewerWidthPreference\(\);\nrestoreTerminalTabsSidebarWidthPreference\(\);\nfocusPromptInput\(\{ defer: true \}\);\nrestoreStoredSkillUsage\(\);\nrestoreBusyPromptBehaviorSetting\(\);\nsyncMobileComposerDisclosureLayout\(\);\nupdateComposerModeButtons\(\);/, "startup should clear retired section-height state, restore resizable panel preferences, request prompt focus, and restore skill tags before waiting for tab state refreshes");
|
|
1091
1093
|
assert.match(app, /elements\.promptInput\.addEventListener\("focus", \(\) => \{\n\s+syncMobileChatToBottomForInput\(\);/, "focusing mobile input should scroll output to bottom");
|
|
1092
1094
|
assert.match(app, /navigator\.serviceWorker\.register\("\/service-worker\.js"\)/, "PWA service worker should be registered by the app");
|
|
1093
1095
|
assert.match(app, /function serverStartCommandText\(\)[\s\S]*return `pi-webui\$\{currentPortArg\(\)\}`/, "PWA/offline shell should build a pathless pi-webui recovery command");
|
|
@@ -1159,13 +1161,13 @@ assert.match(
|
|
|
1159
1161
|
);
|
|
1160
1162
|
assert.match(
|
|
1161
1163
|
app,
|
|
1162
|
-
/
|
|
1163
|
-
"side-panel
|
|
1164
|
+
/function restoreSidePanelSectionState\(\) \{[\s\S]*?setSidePanelSectionCollapsed\(record, collapsedIds \? collapsedIds\.has\(record\.id\) : true, \{ persist: false \}\);/,
|
|
1165
|
+
"side-panel sections should restore independently from the persisted collapsed set and default to collapsed",
|
|
1164
1166
|
);
|
|
1165
1167
|
assert.match(
|
|
1166
1168
|
app,
|
|
1167
|
-
/
|
|
1168
|
-
"side-panel section toggles should
|
|
1169
|
+
/setSidePanelSectionCollapsed\(record, !record\.section\.classList\.contains\("collapsed"\)\);/,
|
|
1170
|
+
"side-panel section toggles should open and close each section independently",
|
|
1169
1171
|
);
|
|
1170
1172
|
assert.match(app, /function renderCodexUsage\(\)/, "frontend should render Codex usage buckets in the side panel");
|
|
1171
1173
|
assert.match(app, /function renderSubagents\(\)[\s\S]*subagentTabsWithRunningAgents\(\)[\s\S]*totalGates[\s\S]*renderSubagentTabGroup\(tab\)/, "frontend should group running subagents and retained retry gates by terminal and session");
|
|
@@ -1192,7 +1194,7 @@ assert.deepEqual(JSON.parse(JSON.stringify(workflowCountContext.workflowAgents(s
|
|
|
1192
1194
|
assert.deepEqual(JSON.parse(JSON.stringify(workflowCountContext.workflowCounts([syntheticWorkflowRun]))), { total: 1, running: 1, stale: 0 }, "workflow controllers should be count-neutral while their children retain lifecycle counts");
|
|
1193
1195
|
assert.equal(workflowCountContext.isWorkflowController(syntheticWorkflowRun, { name: "workflow", launcher: "pi-subagents", model: "provider/real-model", thinking: "high" }), false, "a real model-powered agent named workflow must remain an agent row");
|
|
1194
1196
|
assert.match(workflowRenderSource, /const status = subagentWorkflowPresentationStatus\(run, agents\);[\s\S]*make\("details", `subagent-workflow[\s\S]*details\.open = !collapsedSubagentWorkflowRunKeys\.has\(key\)[\s\S]*make\("summary", "subagent-workflow-header"\)[\s\S]*renderSubagentAgent\(tab, entry\.run, entry\.agent\)/, "workflow controllers should render as stateful native disclosure headers using the aggregate lifecycle while preserving each child run");
|
|
1195
|
-
assert.match(compactSubagentAgentSource, /const \[model, thinking\] = subagentExecutionValues\(agent\)[\s\S]*identity\.append\([\s\S]*"subagent-agent-name", name[\s\S]*"subagent-agent-inline-meta", `· \$\{model\} · \$\{thinking\}`[\s\S]*row\.append\(dot, identity
|
|
1197
|
+
assert.match(compactSubagentAgentSource, /const \[model, thinking\] = subagentExecutionValues\(agent\)[\s\S]*identity\.append\([\s\S]*"subagent-agent-name", name[\s\S]*"subagent-agent-inline-meta", `· \$\{status\} · \$\{model\} · \$\{thinking\}`[\s\S]*row\.append\(dot, identity\)/, "side-panel agent rows should show type, provider\/model, and thinking effort on one compact line");
|
|
1196
1198
|
assert.doesNotMatch(compactSubagentAgentSource, /subagent-agent-meta|subagentExecutionFacts|subagentSourceLabel|subagentRunElapsed|currentTool/, "side-panel agent rows should leave all other execution metadata to the selected subagent view");
|
|
1197
1199
|
assert.doesNotMatch(compactSubagentRunSource, /subagent-run-(?:header|title|meta|state)|`Run \$\{/, "side-panel run groups should not repeat IDs, metadata headers, or state badges");
|
|
1198
1200
|
assert.match(compactSubagentRunSource, /Dismiss finished run[\s\S]*dismissSubagentRun\(tab, run\)/, "compact terminal subagent runs should retain their dismiss action");
|
|
@@ -1225,12 +1227,12 @@ assert.doesNotMatch(closeSubagentTerminalGroupSource, /cancel|\/api\/subagents/,
|
|
|
1225
1227
|
assert.match(css, /\.subagent-tab-title \{[\s\S]*container-type: inline-size;[\s\S]*flex: 1 1 0;[\s\S]*min-width: 0;[\s\S]*\.subagent-tab-title strong \{[\s\S]*font-size: clamp\(0\.64rem, calc\(0\.5rem \+ 0\.65cqi\), 0\.78rem\);[\s\S]*\.subagent-tab-count \{[\s\S]*flex: 0 0 auto;[\s\S]*white-space: nowrap;/, "subagent titles should scale with their available inline width while summary badges stay fixed and text can still truncate");
|
|
1226
1228
|
assert.match(css, /\.subagent-agent-list \{[\s\S]*gap: 0\.16rem;[\s\S]*\.subagent-agent-row \{[\s\S]*min-height: 1\.75rem;[\s\S]*background: transparent;[\s\S]*\.subagent-agent-identity \{[\s\S]*display: flex;[\s\S]*white-space: nowrap;[\s\S]*\.subagent-agent-inline-meta \{[\s\S]*text-overflow: ellipsis;[\s\S]*white-space: nowrap;[\s\S]*\.subagent-run \{[\s\S]*grid-template-columns: minmax\(0, 1fr\) auto;[\s\S]*border: 0;/, "the inline subagent monitor should keep type, model, and effort in compact rows without overflow");
|
|
1227
1229
|
assert.match(css, /\.subagent-workflow \{[\s\S]*\.subagent-workflow-header \{[\s\S]*list-style: none;[\s\S]*\.subagent-workflow:not\(\[open\]\)[\s\S]*\.subagent-workflow-agents \{[\s\S]*border-left:/, "workflow disclosures should have a distinct collapsible header and visually nested child-agent section");
|
|
1228
|
-
assert.match(app, /function renderSubagentOverlayWidget\(\)[\s\S]*openSubagentCancelDialog\(tab, selection\.run, agent\)[\s\S]*subagent-overlay-cancel-action/, "running overlays should route cancel through the shared dialog");
|
|
1230
|
+
assert.match(app, /function renderSubagentOverlayWidget\(\)[\s\S]*openSubagentCancelDialog\(selection\.tab, selection\.run, agent\)[\s\S]*subagent-overlay-cancel-action/, "running overlays should route cancel through the shared dialog");
|
|
1229
1231
|
assert.match(app, /subagentTerminalCancelButton[\s\S]*openSubagentCancelDialog\(view\.tab \|\| \{ tabId: view\.parentTabId, tabTitle: view\.parentTitle \}, view\.run, view\.data\?\.agent \|\| view\.agent\)/, "running terminal headers should route cancel through the shared dialog");
|
|
1230
|
-
assert.match(app, /function openSubagentCancelDialog\(tab, run, agent = null\)[\s\S]*agentCount[\s\S]*The entire run will be stopped[\s\S]*subagentCancelDialog\.showModal\(\)[\s\S]*async function submitSubagentCancel\(\)[\s\S]*api\("\/api\/subagents\/cancel", \{[\s\S]*method: "POST",[\s\S]*scoped: false,[\s\S]*
|
|
1232
|
+
assert.match(app, /function openSubagentCancelDialog\(tab, run, agent = null\)[\s\S]*agentCount[\s\S]*The entire run will be stopped[\s\S]*subagentCancelDialog\.showModal\(\)[\s\S]*async function submitSubagentCancel\(\)[\s\S]*api\("\/api\/subagents\/cancel", \{[\s\S]*method: "POST",[\s\S]*scoped: false,[\s\S]*group: selection\.groupId,[\s\S]*runId: selection\.runId/, "the shared cancel dialog should honestly describe and submit whole-run cancellation with optional reason/note data");
|
|
1231
1233
|
assert.doesNotMatch(app, /body: \{\n\s+tab: selection\.tabId,\n\s+runId: selection\.runId,\n\s+\.\.\.\(selection\.agentId/, "the frontend must not imply unsupported per-agent cancellation in its request contract");
|
|
1232
|
-
assert.match(app, /async function dismissSubagentRun\(tab, run\)[\s\S]*api\("\/api\/subagents\/dismiss", \{[\s\S]*method: "POST",[\s\S]*scoped: false,[\s\S]*body: \{
|
|
1233
|
-
assert.match(app, /function finishedSubagentRunSelections\(data = latestSubagents\)[\s\S]*
|
|
1234
|
+
assert.match(app, /async function dismissSubagentRun\(tab, run\)[\s\S]*api\("\/api\/subagents\/dismiss", \{[\s\S]*method: "POST",[\s\S]*scoped: false,[\s\S]*body: \{ group: tab\.groupId, runId: run\.id \}/, "finished-run dismiss controls should call the owning group endpoint");
|
|
1235
|
+
assert.match(app, /function finishedSubagentRunSelections\(data = latestSubagents\)[\s\S]*subagentRunIsTerminal\(run\) && subagentRunCanDismiss\(run\)[\s\S]*async function clearFinishedSubagentRuns\(\{ automatic = false \} = \{\}\)[\s\S]*for \(const selection of selections\)[\s\S]*api\("\/api\/subagents\/dismiss", \{[\s\S]*body: \{ group: selection\.groupId, runId: selection\.runId \}[\s\S]*subagentsClearFinishedButton\.disabled = subagentsLoading \|\| subagentsClearingFinished \|\| finishedRuns\.length === 0/, "clear-finished should dismiss visible terminal ordinary runs while preserving retry-gated, active, and workflow runs");
|
|
1234
1236
|
assert.match(app, /subagentsAutoClearButton\?\.addEventListener\("click", \(\) => \{[\s\S]*setSubagentAutoClearEnabled\(!subagentAutoClearEnabled, \{ announce: true \}\)/, "the Auto-Clear button should toggle the selected browser preference");
|
|
1235
1237
|
assert.match(app, /SUBAGENT_AUTO_CLEAR_STORAGE_KEY = "pi-webui-subagent-auto-clear"[\s\S]*function readStoredSubagentAutoClearEnabled\(\)[\s\S]*localStorage\.getItem\(SUBAGENT_AUTO_CLEAR_STORAGE_KEY\) === "1"[\s\S]*function setSubagentAutoClearEnabled[\s\S]*clearFinishedSubagentRuns\(\{ automatic: true \}\)[\s\S]*restoreSubagentAutoClearSetting\(\)/, "Auto-Clear should persist per browser and immediately clear already-finished ordinary runs when selected");
|
|
1236
1238
|
assert.match(app, /async function refreshSubagents\(\)[\s\S]*refreshed = true[\s\S]*refreshed && subagentAutoClearEnabled && finishedSubagentRunSelections\(\)\.length[\s\S]*await clearFinishedSubagentRuns\(\{ automatic: true \}\)/, "successful overview refreshes should await guarded auto-clear when terminal runs appear");
|
|
@@ -1253,6 +1255,12 @@ const clearFinishedContext = {
|
|
|
1253
1255
|
const gatedRunIds = new Set((tab.gates || []).flatMap((gate) => (gate.attempts || []).map((attempt) => attempt.runId)));
|
|
1254
1256
|
return (tab.runs || []).filter((run) => !gatedRunIds.has(run.id));
|
|
1255
1257
|
},
|
|
1258
|
+
// Mirror the production overview shape: one group per tab with `groupId: tab:<id>` and ungated display runs.
|
|
1259
|
+
subagentOverviewGroups(data) {
|
|
1260
|
+
return (data?.tabs || []).map((tab) => ({ ...tab, groupId: `tab:${tab.tabId}`, displayRuns: clearFinishedContext.ungatedSubagentRuns(tab) }));
|
|
1261
|
+
},
|
|
1262
|
+
subagentRunIsTerminal(run) { return ["done", "failed", "cancelled"].includes(run?.status); },
|
|
1263
|
+
subagentRunCanDismiss(run) { return clearFinishedContext.subagentRunIsTerminal(run) && run?.source !== "workflow"; },
|
|
1256
1264
|
subagentsClearingFinished: false,
|
|
1257
1265
|
subagentsLoading: false,
|
|
1258
1266
|
refreshSubagentsTimer: null,
|
|
@@ -1266,9 +1274,9 @@ const clearFinishedContext = {
|
|
|
1266
1274
|
vm.runInNewContext(`${app.slice(clearFinishedSourceStart, clearFinishedSourceEnd)}\nthis.runClearFinishedSubagentRuns = clearFinishedSubagentRuns;`, clearFinishedContext);
|
|
1267
1275
|
await clearFinishedContext.runClearFinishedSubagentRuns();
|
|
1268
1276
|
assert.deepEqual(JSON.parse(JSON.stringify(clearFinishedCalls)), [
|
|
1269
|
-
{ path: "/api/subagents/dismiss", options: { method: "POST", scoped: false, body: {
|
|
1270
|
-
{ path: "/api/subagents/dismiss", options: { method: "POST", scoped: false, body: {
|
|
1271
|
-
{ path: "/api/subagents/dismiss", options: { method: "POST", scoped: false, body: {
|
|
1277
|
+
{ path: "/api/subagents/dismiss", options: { method: "POST", scoped: false, body: { group: "tab:tab-a", runId: "done-a" } } },
|
|
1278
|
+
{ path: "/api/subagents/dismiss", options: { method: "POST", scoped: false, body: { group: "tab:tab-b", runId: "failed-b" } } },
|
|
1279
|
+
{ path: "/api/subagents/dismiss", options: { method: "POST", scoped: false, body: { group: "tab:tab-b", runId: "cancelled-b" } } },
|
|
1272
1280
|
], "clear-finished should call the existing dismiss endpoint only for visible terminal ordinary runs");
|
|
1273
1281
|
assert.equal(clearFinishedRefreshes, 1, "clear-finished should refresh the overview once after all dismissals");
|
|
1274
1282
|
assert.equal(clearFinishedContext.subagentsClearingFinished, false, "clear-finished should always release its in-flight guard");
|
|
@@ -1276,7 +1284,7 @@ assert.deepEqual(clearFinishedEvents, [{ message: "cleared 3 finished subagent r
|
|
|
1276
1284
|
clearFinishedContext.latestSubagents = { tabs: [{ tabId: "tab-c", runs: [{ id: "done-c", status: "done", source: "async" }] }] };
|
|
1277
1285
|
await clearFinishedContext.runClearFinishedSubagentRuns({ automatic: true });
|
|
1278
1286
|
assert.deepEqual(clearFinishedEvents.at(-1), { message: "auto-cleared 1 finished subagent run", level: "info" }, "automatic clearing should identify its action without changing terminal-run selection semantics");
|
|
1279
|
-
assert.match(app, /function materializeRetainedSubagentTerminalViews\(\)[\s\S]*restoreKey = `\$\{tab\.tabId\}\\u0000\$\{tab\.sessionFile[\s\S]*
|
|
1287
|
+
assert.match(app, /function materializeRetainedSubagentTerminalViews\(\)[\s\S]*subagentOverviewGroups\(\)[\s\S]*restoreKey = `\$\{tab\.tabId\}\\u0000\$\{tab\.sessionFile[\s\S]*tab\.displayRuns[\s\S]*\["queued", "running", "stale"\]\.includes\(subagentAgentStatus\(run\)\)[\s\S]*ensureSubagentTerminalView/, "terminal mode should materialize only ungated restored retained agent views once per parent session identity without touching overlay mode");
|
|
1280
1288
|
assert.match(app, /from "\.\/subagent-launch-slot-state\.mjs"[\s\S]*function renderSubagentLaunchSlots\(\)[\s\S]*function loadSubagentLaunchSlotConfig\([\s\S]*\/api\/subagents\/config/, "launch-slot configuration should have its own browser state and API loader");
|
|
1281
1289
|
assert.match(app, /function subagentLaunchSlotThinkingForModel\(model\)[\s\S]*modelThinkingLevels/, "launch-slot thinking choices should come from the selected model metadata");
|
|
1282
1290
|
assert.match(app, /function renderSubagentLaunchSlotCard\(role, slots\)[\s\S]*Default \/ inherit[\s\S]*"Add slot"[\s\S]*Remove/, "role cards should render independent same-role slots and inheritance controls");
|
|
@@ -1289,7 +1297,7 @@ const subagentGateTargetSource = appFunctionSource("subagentGateAttemptTarget",
|
|
|
1289
1297
|
const subagentGateExecutionSource = appFunctionSource("subagentGateAttemptExecutionValues", "openSubagentGateAttemptOutput");
|
|
1290
1298
|
const subagentGateOpenSource = appFunctionSource("openSubagentGateAttemptOutput", "renderSubagentGateAttempt");
|
|
1291
1299
|
const subagentGateAttemptSource = appFunctionSource("renderSubagentGateAttempt", "renderSubagentGate");
|
|
1292
|
-
assert.match(subagentGateTargetSource, /candidate\?\.id === attempt\.runId[\s\S]*candidate\?\.name === attempt\.agent[\s\S]*agents\.length === 1[\s\S]*return agent\?\.id \? \{ run, agent \} : null/, "retry-gate attempts should resolve their ordinary tracked child run and agent");
|
|
1300
|
+
assert.match(subagentGateTargetSource, /candidate\?\.id === attempt\.runId[\s\S]*candidate\?\.name === attempt\.agent[\s\S]*agents\.length === 1[\s\S]*return agent\?\.id && subagentRunCanOpen\(run, agent\) \? \{ run, agent \} : null/, "retry-gate attempts should resolve their ordinary tracked child run and agent");
|
|
1293
1301
|
assert.match(subagentGateExecutionSource, /SETTINGS_THINKING_OPTIONS\.includes\(suffix\)[\s\S]*model = model\.slice\(0, suffixIndex\)[\s\S]*model = `\$\{provider\}\/\$\{model\}`/, "compact gate rows should normalize provider, model, and thinking effort");
|
|
1294
1302
|
assert.match(subagentGateAttemptSource, /const target = subagentGateAttemptTarget\(tab, attempt\)[\s\S]*subagentGateAttemptExecutionValues\(attempt\)[\s\S]*attempt\?\.status[\s\S]*retrySafety[\s\S]*subagent-gate-attempt-open/, "compact gate rows should retain title, state, provider\/model, thinking effort, type, and open affordance");
|
|
1295
1303
|
assert.doesNotMatch(subagentGateAttemptSource, /attempt\?\.phase|failureKind|attempt\?\.error|`run \$\{attempt/, "compact gate rows should move verbose diagnostics out of the side panel");
|
|
@@ -1298,11 +1306,12 @@ assert.match(app, /function subagentGateAttemptViewFacts\(attempt\)[\s\S]*gate a
|
|
|
1298
1306
|
assert.match(app, /function openSubagentOverlay\(tab, run, agent\)[\s\S]*gateAttempt: run\.gateAttempt \|\| null[\s\S]*function ensureSubagentTerminalView\(tab, run, agent\)[\s\S]*gateAttempt: run\.gateAttempt \|\| null/, "overlay and terminal child views should retain gate diagnostics");
|
|
1299
1307
|
assert.match(app, /function renderSubagentGate\(tab, gate\)[\s\S]*renderSubagentGateAttempt\(tab, attempt\)/, "retry-gate rendering should retain the owning parent tab needed to open child output");
|
|
1300
1308
|
assert.match(css, /button\.subagent-gate-attempt \{ cursor: pointer; \}[\s\S]*button\.subagent-gate-attempt:hover,[\s\S]*button\.subagent-gate-attempt:focus-visible[\s\S]*\.subagent-gate-attempt-open/, "openable retry-gate attempts should expose button hover, keyboard-focus, and arrow affordances");
|
|
1301
|
-
const subagentGateTargetContext = {};
|
|
1309
|
+
const subagentGateTargetContext = { subagentRunCanOpen: () => true };
|
|
1302
1310
|
vm.runInNewContext(`${subagentGateTargetSource}\nthis.resolveSubagentGateAttempt = subagentGateAttemptTarget;`, subagentGateTargetContext);
|
|
1303
1311
|
const gateTargetTab = {
|
|
1304
1312
|
tabId: "parent-tab",
|
|
1305
|
-
|
|
1313
|
+
groupId: "tab:parent-tab",
|
|
1314
|
+
displayRuns: [
|
|
1306
1315
|
{ id: "review-run", agents: [{ id: "review-agent", name: "reviewer" }, { id: "scout-agent", name: "scout" }] },
|
|
1307
1316
|
{ id: "single-run", agents: [{ id: "single-agent", name: "delegate" }] },
|
|
1308
1317
|
],
|
|
@@ -1320,7 +1329,7 @@ assert.match(extension, /registerSubagentGate\(pi\)[\s\S]*session_shutdown[\s\S]
|
|
|
1320
1329
|
assert.match(server, /function normalizeWebuiSubagentPayload\(value\)[\s\S]*model: normalizeWebuiSubagentText\(rawAgent\.model, 240\)[\s\S]*thinking: normalizeWebuiSubagentText\(rawAgent\.thinking, 40\)/, "server should bound model and reasoning metadata in the cross-tab overview");
|
|
1321
1330
|
assert.match(server, /WEBUI_SUBAGENT_GATE_LIMIT[\s\S]*rawGate\.attempts[\s\S]*failureKind: normalizeWebuiSubagentText\(rawAttempt\.failureKind, 80\)[\s\S]*totalGates/, "server should bound retry gates and expose their cross-tab total");
|
|
1322
1331
|
assert.match(server, /function normalizeWebuiSubagentOutput\(value, selection\)[\s\S]*model: normalizeWebuiSubagentText\(rawAgent\.model, 240\)[\s\S]*thinking: normalizeWebuiSubagentText\(rawAgent\.thinking, 40\)/, "server should preserve model and reasoning metadata in selected child output");
|
|
1323
|
-
assert.match(server, /function normalizeWebuiSubagentSource\(value\) \{[\s\S]
|
|
1332
|
+
assert.match(server, /function normalizeWebuiSubagentSource\(value\) \{[\s\S]*\["foreground", "workflow", "recovered"\]\.includes\(value\)[\s\S]*function normalizeWebuiSubagentPayload\(value\)[\s\S]*const source = normalizeWebuiSubagentSource\(rawRun\.source\)[\s\S]*function normalizeWebuiSubagentOutput\(value, selection\)[\s\S]*source: normalizeWebuiSubagentSource\(selection\.run\?\.source \|\| value\.source\)/, "server should preserve workflow source in overview and selected-output normalization");
|
|
1324
1333
|
assert.match(app, /function subagentExecutionValues\(agent = \{\}\)[\s\S]*model\.slice\(suffixIndex \+ 1\)\.toLowerCase\(\) === thinking\.toLowerCase\(\)[\s\S]*return \[model \|\| "unknown", thinking \|\| "unknown"\][\s\S]*function subagentExecutionFacts\(agent = \{\}\)[\s\S]*model \$\{model\}[\s\S]*reasoning \$\{thinking\}/, "subagent metadata should share honest model\/reasoning values, strip duplicate effort suffixes, and retain unknown fallbacks");
|
|
1325
1334
|
assert.match(app, /function subagentSourceLabel\(source = ""\) \{[\s\S]*source === "foreground" \|\| source === "workflow"[\s\S]*function subagentOverlayStateFacts\(data = subagentOverlayData\)[\s\S]*subagentSourceLabel\(data\?\.source \|\| run\.source\)[\s\S]*function renderSubagentTerminalView\(\)[\s\S]*subagentSourceLabel\(view\.data\?\.source \|\| view\.run\?\.source\)[\s\S]*function renderSubagentTerminalTab\(view, \{ groupItem = false \} = \{\}\)[\s\S]*subagentSourceLabel\(view\.data\?\.source \|\| view\.run\?\.source\)/, "one source-label helper should keep overlays and virtual tabs honest after inline metadata is removed");
|
|
1326
1335
|
assert.match(compactSubagentAgentSource, /subagentExecutionValues\(agent\)/, "Subagents side-panel rows should reuse the normalized model and reasoning values shown in selected output views");
|
|
@@ -1337,7 +1346,7 @@ assert.match(app, /const facts = \[[\s\S]*view\.finished \? "finished" : running
|
|
|
1337
1346
|
assert.match(app, /function renderSubagentTerminalView\(\)[\s\S]*if \(running\) appendSubagentRunIndicator\(elements\.subagentTerminalTranscript, \{ agent, run: view\.run \}\)/, "the dedicated child tab should append a live run indicator whenever the selected child is running");
|
|
1338
1347
|
const subagentTerminalSignatureSource = appFunctionSource("subagentTerminalViewMeaningfulSignature", "updateSubagentTerminalRefreshState");
|
|
1339
1348
|
const subagentTerminalRefreshSource = appFunctionSource("refreshSubagentTerminalView", "deactivateSubagentTerminalView");
|
|
1340
|
-
assert.ok(subagentTerminalRefreshSource.includes("
|
|
1349
|
+
assert.ok(subagentTerminalRefreshSource.includes("group: view.groupId, run: view.runId, agent: view.agentId"), "subagent terminal refresh should stay scoped to the child and its owning parent terminal");
|
|
1341
1350
|
assert.ok(subagentTerminalRefreshSource.includes("view.finished = true"), "an open child tab should retain its last snapshot after the run is no longer tracked");
|
|
1342
1351
|
assert.ok(subagentTerminalRefreshSource.includes("previousSignature !== subagentTerminalViewMeaningfulSignature(view)"), "automatic child polling should compare meaningful snapshots before rebuilding the transcript");
|
|
1343
1352
|
let unchangedSubagentRenderCount = 0;
|
|
@@ -1423,7 +1432,7 @@ assert.match(app, /api\("\/api\/subagents", \{ scoped: false \}\)/, "frontend sh
|
|
|
1423
1432
|
assert.match(app, /SUBAGENTS_ACTIVE_REFRESH_MS = 1500/, "running subagents should receive a fast live refresh cadence");
|
|
1424
1433
|
assert.match(server, /url\.pathname === "\/api\/subagents" && req\.method === "GET"[\s\S]*await webuiSubagentsData\(\)/, "server should await enriched cross-tab running-subagent titles");
|
|
1425
1434
|
assert.match(server, /async function resolveSubagentDisplayTitle\(tab\)[\s\S]*tab\.titleSource !== "auto"[\s\S]*get_messages[\s\S]*message\?\.role === "user"[\s\S]*generatedTabTitleFromPrompt\(extractSessionTextContent\(firstUserMessage\?\.content\)\)/, "existing auto-named subagent groups should recover their longer title from the first user message without relaunching children");
|
|
1426
|
-
assert.match(server, /const tabSummaries = await Promise\.all\([\s\S]*runs\.length \|\| gates\.length \? await resolveSubagentDisplayTitle\(tab\) : tab\.title/, "subagent title recovery should run once for visible run and retry-gate groups");
|
|
1435
|
+
assert.match(server, /const tabSummaries = await Promise\.all\([\s\S]*runs\.length \|\| gates\.length \|\| tab\.webuiAgentRuns\?\.instances\?\.length \? await resolveSubagentDisplayTitle\(tab\) : tab\.title/, "subagent title recovery should run once for visible run and retry-gate groups");
|
|
1427
1436
|
const resolveSubagentDisplayTitleStart = server.indexOf("async function resolveSubagentDisplayTitle(");
|
|
1428
1437
|
const resolveSubagentDisplayTitleEnd = server.indexOf("\nasync function webuiSubagentsData(", resolveSubagentDisplayTitleStart);
|
|
1429
1438
|
assert.ok(resolveSubagentDisplayTitleStart >= 0 && resolveSubagentDisplayTitleEnd > resolveSubagentDisplayTitleStart, "subagent display-title recovery should remain independently testable");
|
|
@@ -1443,7 +1452,7 @@ const legacyAutoNamedTab = { title: "Workspace files webui files section sidepan
|
|
|
1443
1452
|
assert.equal(await resolveSubagentDisplayTitleContext.runResolveSubagentDisplayTitle(legacyAutoNamedTab), recoveredSubagentTitle, "existing auto-named rows should recover the wider title from their parent conversation");
|
|
1444
1453
|
assert.equal(await resolveSubagentDisplayTitleContext.runResolveSubagentDisplayTitle(legacyAutoNamedTab), recoveredSubagentTitle, "recovered titles should remain available to later panel refreshes");
|
|
1445
1454
|
assert.equal(subagentTitleMessageReads, 1, "title recovery should read the existing parent conversation once and must not require spawning another subagent");
|
|
1446
|
-
assert.match(server, /url\.pathname === "\/api\/subagents\/output" && req\.method === "GET"[\s\S]*webuiSubagentOutputData\(
|
|
1455
|
+
assert.match(server, /url\.pathname === "\/api\/subagents\/output" && req\.method === "GET"[\s\S]*canonicalWebuiSubagentOutputData\(groupId, runId, agentId\)[\s\S]*webuiSubagentOutputData\(getRequestedTab\(req, url\), runId, agentId\)/, "server should expose selected running subagent output only through its owning group or tab");
|
|
1447
1456
|
assert.match(server, /rememberWebuiSubagentsStatusEvent\(tab, event\)/, "server should ingest the helper's structured subagent status without forwarding internal JSON to the browser footer");
|
|
1448
1457
|
assert.match(server, /PI_RPC_JSONL_LINE_MAX_BYTES = 32 \* 1024 \* 1024/, "Pi RPC JSONL parsing should use an explicit line-size limit with inline-image headroom");
|
|
1449
1458
|
assert.match(server, /function ensureStderrMirrorErrorHandler\(stream\)[\s\S]*stream\.on\("error"/, "Pi stderr mirroring should contain asynchronous closed-sink failures");
|
|
@@ -1457,7 +1466,7 @@ assert.match(helper, /SUBAGENT_ASYNC_STARTED_EVENT = "subagent:async-started"[\s
|
|
|
1457
1466
|
assert.match(helper, /pi\.on\("tool_execution_start"[\s\S]*event\.toolName !== "subagent"[\s\S]*pi\.on\("tool_execution_end"/, "Web UI helper should track foreground subagent executions");
|
|
1458
1467
|
assert.match(app, /if \(normalized === "prolite"\) return "Usage";/, "Codex Prolite plan labels should display as Usage in the side panel");
|
|
1459
1468
|
assert.match(app, /api\(`\/api\/codex-usage\$\{suffix\}`, \{ scoped: false \}\)/, "Codex usage should load through a server endpoint without browser credentials");
|
|
1460
|
-
assert.match(app, /restoreSidePanelSectionState\(\);\
|
|
1469
|
+
assert.match(app, /restoreSidePanelSectionState\(\);\n[\s\S]{0,200}?bindSidePanelSectionToggles\(\);/, "side panel section state should restore before toggles are bound");
|
|
1461
1470
|
assert.match(app, /OPTIONAL_FEATURES_STORAGE_KEY/, "optional feature disable toggles should persist in browser storage");
|
|
1462
1471
|
assert.match(app, /GIT_FOOTER_WEBUI_STATUS_KEY = "git-footer-webui"/, "git footer Web UI data should be received as an extension-owned status payload");
|
|
1463
1472
|
assert.match(html, /gitFooterVisibilityApplyButton[^>]*>Save globally</, "git footer visibility should state that applied choices persist globally");
|
|
@@ -1599,7 +1608,7 @@ assert.doesNotMatch(workspaceInfoSource, /runCommand\("git"|branchStatus|isRepo/
|
|
|
1599
1608
|
assert.match(app, /function renderOptionalFeatureDependentDisplays\(\)[\s\S]*renderOptionalFeatureControls\(\);[\s\S]*renderThemeSelect\(\);[\s\S]*renderWidgets\(\);[\s\S]*renderStatus\(\);[\s\S]*renderCommands\(\);[\s\S]*renderAllMessages\(\{ preserveScroll: true, forceRebuild: true \}\);[\s\S]*if \(streamRawText\) renderStreamingAssistantText\(\);/, "optional feature toggles should immediately refresh visible controls, commands, transcript, and live stream displays");
|
|
1600
1609
|
assert.match(app, /function setOptionalFeatureDisabled\(featureId, disabled\)[\s\S]*renderOptionalFeatureDependentDisplays\(\);[\s\S]*const tabContext = activeTabContext\(\);[\s\S]*refreshCommands\(tabContext\)/, "optional feature enable/disable should re-render the GUI and then refresh command capabilities");
|
|
1601
1610
|
assert.match(app, /function setOptionalControlState\(button, available, unavailableTitle\)[\s\S]*setAttribute\("aria-label", nextAriaLabel\)[\s\S]*setAttribute\("data-tooltip", nextTooltip\)/, "optional feature button disabled state should update accessible labels and visible tooltips");
|
|
1602
|
-
assert.match(app, /const hasGitWorkflow = isOptionalFeatureEnabled\("gitWorkflow"\)
|
|
1611
|
+
assert.match(app, /const hasGitWorkflow = isOptionalFeatureEnabled\("gitWorkflow"\);[\s\S]{0,400}?elements\.gitWorkflowButton\.hidden = !hasGitWorkflow && isOptionalFeatureDisabled\("gitWorkflow"\)/, "guided git workflow composer button should stay discoverable (disabled) when the package is missing and hide only when explicitly disabled");
|
|
1603
1612
|
assert.match(app, /elements\.publishButton\.hidden = !hasPublishWorkflow[\s\S]*elements\.nativeCommandMenuButton\.hidden = !hasNativeCommandMenu/, "optional publish and skills/tools menu buttons should be hidden when no enabled menu items are available");
|
|
1604
1613
|
assert.match(app, /\["skills", "tuiSkillsCommand"\][\s\S]*\["tools", "tuiToolsCommand"\]/, "optional feature toggles should gate /skills and /tools command surfaces");
|
|
1605
1614
|
assert.match(app, /function setNativeCommandMenuOpen\(open\)/, "frontend should track the skills/tools command menu open state separately from Publish");
|
|
@@ -1781,8 +1790,8 @@ assert.match(server, /\["short", "long", "input"\][\s\S]*cleanGitCommitMessageIn
|
|
|
1781
1790
|
assert.match(css, /\.git-workflow-message-input-row \{[\s\S]*flex:\s*1 1 100%/, "manual git workflow commit input should span the Message stage actions row");
|
|
1782
1791
|
assert.match(css, /\.git-workflow-actions button\[data-tooltip\]::after \{[\s\S]*content:\s*attr\(data-tooltip\)[\s\S]*white-space:\s*pre-line/, "guided git workflow action tooltips should render multiline step lists");
|
|
1783
1792
|
assert.match(app, /function gitBranchNamePromptMessage\(\)[\s\S]*hasAvailableCommand\("git-branch-name"\)[\s\S]*return "\/git-branch-name"/, "guided git workflow should ask the agent to generate PR branch names when the prompt is available");
|
|
1784
|
-
assert.match(app, /async function loadGitWorkflowBranchName\([\s\S]*gitWorkflowRequest\(
|
|
1785
|
-
assert.match(app, /async function createGitPrBranchWithSuggestion\([\s\S]*
|
|
1793
|
+
assert.match(app, /async function loadGitWorkflowBranchName\([\s\S]*generationId[\s\S]*gitWorkflowRequest\(`\/api\/git-workflow\/branch-name\$\{query\}`/, "guided git workflow should load exactly correlated generated branch names before branch creation");
|
|
1794
|
+
assert.match(app, /async function createGitPrBranchWithSuggestion\([\s\S]*appPromptText\(\{ title: "New PR branch worktree"[\s\S]*chooseGitWorktreeBase\(branch\)[\s\S]*assertGuidedGitStagedContentBinding\(tabId, "PR worktree creation"\)[\s\S]*gitWorkflowRequest\("\/api\/git-workflow\/branch", \{ body: \{ branch, baseRef, sessionMode: "fork-current", openTab: true, [\s\S]*expectedStagedContentHash/, "guided git worktrees should ask for a base ref before verifying and carrying staged content");
|
|
1786
1795
|
assert.match(app, /function syncGitWorkflowWorktreeTabs\(result\)[\s\S]*Array\.isArray\(result\?\.tabs\)[\s\S]*applyTabMetadata\(result\.tab\)/, "guided git workflow should merge worktree tab metadata returned by the branch endpoint");
|
|
1787
1796
|
assert.match(app, /const targetTabId = result\.tab\?\.id[\s\S]*setGitWorkflow\(nextState, \{ tabId: targetTabId \}\)[\s\S]*switchTab\(targetTabId\)/, "guided git workflow should transfer PR state to the opened worktree tab");
|
|
1788
1797
|
assert.match(app, /addGitWorkflowAction\("Push and Create PR", \(\) => pushAndCreatePrGitWorkflow\(\), "primary", false\)/, "guided git workflow should replace push with Push and Create PR in PR mode");
|
|
@@ -1804,8 +1813,9 @@ assert.doesNotMatch(app, /visibility = "(?:public|private)"/, "publication visib
|
|
|
1804
1813
|
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");
|
|
1805
1814
|
assert.match(app, /Pre-commit verification reminder[\s\S]*Continue with this commit/, "configured verification reminders should run before committing");
|
|
1806
1815
|
assert.match(server, /async function startGitWorkflowGeneration\([\s\S]*set_model[\s\S]*setThinkingLevelForTab[\s\S]*type: "prompt"/, "server should apply the configured generation profile before prompting Pi");
|
|
1807
|
-
assert.match(server, /event\?\.type
|
|
1808
|
-
assert.match(server, /
|
|
1816
|
+
assert.match(server, /function consumeGitWorkflowGenerationEvent\(tab, event[\s\S]*event\?\.type !== "agent_settled"[\s\S]*settleGitWorkflowGeneration\(tab, record, settlement\)/, "server should settle the owned Guided Git attempt only after agent settlement");
|
|
1817
|
+
assert.match(server, /async function finishGitWorkflowGeneration\(tab, record[\s\S]*restoreGitWorkflowGenerationProfile\(tab, record\)/, "server should restore the active tab model and effort after Guided Git generation finishes");
|
|
1818
|
+
assert.match(server, /case "\/api\/git-workflow\/branch-name": \{[\s\S]*generationId[\s\S]*readGitWorkflowBranchName\(cwd, \{ generationId/, "server should expose exactly correlated generated branch-name loading for the guided PR workflow");
|
|
1809
1819
|
assert.match(server, /case "\/api\/git-workflow\/branch":[\s\S]*createGitWorkflowBranchWorktree\(tab, body\)/, "server should route guided PR branch creation through worktree tabs");
|
|
1810
1820
|
assert.match(server, /async function createGitWorkflowBranchWorktree\(tab, body = \{\}\)[\s\S]*expectedStagedContentHashFromBody\(body\)[\s\S]*snapshotGitWorkflowBranchState\(root, tab\.cwd, expectedStagedContentHash\)[\s\S]*applyGitWorkflowBranchStateToWorktree\(snapshot, worktreePath\)[\s\S]*openWorktreeResultForTab\(tab, createdResult/, "guided PR worktree creation should verify and copy exact staged state before opening the worktree tab");
|
|
1811
1821
|
assert.match(server, /case "\/api\/git-workflow\/create-pr":[\s\S]*runGitHubWorkflowCommand\(\["pr", "create"/, "server should create PRs with the GitHub CLI after confirmation");
|
|
@@ -1816,7 +1826,7 @@ assert.match(app, /function renderAppRunnerWidget\(\)/, "frontend should render
|
|
|
1816
1826
|
assert.match(app, /function tabAppRunnerRunningRun\(tab\)[\s\S]*appRunnerIsRunning\(run\)/, "frontend should derive running app-runner state for terminal tab indicators");
|
|
1817
1827
|
assert.match(app, /function appendTerminalTabContent\(button, \{ title, indicator, meta, count = null, appRunnerRun = null, conversationModeActive = false,[^}]*\}\)[\s\S]*terminal-tab-app-runner-indicator/, "terminal tab content should render a visible app-runner badge");
|
|
1818
1828
|
assert.match(app, /function appendTerminalTabContent\(button,[\s\S]*terminal-tab-conversation-indicator/, "terminal tab content should render a visible Natural Conversation badge");
|
|
1819
|
-
assert.match(app, /function renderTerminalTab\(tab\)[\s\S]*conversation-mode-running/, "terminal tabs should indicate active Natural Conversation mode per tab");
|
|
1829
|
+
assert.match(app, /function renderTerminalTab\(tab, \{ showCwdAdd = false \} = \{\}\)[\s\S]*conversation-mode-running/, "terminal tabs should indicate active Natural Conversation mode per tab");
|
|
1820
1830
|
assert.match(css, /\.composer-conversation-mode-chip[\s\S]*\.composer-conversation-end-button/, "Natural Conversation composer controls should have dedicated styles");
|
|
1821
1831
|
assert.match(css, /\.composer\.conversation-mode-active[\s\S]*body\.conversation-mode-active \.composer::before/, "active Natural Conversation mode should visibly glow around the composer");
|
|
1822
1832
|
assert.match(css, /\.terminal-tab\.conversation-mode-running[\s\S]*\.terminal-tab-conversation-indicator/, "Natural Conversation tabs should have active-tab and badge styles");
|
|
@@ -1869,7 +1879,7 @@ assert.match(app, /function applyToolExecutionBubbleState\(bubble, message\)[\s\
|
|
|
1869
1879
|
assert.match(app, /function toolExecutionRenderSignature\(message\)[\s\S]*?normalizeToolExecution\(message\)[\s\S]*?toolRenderSignatureReplacer\(\)/, "tool cards should derive stable render signatures from normalized tool payloads");
|
|
1870
1880
|
assert.match(app, /const nextRenderSignature = toolExecutionRenderSignature\(message\)[\s\S]*?bubble\._toolRenderSignature === nextRenderSignature[\s\S]*?return true;[\s\S]*?bubble\._toolRenderSignature = nextRenderSignature/, "live tool card updates should skip identical body re-renders");
|
|
1871
1881
|
assert.match(app, /message\.role === "toolExecution"[\s\S]*?renderToolExecution\(body, message\);[\s\S]*?bubble\._toolRenderSignature = toolExecutionRenderSignature\(message\);/, "new tool cards should cache their initial render signature");
|
|
1872
|
-
assert.match(app, /applyToolExecutionUpdate: \(event\) => \{\s+if \(!compactOutputActive\(\)\) applyTranscriptToolExecutionUpdate\(event\);/, "live tool updates should enter the bounded transcript controller sink");
|
|
1882
|
+
assert.match(app, /applyToolExecutionUpdate: \(event\) => \{\s+if \(!compactOutputActive\(\) && !isIntercomTransportToolName\(event\?\.toolName\)\) applyTranscriptToolExecutionUpdate\(event\);/, "live tool updates should enter the bounded transcript controller sink");
|
|
1873
1883
|
assert.match(app, /function applyTranscriptToolExecutionUpdate\(event\)[\s\S]*?event\.partialResult[\s\S]*?renderLiveToolRun\(run, \{ scroll: false \}\)/, "coalesced tool_execution_update events should update transcript-visible tool cards in the controller frame");
|
|
1874
1884
|
assert.match(app, /function captureReusableToolCards\(\)[\s\S]*?\.message\.toolExecution\[data-tool-call-id\]/, "full transcript re-renders should capture existing tool cards before clearing the chat");
|
|
1875
1885
|
assert.match(app, /function appendMessage\(message,[\s\S]*?reusableToolCards = null[\s\S]*?reuseToolExecutionBubble\(reusableToolCards, message/, "message rendering should reuse matching tool cards instead of replacing them during refreshes");
|
|
@@ -1896,28 +1906,29 @@ assert.match(app, /function visibleThinkingText\(text\)[\s\S]*?trimmed === UNEXP
|
|
|
1896
1906
|
assert.match(app, /if \(isThinkingPart\) \{[\s\S]*?visibleThinkingText\(assistantThinkingText\(part\)\)[\s\S]*?if \(thinking\) displayMessages\.push/, "assistant transcript splitting should skip empty or unexposed thinking parts");
|
|
1897
1907
|
assert.match(app, /message\.role === "thinking"[\s\S]*?visibleThinkingText\(message\.thinking \|\| textFromContent\(message\.content\)\)[\s\S]*?if \(thinkingOutputVisible && thinkingText\) appendThinkingMarkdown\(body, thinkingText\);/, "thinking cards should suppress empty and provider no-thinking placeholder output while rendering visible reasoning as markdown");
|
|
1898
1908
|
assert.match(app, /function showStreamingThinking\(initialText = ""\)[\s\S]*?if \(initialText && !streamThinking\.textContent\) renderThinkingMarkdown\(streamThinking, initialText\);/, "live thinking should not create a visible placeholder card before content arrives");
|
|
1899
|
-
assert.match(app, /function setStreamingThinkingText\(text\)[\s\S]*?const thinking = visibleThinkingText\(text\);[\s\S]*?if \(!thinkingOutputVisible \|\| !thinking\) return false;[\s\S]*?return true;/, "live thinking text setters should ignore empty text instead of clearing or flashing the card");
|
|
1900
|
-
assert.match(app, /function syncStreamingThinkingFromUpdate\(event, update, \{ placeholder = "" \} = \{\}\)[\s\S]*?return setStreamingThinkingText\(streamThinkingRawText \|\| placeholder\);/, "incremental thinking sync should only report success after setting visible thinking text");
|
|
1909
|
+
assert.match(app, /function setStreamingThinkingText\(text, \{ complete = false \} = \{\}\)[\s\S]*?const thinking = visibleThinkingText\(text\);[\s\S]*?if \(!thinkingOutputVisible \|\| !thinking\) return false;[\s\S]*?return true;/, "live thinking text setters should ignore empty text instead of clearing or flashing the card");
|
|
1910
|
+
assert.match(app, /function syncStreamingThinkingFromUpdate\(event, update, \{ placeholder = "", render = true \} = \{\}\)[\s\S]*?return render \? setStreamingThinkingText\(streamThinkingRawText \|\| placeholder\) : true;/, "incremental thinking sync should only report success after setting visible thinking text");
|
|
1901
1911
|
assert.doesNotMatch(app, /text \|\| placeholder \|\| streamThinkingBubble/, "partial-message thinking sync should not clear an existing thinking card when a partial carries no visible thinking text");
|
|
1902
|
-
assert.match(app, /if \(thinkingOutputVisible &&
|
|
1912
|
+
assert.match(app, /update\.type === "thinking_start" \|\| update\.type === "thinking_delta"\) \{\s+syncStreamingThinkingFromUpdate\(event, update, \{ render: false \}\);\s+if \(thinkingOutputVisible && streamThinkingRawText\) thinkingStreamRenderScheduler\.request\(\{ complete: false \}\);/, "live thinking deltas should require visible raw thinking text before scheduling a card render");
|
|
1903
1913
|
assert.match(app, /function thinkingDeltaText\(update\) \{[\s\S]*?return visibleThinkingText\(update\.delta \|\| update\.thinking \|\| update\.content \|\| ""\);/, "live thinking deltas should suppress provider no-thinking placeholders too");
|
|
1904
1914
|
assert.match(app, /const THINKING_VISIBILITY_STORAGE_KEY = "pi-webui-thinking-visible"/, "thinking visibility should persist in browser storage");
|
|
1905
1915
|
assert.match(app, /function setThinkingOutputVisible\(visible[\s\S]*renderAllMessages\(\{ preserveScroll: true \}\)/, "thinking visibility changes should immediately re-render the transcript");
|
|
1906
1916
|
assert.match(app, /function assistantStreamingMessage\(event\)/, "live streaming should read the authoritative partial assistant message from RPC events like the TUI");
|
|
1907
|
-
assert.match(app, /function syncStreamingThinkingFromUpdate\(event, update[\s\S]*?const fallback = streamingThinkingTextFallback\(event\);[\s\S]*?setStreamThinkingRawText\(fallback\);[\s\S]*?return setStreamingThinkingText\(streamThinkingRawText \|\| placeholder\);/, "live thinking end should replace deltas with the final partial-message thinking content");
|
|
1908
|
-
assert.match(app, /function setStreamRawText\(text\)[\s\S]*?streamRawText = nextText;[\s\S]*?
|
|
1917
|
+
assert.match(app, /function syncStreamingThinkingFromUpdate\(event, update[\s\S]*?update\.type === "thinking_end"\) \{[\s\S]*?const fallback = streamingThinkingTextFallback\(event\);[\s\S]*?setStreamThinkingRawText\(fallback, \{ reconcile: true \}\);[\s\S]*?return render \? setStreamingThinkingText\(streamThinkingRawText \|\| placeholder, \{ complete: true \}\) : true;/, "live thinking end should replace deltas with the final partial-message thinking content");
|
|
1918
|
+
assert.match(app, /function setStreamRawText\(text, \{ reason = "snapshot" \} = \{\}\)[\s\S]*?streamRawText = nextText;[\s\S]*?ensureStreamDerivedOutputState\(\)\.replace\(nextText, \{ reason \}\);/, "live assistant text should synchronize from partial messages through a cache-aware setter");
|
|
1909
1919
|
assert.match(app, /const TODO_PROGRESS_LINE_REGEX = /, "frontend should recognize live todo progress lines that will be moved into the todo widget");
|
|
1910
1920
|
assert.match(app, /function stripTodoProgressLines\(text, \{ streaming = false \} = \{\}\)/, "live Assistant output should strip todo-progress lines before rendering final-output text");
|
|
1911
1921
|
assert.match(app, /function syncLiveTodoProgressWidgetFromText\(text, tabId = activeTabId\)/, "authoritative Assistant checklist text should remain convertible into the todo-progress widget");
|
|
1912
1922
|
assert.doesNotMatch(app, /scheduleLiveTodoProgressWidgetSync\(streamRawText, event\.tabId \|\| activeTabId\)/, "raw streaming assistant text must not drive the todo-progress widget");
|
|
1913
|
-
assert.match(app, /function renderStreamingAssistantText\(\)[\s\S]*?const thinkingFormat = syncStreamingThinkingFormat\(\);[\s\S]*?const finalText = thinkingFormat\?\.hasThinkingFormat \? streamDerivedText\(\)\.finalText : streamRenderableAssistantText\(\);/, "streamed Assistant text should render cached derived output without directly rescanning raw stream text");
|
|
1914
|
-
assert.match(app, /function syncStreamingThinkingFormat\(\)[\s\S]*?const parsed = streamDerivedText\(\)\.thinkingFormat;[\s\S]*?setStreamingThinkingText\(thinking\)/, "tagged <think> streaming output should update the live thinking card from cached parse state instead of flashing raw tags");
|
|
1923
|
+
assert.match(app, /function renderStreamingAssistantText\(\{ complete = false \} = \{\}\)[\s\S]*?const thinkingFormat = syncStreamingThinkingFormat\(\{ complete \}\);[\s\S]*?const finalText = thinkingFormat\?\.hasThinkingFormat \? streamDerivedText\(\)\.finalText : streamRenderableAssistantText\(\);/, "streamed Assistant text should render cached derived output without directly rescanning raw stream text");
|
|
1924
|
+
assert.match(app, /function syncStreamingThinkingFormat\(\{ complete = false \} = \{\}\)[\s\S]*?const parsed = streamDerivedText\(\)\.thinkingFormat;[\s\S]*?setStreamingThinkingText\(thinking, \{ complete: complete \|\| parsed\.complete \}\)/, "tagged <think> streaming output should update the live thinking card from cached parse state instead of flashing raw tags");
|
|
1915
1925
|
assert.match(app, /const finalText = thinkingFormat\?\.hasThinkingFormat \? streamDerivedText\(\)\.finalText : streamRenderableAssistantText\(\);/, "tagged <think> streaming output should render only final response text in the Assistant card");
|
|
1916
1926
|
assert.match(app, /const STREAM_OUTPUT_HIDE_DELAY_MS = 300/, "stream output hiding should be debounced to prevent rapid flicker");
|
|
1917
1927
|
assert.doesNotMatch(app, /STREAM_OUTPUT_TOOLCALL_GUARD_MS|scheduleStreamingAssistantTextRender/, "controller batching should be the only live assistant render scheduler");
|
|
1918
1928
|
assert.match(app, /function scheduleStreamBubbleHide\([\s\S]*?STREAM_OUTPUT_MIN_VISIBLE_MS/, "stream output cards should observe a minimum visible duration before hiding");
|
|
1919
|
-
assert.match(app, /if \(finalText\) \{[\s\S]*?renderStreamingMarkdown\(streamText, finalText\);[\s\S]*?\} else \{\n\s+scheduleStreamBubbleHide\(\);/, "empty filtered stream output should schedule hide while visible stream output renders as Markdown");
|
|
1920
|
-
assert.match(app, /function handleMessageUpdate\(event\)[\s\S]*?
|
|
1929
|
+
assert.match(app, /if \(finalText\) \{[\s\S]*?renderStreamingMarkdown\(streamText, finalText, \{ complete \}\);[\s\S]*?\} else \{\n\s+scheduleStreamBubbleHide\(\);/, "empty filtered stream output should schedule hide while visible stream output renders as Markdown");
|
|
1930
|
+
assert.match(app, /function handleMessageUpdate\(event\)[\s\S]*?assistantStreamRenderScheduler\.request\(\{ complete: update\.type === "text_end" \}\);/, "controller-batched assistant text should render through the latest-wins transcript scheduler");
|
|
1931
|
+
assert.match(app, /const assistantStreamRenderScheduler = createLatestWinsRenderScheduler\(\{\s+render: \(options\) => \{\s+renderStreamingAssistantText\(options\);/, "the assistant stream scheduler should render through the transcript-only sink");
|
|
1921
1932
|
assert.match(app, /streamToolCallSeen = true;\n\s+suppressStreamingAssistantTextBeforeToolCall\(\);/, "tool-call starts should remove pending assistant text from the live transcript");
|
|
1922
1933
|
assert.match(app, /function renderStreamingToolCallCard\(\{ scroll = false \} = \{\}\)[\s\S]*?appendMessage\(message, \{ streaming: true, itemKey:[\s\S]*?transcriptRenderer\.ownSurface\(streamToolCallText[\s\S]*?transcriptRenderer\.updateTextSurface\(\{[\s\S]*?text: displayText/, "live tool-call cards should render and update their stable semantic arguments surface in place");
|
|
1923
1934
|
assert.match(app, /update\.type === "toolcall_delta"[\s\S]*?updateStreamingToolCallFromEvent\(event, \{ appendDelta: true \}\)/, "tool-call deltas should update visible streamed arguments through the transcript-only sink");
|
|
@@ -1959,11 +1970,12 @@ assert.match(app, /function renderSessionSummaryControls\(\)[\s\S]*?renderSignat
|
|
|
1959
1970
|
assert.match(app, /const previousCatalog = commandCatalogsByTab\.get\(tabContext\.tabId\);[\s\S]*?tabsSnapshotSignature\(previousCatalog\) !== tabsSnapshotSignature\(catalog\)\) scheduleTabsRender\(\);/, "foreground command refreshes should retain unchanged terminal controls");
|
|
1960
1971
|
assert.doesNotMatch(app, /elements\.chat\.(?:append|insertBefore)\(runIndicatorBubble/, "the active agent indicator must never be mounted in the transcript");
|
|
1961
1972
|
assert.match(app, /const headline = runIndicatorHeadline\(\);\n\s+if \(runIndicatorText\.textContent !== headline\) runIndicatorText\.textContent = headline;/, "active agent indicator should avoid redundant headline DOM writes that can flicker");
|
|
1962
|
-
assert.match(app, /
|
|
1963
|
-
assert.match(app, /runIndicatorShowsElapsed\(\) \?
|
|
1973
|
+
assert.match(app, /if \(runIndicatorMeta\.textContent !== meta\) runIndicatorMeta\.textContent = meta;[\s\S]*?const elapsed = runIndicatorShowsElapsed\(\) \? ` · run time[\s\S]*?runIndicatorElapsed\.textContent = elapsed;/, "active agent indicator should avoid redundant metadata DOM writes and keep the elapsed ticker in its own aria-hidden span");
|
|
1974
|
+
assert.match(app, /runIndicatorShowsElapsed\(\) \? ` · run time/, "active agent indicator should label elapsed run time instead of showing a bare counter");
|
|
1964
1975
|
assert.match(app, /case "agent_settled":(?:(?!case ")[\s\S])*?clearRunIndicatorActivity\(\{ deferRemoval: !autoFollowChat \|\| !isChatNearBottom\(\) \}\);(?:(?!case ")[\s\S])*?scheduleSemanticReconcile\(\{[^}]*messages: true/, "settlement should keep the tail height stable for readers above the live edge until the coalesced semantic reconciler refreshes canonical messages");
|
|
1965
1976
|
assert.match(app, /Abort requested/, "abort feedback should clarify that Web UI is checking stop status");
|
|
1966
|
-
assert.match(app, /const ABORT_LONG_PRESS_MS =
|
|
1977
|
+
assert.match(app, /const ABORT_LONG_PRESS_MS = 1200/, "Abort long-press timing should be explicit and short enough to feel responsive");
|
|
1978
|
+
assert.match(app, /function showAbortTapHint\(\)[\s\S]*?"Hold to abort"/, "a quick tap on Abort should explain the hold instead of doing nothing");
|
|
1967
1979
|
assert.match(app, /const ABORT_LONG_PRESS_TICK_MS = 100/, "Abort hold countdown should update visibly while held");
|
|
1968
1980
|
assert.match(app, /const ABORT_LONG_PRESS_RELEASE_GRACE_MS = 350/, "Escape release cancellation should be debounced to ignore spurious keyup during key repeat");
|
|
1969
1981
|
assert.match(app, /let escapeAbortHoldSuppressesDoubleEscape = false/, "Escape abort hold should track suppression separately from abort button UI state");
|
|
@@ -1990,7 +2002,7 @@ assert.match(app, /function clearRunIndicatorActivity[\s\S]*?clearRunIndicatorGr
|
|
|
1990
2002
|
assert.match(app, /scheduleRunIndicatorGraceCheck\(tabContext = activeTabContext\(\)\)[\s\S]*?refreshState\(tabContext\)/, "stale local-only run indicators should re-check state after the start grace period");
|
|
1991
2003
|
assert.match(app, /function scheduleAbortStateChecks\(/, "abort handling should poll state so the active indicator can clear after stop confirmation");
|
|
1992
2004
|
assert.match(app, /case "tool_execution_start":[\s\S]*?suppressStreamingAssistantTextBeforeToolCall\(\)[\s\S]*?handleToolExecutionStart\(event\)[\s\S]*?setRunIndicatorActivity\(`Running tool:/, "tool execution should suppress pre-tool assistant text, then update the active agent indicator and live tool card");
|
|
1993
|
-
assert.match(app, /applyToolExecutionUpdate: \(event\) => \{\s+if \(!compactOutputActive\(\)\) applyTranscriptToolExecutionUpdate\(event\);/, "tool execution updates should enter the transcript-only controller sink before lifecycle dispatch");
|
|
2005
|
+
assert.match(app, /applyToolExecutionUpdate: \(event\) => \{\s+if \(!compactOutputActive\(\) && !isIntercomTransportToolName\(event\?\.toolName\)\) applyTranscriptToolExecutionUpdate\(event\);/, "tool execution updates should enter the transcript-only controller sink before lifecycle dispatch");
|
|
1994
2006
|
assert.match(app, /case "auto_retry_start":[\s\S]*?addTransientMessage\(\{ role: "warn", title: "auto retry"/, "auto-retry starts should be transcript-visible warnings");
|
|
1995
2007
|
assert.match(app, /function trackAutoRetryStateFromEvent\(event\)[\s\S]*?event\.type === "auto_retry_start"[\s\S]*?autoRetryingTabs\.add\(tabId\)[\s\S]*?suppressPendingAgentDoneNotificationsForTab\(tabId\)[\s\S]*?markTabWorkingLocally\(tabId\)/, "auto-retry starts should suppress misleading done notifications and keep the tab working");
|
|
1996
2008
|
assert.match(app, /function notifyAgentDone[\s\S]*?agentDoneNotificationKeys\.add\(key\);\n\s+if \(isAutoRetryingTab\(tabId\)\) return;/, "agent-done notifications should be ignored while a tab is auto-retrying");
|
|
@@ -2028,7 +2040,7 @@ assert.match(app, /function updateComposerModeButtons\(\)/, "composer should rel
|
|
|
2028
2040
|
assert.match(app, /const target = runActive \? elements\.composerRow : elements\.composerActionsPanel/, "Steer and Follow-up should move into the bottom row only while an agent run is active");
|
|
2029
2041
|
assert.match(app, /const before = runActive \? elements\.abortButton : null/, "active Steer and Follow-up controls should sit before Abort and Send");
|
|
2030
2042
|
assert.match(app, /button\.hidden = !runActive;\n\s+button\.disabled = !runActive;/, "Steer and Follow-up should be hidden and disabled when the agent is not running");
|
|
2031
|
-
assert.match(app, /renderBusyPromptBehaviorTag\(\);\n\s+document\.body\.classList\.toggle\("pi-run-active", runActive \|\| abortAvailable\)/, "composer mode refresh should keep the busy prompt behavior tag current");
|
|
2043
|
+
assert.match(app, /renderBusyPromptBehaviorTag\(\);\n\s+renderSendButtonMode\(runActive\);\n\s+document\.body\.classList\.toggle\("pi-run-active", runActive \|\| abortAvailable\)/, "composer mode refresh should keep the busy prompt behavior tag and Send label current");
|
|
2032
2044
|
assert.match(app, /const abortHoldActive = isAbortLongPressActive\(\);\n\s+if \(!abortAvailable && !abortHoldActive\) resetAbortLongPressAffordance\(\);\n\s+elements\.abortButton\.hidden = !abortAvailable && !abortHoldActive;\n\s+elements\.abortButton\.disabled = \(!abortAvailable && !abortHoldActive\) \|\| abortRequestInFlight;/, "Abort should stay visible during an active hold even if run state briefly refreshes unavailable");
|
|
2033
2045
|
assert.match(app, /document\.body\.classList\.toggle\("pi-run-active", runActive \|\| abortAvailable\)/, "run-active or abort-available state should be reflected in CSS for mobile composer layout");
|
|
2034
2046
|
assert.match(app, /function showComposerButtonTooltip\(button\)/, "empty mode-button taps should show the usage tooltip");
|
|
@@ -2083,9 +2095,9 @@ assert.match(app, /renderNativeResourceToggles\(tools, \{[\s\S]*?getResourceTag:
|
|
|
2083
2095
|
assert.match(app, /function nativeResourceScopeControl\(scope,[\s\S]*Session only[\s\S]*Global default/, "Tools and Skills Setup should expose a visible session/global scope control");
|
|
2084
2096
|
assert.match(app, /\/api\/tools\?scope=\$\{encodeURIComponent\(scope\)\}[\s\S]*enabledTools: \[\.\.\.enabledTools\], scope/, "Tools Setup should load and save the selected scope");
|
|
2085
2097
|
assert.match(app, /\/api\/skills\?scope=\$\{encodeURIComponent\(scope\)\}[\s\S]*enabledSkills: \[\.\.\.enabledSkills\], scope/, "Skills Setup should load and save the selected scope");
|
|
2086
|
-
assert.match(server, /
|
|
2087
|
-
assert.match(helper, /const
|
|
2088
|
-
assert.match(helper, /const
|
|
2098
|
+
assert.match(server, /updateWebuiSettings\(\(current\) => \(\{\s+resourceDefaults: \{\s+tools: \{[\s\S]*updateWebuiSettings\(\(current\) => \(\{\s+resourceDefaults: \{\s+skills: \{/, "server should persist global tool and skill defaults in the shared Web UI settings file");
|
|
2099
|
+
assert.match(helper, /const directive = branchResourceDirective\(lastBranchConfig\(ctx, TOOLS_CONFIG_TYPE\), "tools"\);[\s\S]*?directive\.pinned\s+\? \{ names: directive\.names \|\| \[\], source: "session" \}\s+: resolveResourceSelection\(resourceDefaults, "tools"/, "session tool entries should take precedence over global defaults");
|
|
2100
|
+
assert.match(helper, /const directive = branchResourceDirective\(lastBranchConfig\(ctx, SKILLS_CONFIG_TYPE\), "skills"\);[\s\S]*?if \(directive\.pinned && directive\.legacyDisabledNames !== null\)/, "session skill entries should take precedence over global defaults");
|
|
2089
2101
|
assert.match(technical, /Session only[\s\S]*Global default/, "technical reference should document resource selector scopes");
|
|
2090
2102
|
assert.match(app, /const tags = Array\.isArray\(item\.tags\)[\s\S]*?item\.badge, \.\.\.tags/, "native selector filtering should include extra resource tags");
|
|
2091
2103
|
assert.match(app, /publishMenuContainer\?\.addEventListener\("pointerenter", \(\) => \{[\s\S]*?setPublishMenuOpen\(true\);[\s\S]*?\}\)/, "Publish menu should expand on hover");
|
|
@@ -2120,7 +2132,7 @@ assert.match(app, /function openNativeModelSelector\(\)[\s\S]*?nativeCommandApi\
|
|
|
2120
2132
|
assert.match(app, /function openNativeSettingsDialog\(\)[\s\S]*?\/api\/steering-mode[\s\S]*?\/api\/follow-up-mode[\s\S]*?\/api\/auto-compaction/, "native /settings selector should expose queue and compaction controls");
|
|
2121
2133
|
assert.match(app, /function openNativeNameDialog\(\)[\s\S]*?sendPrompt\("prompt", `\/name \$\{name\}`\)/, "native /name selector should prompt before running the slash command");
|
|
2122
2134
|
assert.match(app, /function openNativeForkSelector\(\)[\s\S]*?\/api\/fork-messages[\s\S]*?\/api\/fork/, "native /fork selector should pair fork-point loading with the fork action");
|
|
2123
|
-
assert.match(app, /function openNativeResumeSelector\(scope = "current"\)[\s\S]*?\/api\/sessions\?scope=\$\{encodeURIComponent\(selectedScope\)\}/, "native /resume selector should list current-cwd or all sessions");
|
|
2135
|
+
assert.match(app, /function openNativeResumeSelector\(scope = "current", \{ query = "" \} = \{\}\)[\s\S]*?\/api\/sessions\?scope=\$\{encodeURIComponent\(selectedScope\)\}/, "native /resume selector should list current-cwd or all sessions");
|
|
2124
2136
|
assert.match(app, /\/api\/session-rename/, "native /resume selector should rename session metadata");
|
|
2125
2137
|
assert.match(app, /\/api\/session-delete/, "native /resume selector should delete sessions with confirmation");
|
|
2126
2138
|
assert.match(app, /function openNativeTreeSelector\(\)[\s\S]*?\/api\/session-tree[\s\S]*?\/api\/tree-navigate/, "native /tree selector should list tree entries and navigate through the backend helper");
|
|
@@ -2179,7 +2191,7 @@ assert.match(app, /let openTerminalTabGroupKey = null/, "frontend should track t
|
|
|
2179
2191
|
assert.match(app, /function updateTerminalTabGroupOpenState\(\)/, "frontend should be able to reapply open terminal tab group state after rerenders");
|
|
2180
2192
|
assert.match(app, /const totalTabCount = tabs\.length \+ subagentTerminalViews\.size;[\s\S]*classList\.toggle\("terminal-tabs-dense", totalTabCount >= 10\)/, "frontend should include virtual subagent tabs when enabling dense tab layout");
|
|
2181
2193
|
assert.match(app, /appendTerminalTabContent\(button, \{ title: activeTitle,[\s\S]*?count: groupTabs\.length,[^}]*\}\)/, "group buttons should show the active terminal name instead of only the cwd label");
|
|
2182
|
-
assert.match(app, /wrapper\.addEventListener\("pointerenter", \(\) => setOpenTerminalTabGroup\(group\.key\)
|
|
2194
|
+
assert.match(app, /wrapper\.addEventListener\("pointerenter", \(event\) => \{\s+if \(event\.pointerType === "touch"\) return;\s+setOpenTerminalTabGroup\(group\.key\);/, "terminal tab groups should mark themselves open while hovered with a non-touch pointer");
|
|
2183
2195
|
assert.match(app, /if \(openTerminalTabGroupKey\) \{\n\s+scheduleRefreshTabs\(600\);/, "tab polling should defer full tab refreshes while a group menu is open");
|
|
2184
2196
|
assert.match(app, /function shouldRenderTerminalTabGroup\(group, groupCount\) \{\n\s+if \(group\.custom\) return group\.tabs\.length > 1;\n\s+return groupCount > 1 && group\.tabs\.length > 1 && Boolean\(group\.cwd\);\n\}/, "terminal tabs should always render custom groups while only collapsing multi-tab cwd groups when multiple groups are available");
|
|
2185
2197
|
assert.match(app, /TERMINAL_CUSTOM_GROUPS_STORAGE_KEY/, "frontend should persist custom terminal tab groups in browser storage");
|
|
@@ -2187,10 +2199,11 @@ assert.match(app, /function bindTerminalTabDragAndDrop\(/, "terminal tabs should
|
|
|
2187
2199
|
assert.match(app, /function handleTerminalTabDrop\(sourceTabId, target\)[\s\S]*?createTerminalCustomGroup/, "dropping a terminal tab onto another tab or group should create or update a custom group");
|
|
2188
2200
|
assert.match(css, /\.terminal-tab\.terminal-tab-drag-over,[\s\S]*?\.terminal-tab-group-item\.terminal-tab-drag-over/, "terminal tab drop targets should show drag-over affordance");
|
|
2189
2201
|
assert.match(app, /function closeTerminalTabGroup\(group\)[\s\S]*?closeTerminalTabs\(group\.tabs\.map\(\(tab\) => tab\.id\)/, "terminal tab groups should be closable as a batch");
|
|
2202
|
+
assert.match(app, /const closedActiveCwd = closedActiveTab \? tabs\.find\(\(tab\) => tab\.id === activeTabId\)\?\.cwd \|\| "" : ""[\s\S]*?const sameCwdFallbackTabId = closedActiveCwd[\s\S]*?item\.cwd === closedActiveCwd/, "closing the active terminal should prefer another open tab in the same cwd");
|
|
2190
2203
|
assert.match(app, /function closeAllTerminalTabs\(\)[\s\S]*?closeTerminalTabs\(tabs\.map\(\(tab\) => tab\.id\)/, "tab header should close all terminal tabs as a batch");
|
|
2191
2204
|
assert.match(app, /WARNING: \$\{activeAgentTabs\.length\}[\s\S]*?still running or waiting for input/, "tab close confirmations should warn when agents are still running");
|
|
2192
2205
|
assert.match(app, /elements\.closeAllTabsButton\.addEventListener\("click", \(\) => closeAllTerminalTabs\(\)\)/, "close-all tabs button should be wired in JS");
|
|
2193
|
-
assert.match(app, /const groups = tabCwdGroups\(\);[\s\S]*?for \(const group of groups\) \{\n\s+if \(shouldRenderTerminalTabGroup\(group, groups\.length\)\)[\s\S]*?renderTerminalTabGroup\(group, groups\.length\)[\s\S]*?for \(const tab of group\.tabs\) elements\.tabBar\.append\(renderTerminalTab\(tab\)\);/, "terminal tabs should render groups with group count and ungrouped tabs when grouping is skipped");
|
|
2206
|
+
assert.match(app, /const groups = tabCwdGroups\(\);[\s\S]*?for \(const group of groups\) \{\n\s+if \(shouldRenderTerminalTabGroup\(group, groups\.length\)\)[\s\S]*?renderTerminalTabGroup\(group, groups\.length\)[\s\S]*?for \(const tab of group\.tabs\) elements\.tabBar\.append\(renderTerminalTab\(tab, \{ showCwdAdd \}\)\);/, "terminal tabs should render groups with group count and ungrouped tabs when grouping is skipped");
|
|
2194
2207
|
assert.match(app, /const subagentGroups = subagentTerminalViewGroups\(\)[\s\S]*renderSubagentTerminalTabGroup\(group\)[\s\S]*renderSubagentTerminalTab\(group\.views\[0\]\)/, "open subagent views should render as first-class virtual tabs, grouped by parent workspace when siblings exist");
|
|
2195
2208
|
assert.match(technical, /Tracked subagent output[\s\S]*dedicated \*\*Subagent\*\* terminal tab[\s\S]*read-only[\s\S]*does not stop or interrupt/, "technical reference should document the selectable read-only child terminal behavior");
|
|
2196
2209
|
assert.match(app, /let tabSeenCompletionSerials = new Map\(\)/, "frontend should track which tab completions have been seen");
|
|
@@ -2243,7 +2256,7 @@ assert.match(app, /function isFooterPickerOpen\(\)[\s\S]*?footerModelPickerOpen
|
|
|
2243
2256
|
assert.doesNotMatch(app.match(/function renderMinimalFooter\(\)[\s\S]*?\n\}/)?.[0] || "", /footer-details-toggle/, "minimal default footer should not render a details toggle chip");
|
|
2244
2257
|
assert.match(app, /bindMobileViewChanges\(/, "side panel state should react to mobile breakpoint changes");
|
|
2245
2258
|
// Intent preserved for legacy; v2 leaves mobile surface ownership to its reducer.
|
|
2246
|
-
assert.match(app, /function restoreSidePanelState\(\) \{\n\s+if \(isMobileShellV2Active\(\)\) return;\n\s+if \(
|
|
2259
|
+
assert.match(app, /function restoreSidePanelState\(\) \{\n\s+if \(isMobileShellV2Active\(\)\) return;\n\s+if \(isControlDeckOverlayPresentation\(\)\)/, "legacy mobile and narrow overlay layouts should start with the side panel collapsed");
|
|
2247
2260
|
assert.match(app, /case "webui_tab_reloaded":/, "frontend should handle native /reload tab restart events");
|
|
2248
2261
|
assert.match(app, /addTransientMessage\(\{ role: "native", title: "\/reload"/, "native /reload should produce visible transcript output");
|
|
2249
2262
|
assert.match(app, /copyText\(data\.copyText\)\.catch/, "native /copy should use the shared browser clipboard helper when available");
|
|
@@ -2529,16 +2542,16 @@ assert.ok(pkg.scripts?.check?.includes("node tests/run-all.mjs"), "check script
|
|
|
2529
2542
|
assert.match(app, /let renderedTranscriptState = \{ epoch: "", entries: \[\] \};/, "transcript reconciliation should track rendered entries");
|
|
2530
2543
|
const renderAllMessagesSource = appFunctionSource("renderAllMessages", "applyNativeSlashCommandEffects");
|
|
2531
2544
|
assert.match(renderAllMessagesSource, /prefixLength[\s\S]*?prefixKeys[\s\S]*?transcriptRenderer\.commitTranscriptMutation\(\{[\s\S]*?kind: forceRebuild \? "authoritative" : "reconcile"[\s\S]*?if \(prefixLength === 0\)[\s\S]*?resetChatOutput\(\)[\s\S]*?removeChatBubblesAfterPrefix\(/, "renderAllMessages should reuse the unchanged keyed prefix inside one coordinator transaction instead of always rebuilding");
|
|
2532
|
-
assert.match(app, /function removeChatBubblesAfterPrefix\(keptKeys\)[\s\S]*?child === elements\.stickyUserPromptButton \|\| child
|
|
2545
|
+
assert.match(app, /function removeChatBubblesAfterPrefix\(keptKeys\)[\s\S]*?child === elements\.stickyUserPromptButton \|\| liveBubbles\.has\(child\)/, "prefix removal must preserve the sticky prompt button and live bubbles such as the run indicator");
|
|
2533
2546
|
assert.match(app, /function resetChatOutput\(\) \{\n liveToolCards\.clear\(\);\n renderedTranscriptState = \{ epoch: "", entries: \[\] \};/, "full chat resets must clear reconciliation state");
|
|
2534
2547
|
assert.match(app, /function transcriptRenderEpoch\(\)[\s\S]*?thinkingOutputVisible/, "reconciliation epoch must include thinking visibility so toggles rebuild the transcript");
|
|
2535
2548
|
assert.match(app, /pruneDisconnectedLiveToolCards\(\);/, "reconciliation must prune live tool card references to removed DOM nodes");
|
|
2536
2549
|
|
|
2537
2550
|
// --- Performance: incremental streaming markdown (P0-3) ---
|
|
2538
|
-
assert.match(app, /function streamingMarkdownStableBoundary\(text\)
|
|
2551
|
+
assert.match(app, /function streamingMarkdownStableBoundary\(text, previousState, options\) \{\s+return advanceStreamingMarkdownTail\(previousState, text, options\);/, "streaming markdown boundary must be delegated to the mutable-tail helper (which never treats the final partial line as stable)");
|
|
2539
2552
|
const renderStreamingMarkdownSource = appFunctionSource("renderStreamingMarkdown", "appendImage");
|
|
2540
2553
|
assert.match(renderStreamingMarkdownSource, /captureChatTextSelection\(block\)[\s\S]*?transcriptRenderer\.reconcileMarkdownSurface\(\{[\s\S]*?stableBoundary: streamingMarkdownStableBoundary[\s\S]*?renderInto: renderMarkdownInto[\s\S]*?restoreChatTextSelection/, "streaming Markdown must reconcile stable committed blocks and its mutable tail through the coordinator");
|
|
2541
|
-
assert.match(app, /streamRawText = "";\n streamThinkingRawText = "";\n
|
|
2554
|
+
assert.match(app, /streamRawText = "";\n streamThinkingRawText = "";\n resetStreamDerivedOutputState\("reset"\);/, "resetting the stream bubble must clear raw text and derived output state");
|
|
2542
2555
|
|
|
2543
2556
|
// --- Performance: delta transcript fetch (P1-1) ---
|
|
2544
2557
|
assert.match(app, /function mergeMessagesDelta\(previous, data\)[\s\S]*?messagesLookEqual\(previous\[since\], data\.messages\[0\]\)/, "delta merges must verify the one-message overlap before applying");
|
|
@@ -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-v132/, "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
|
|