@firstpick/pi-package-webui 0.9.7 → 0.9.9

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.
Files changed (61) hide show
  1. package/DEVELOPMENT.md +882 -0
  2. package/README.md +8 -4
  3. package/TECHNICAL.md +415 -0
  4. package/bin/pi-webui.mjs +154 -26
  5. package/index.ts +2 -1
  6. package/lib/optional-feature-catalog.mjs +1 -1
  7. package/lib/windows-drive-roots.mjs +114 -0
  8. package/package.json +3 -1
  9. package/public/app.js +683 -115
  10. package/public/guided-git-command-state.mjs +175 -1
  11. package/public/index.html +17 -10
  12. package/public/service-worker.js +1 -1
  13. package/public/styles.css +146 -32
  14. package/public/transcript-renderer.mjs +62 -0
  15. package/tests/boot-failure-diagnostics.test.mjs +3 -3
  16. package/tests/browser/footer-model-advanced-layout.spec.mjs +512 -0
  17. package/tests/browser/guided-git-extension-command.spec.mjs +180 -0
  18. package/tests/browser/guided-git-fallback.spec.mjs +68 -3
  19. package/tests/browser/interaction-continuity.spec.mjs +33 -0
  20. package/tests/browser/windows-drive-parent.spec.mjs +198 -0
  21. package/tests/codex-fast-mode-static.test.mjs +2 -2
  22. package/tests/compaction-static.test.mjs +1 -1
  23. package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
  24. package/tests/control-visibility-static.test.mjs +3 -3
  25. package/tests/controls-layout-static.test.mjs +3 -3
  26. package/tests/events-tree-context-menu-static.test.mjs +3 -3
  27. package/tests/fast-mode-client-static.test.mjs +1 -1
  28. package/tests/feature-decision-output-popup-static.test.mjs +2 -2
  29. package/tests/file-viewer-image-static.test.mjs +3 -3
  30. package/tests/fixtures/fake-pi.mjs +34 -3
  31. package/tests/git-footer-context-menu-static.test.mjs +103 -1
  32. package/tests/guided-git-activation-http.test.mjs +194 -0
  33. package/tests/guided-git-activation-static.test.mjs +80 -0
  34. package/tests/guided-git-activation.test.mjs +244 -0
  35. package/tests/guided-git-fallback-runtime.test.mjs +1 -0
  36. package/tests/guided-git-fallback-ui-static.test.mjs +2 -2
  37. package/tests/guided-git-message-reliability-static.test.mjs +2 -1
  38. package/tests/guided-git-optional-feature.test.mjs +31 -0
  39. package/tests/http-endpoints-harness.test.mjs +3 -0
  40. package/tests/interaction-state-stability-static.test.mjs +1 -1
  41. package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
  42. package/tests/main-output-loading-static.test.mjs +11 -9
  43. package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
  44. package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
  45. package/tests/mobile-foundation-static.test.mjs +3 -3
  46. package/tests/mobile-phone-experience-static.test.mjs +1 -1
  47. package/tests/mobile-static.test.mjs +85 -4
  48. package/tests/open-issue-wizard-static.test.mjs +1 -1
  49. package/tests/persistent-ui-layout-static.test.mjs +3 -3
  50. package/tests/prompt-input-vertical-scroll-static.test.mjs +6 -6
  51. package/tests/prompt-routing-input-clear-static.test.mjs +1 -1
  52. package/tests/questionnaire-dialog.test.mjs +3 -3
  53. package/tests/session-sampling-ui-static.test.mjs +3 -3
  54. package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
  55. package/tests/subagent-observability-static.test.mjs +2 -2
  56. package/tests/syntax-highlighting-static.test.mjs +3 -3
  57. package/tests/tab-close-continuity-static.test.mjs +2 -0
  58. package/tests/theme-customizer-static.test.mjs +1 -1
  59. package/tests/thinking-block-grouping.test.mjs +79 -0
  60. package/tests/windows-drive-cwd-picker-static.test.mjs +81 -0
  61. package/tests/windows-drive-roots.test.mjs +130 -0
@@ -17,7 +17,9 @@ export function resolveCommandForTabCatalog(catalog, name, { rpcOnly = false } =
17
17
  const commands = (rpcOnly ? raw : available).filter((command) => !rpcOnly || command.source !== "native");
18
18
  const exact = commands.find((command) => command.name === requested || command.invokeName === requested || command.duplicateNames?.includes(requested));
19
19
  if (exact) return exact;
20
- const canUseBaseAlias = available.some((command) => commandBaseName(command.name) === requested && command.invokeName && command.duplicateCount > 1);
20
+ const nativeOwnsBaseName = rpcOnly && raw.some((command) => command.source === "native" && command.name === requested);
21
+ const canUseBaseAlias = nativeOwnsBaseName
22
+ || available.some((command) => commandBaseName(command.name) === requested && command.invokeName && command.duplicateCount > 1);
21
23
  return canUseBaseAlias ? commands.find((command) => commandNameMatches(command?.name, requested)) || null : null;
22
24
  }
23
25
 
@@ -32,3 +34,175 @@ export function resolveRpcSlashCommandForTabCatalog(catalog, message) {
32
34
  export function guidedGitReviewAvailableForTabCatalog(catalog) {
33
35
  return !!resolveCommandForTabCatalog(catalog, "aur-review", { rpcOnly: true });
34
36
  }
37
+
38
+ export function guidedGitLaunchModeForTabCatalog(catalog, { disabled = false } = {}) {
39
+ if (disabled) return "disabled";
40
+ if (resolveCommandForTabCatalog(catalog, "git-guided-workflow", { rpcOnly: true })) return "extension";
41
+ if (resolveCommandForTabCatalog(catalog, "git-staged-msg", { rpcOnly: true })) return "fallback";
42
+ return "unavailable";
43
+ }
44
+
45
+ export function guidedGitWorkflowCommandForTabCatalog(catalog, message) {
46
+ const match = String(message || "").trim().match(/^\/([^\s]+)$/u);
47
+ if (!match) return false;
48
+ const command = resolveCommandForTabCatalog(catalog, match[1], { rpcOnly: true });
49
+ return commandBaseName(command?.name) === "git-guided-workflow";
50
+ }
51
+
52
+ export function guidedGitLaunchBlockedReason(state, queuedMessageCount = 0) {
53
+ if (!state || typeof state !== "object") return "state-unavailable";
54
+ if (state.isCompacting === true) return "compacting";
55
+ if (state.isStreaming === true) return "streaming";
56
+ if (Number(state.pendingMessageCount || 0) > 0 || Number(queuedMessageCount || 0) > 0) return "pending";
57
+ return "";
58
+ }
59
+
60
+ export function createGuidedGitLaunchPermitController({ maxTrackedTabs = 64, permitTtlMs = 15_000 } = {}) {
61
+ const permitsByTab = new Map();
62
+
63
+ function prune(now) {
64
+ for (const [tabId, permit] of permitsByTab) {
65
+ if (now - permit.grantedAt > permitTtlMs) permitsByTab.delete(tabId);
66
+ }
67
+ }
68
+
69
+ function grant(tabId, launchId, now = Date.now()) {
70
+ if (typeof tabId !== "string" || !tabId || typeof launchId !== "string" || !GUIDED_GIT_START_REQUEST_ID.test(launchId)) return false;
71
+ prune(now);
72
+ if (permitsByTab.has(tabId)) return false;
73
+ permitsByTab.set(tabId, { launchId, grantedAt: now });
74
+ while (permitsByTab.size > maxTrackedTabs) permitsByTab.delete(permitsByTab.keys().next().value);
75
+ return permitsByTab.has(tabId);
76
+ }
77
+
78
+ function consume(tabId, launchId, now = Date.now()) {
79
+ prune(now);
80
+ const permit = permitsByTab.get(tabId);
81
+ if (!permit || permit.launchId !== launchId) return false;
82
+ permitsByTab.delete(tabId);
83
+ return true;
84
+ }
85
+
86
+ function clearTab(tabId) {
87
+ permitsByTab.delete(tabId);
88
+ }
89
+
90
+ return {
91
+ grant,
92
+ consume,
93
+ clearTab,
94
+ inspect() {
95
+ return {
96
+ trackedTabs: permitsByTab.size,
97
+ hasPermit: (tabId) => permitsByTab.has(tabId),
98
+ launchIdForTab: (tabId) => permitsByTab.get(tabId)?.launchId || "",
99
+ };
100
+ },
101
+ };
102
+ }
103
+
104
+ export const GUIDED_GIT_START_STATUS_KEY = "git-guided-workflow:webui-start";
105
+ export const GUIDED_GIT_START_PAYLOAD_TYPE = "firstpick.pi-extension-git-guided-workflow.start";
106
+ export const GUIDED_GIT_START_PAYLOAD_VERSION = 1;
107
+ export const GUIDED_GIT_START_PAYLOAD_MAX_BYTES = 1024;
108
+ const GUIDED_GIT_START_REQUEST_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u;
109
+ const GUIDED_GIT_START_PAYLOAD_KEYS = ["action", "requestId", "type", "version"];
110
+
111
+ export function parseGuidedGitStartPayload(raw) {
112
+ if (typeof raw !== "string" || !raw || new TextEncoder().encode(raw).length > GUIDED_GIT_START_PAYLOAD_MAX_BYTES) return null;
113
+ let value;
114
+ try {
115
+ value = JSON.parse(raw);
116
+ } catch {
117
+ return null;
118
+ }
119
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
120
+ const keys = Object.keys(value).sort();
121
+ if (keys.length !== GUIDED_GIT_START_PAYLOAD_KEYS.length || keys.some((key, index) => key !== GUIDED_GIT_START_PAYLOAD_KEYS[index])) return null;
122
+ if (value.type !== GUIDED_GIT_START_PAYLOAD_TYPE || value.version !== GUIDED_GIT_START_PAYLOAD_VERSION || value.action !== "start") return null;
123
+ if (typeof value.requestId !== "string" || !GUIDED_GIT_START_REQUEST_ID.test(value.requestId)) return null;
124
+ return { type: value.type, version: value.version, action: value.action, requestId: value.requestId };
125
+ }
126
+
127
+ export function createGuidedGitActivationController({ maxSeenPerTab = 64, maxTrackedTabs = 64, seenTtlMs = 5 * 60 * 1000, claimStart = () => true } = {}) {
128
+ const seenByTab = new Map();
129
+ const startsByTab = new Map();
130
+ const startOwnersByTab = new Map();
131
+
132
+ function prune(now) {
133
+ for (const [tabId, seen] of seenByTab) {
134
+ for (const [requestId, receivedAt] of seen) {
135
+ if (now - receivedAt > seenTtlMs) seen.delete(requestId);
136
+ }
137
+ if (!seen.size) seenByTab.delete(tabId);
138
+ }
139
+ while (seenByTab.size > maxTrackedTabs) seenByTab.delete(seenByTab.keys().next().value);
140
+ }
141
+
142
+ function accept(tabId, requestId, now) {
143
+ prune(now);
144
+ let seen = seenByTab.get(tabId);
145
+ if (!seen) {
146
+ seen = new Map();
147
+ seenByTab.set(tabId, seen);
148
+ while (seenByTab.size > maxTrackedTabs) seenByTab.delete(seenByTab.keys().next().value);
149
+ if (!seenByTab.has(tabId)) return false;
150
+ }
151
+ if (seen.has(requestId)) return false;
152
+ seen.set(requestId, now);
153
+ while (seen.size > maxSeenPerTab) seen.delete(seen.keys().next().value);
154
+ return true;
155
+ }
156
+
157
+ function run(tabId, start) {
158
+ const existing = startsByTab.get(tabId);
159
+ if (existing) return existing;
160
+ const owner = Symbol(tabId);
161
+ startOwnersByTab.set(tabId, owner);
162
+ let promise;
163
+ promise = Promise.resolve()
164
+ .then(() => start(tabId, () => startOwnersByTab.get(tabId) === owner))
165
+ .finally(() => {
166
+ if (startsByTab.get(tabId) === promise) startsByTab.delete(tabId);
167
+ if (startOwnersByTab.get(tabId) === owner) startOwnersByTab.delete(tabId);
168
+ });
169
+ startsByTab.set(tabId, promise);
170
+ return promise;
171
+ }
172
+
173
+ function consume(request, start, now = Date.now()) {
174
+ const tabId = typeof request?.tabId === "string" ? request.tabId : "";
175
+ if (!tabId || request?.replayed === true || !request?.statusText) return { status: "ignored", payload: null, promise: null };
176
+ const payload = parseGuidedGitStartPayload(request.statusText);
177
+ if (!payload) return { status: "invalid", payload: null, promise: null };
178
+ let claimed = false;
179
+ try {
180
+ claimed = claimStart(tabId, payload, request, now) === true;
181
+ } catch {
182
+ claimed = false;
183
+ }
184
+ if (!claimed) return { status: "unclaimed", payload, promise: null };
185
+ if (!accept(tabId, payload.requestId, now)) return { status: "duplicate", payload, promise: null };
186
+ const folded = startsByTab.has(tabId);
187
+ return { status: folded ? "folded" : "started", payload, promise: run(tabId, start) };
188
+ }
189
+
190
+ function clearTab(tabId) {
191
+ seenByTab.delete(tabId);
192
+ startsByTab.delete(tabId);
193
+ startOwnersByTab.delete(tabId);
194
+ }
195
+
196
+ return {
197
+ consume,
198
+ run,
199
+ clearTab,
200
+ inspect() {
201
+ return {
202
+ trackedTabs: seenByTab.size,
203
+ seenForTab: (tabId) => seenByTab.get(tabId)?.size || 0,
204
+ inFlightTabs: startsByTab.size,
205
+ };
206
+ },
207
+ };
208
+ }
package/public/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  <link rel="manifest" href="/manifest.webmanifest" />
13
13
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
14
14
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
15
- <link rel="stylesheet" href="/styles.css?v=137" />
15
+ <link rel="stylesheet" href="/styles.css?v=143" />
16
16
  <script>
17
17
  // Public-only issue-bot runtime configuration. Keep disabled unless the gateway,
18
18
  // Turnstile site key, exact CORS origin, and private-report destination are approved.
@@ -296,19 +296,21 @@
296
296
  <button id="chatSearchNextButton" class="chat-search-button" type="button" aria-label="Next match" title="Next match (Enter)">↓</button>
297
297
  <button id="chatSearchCloseButton" class="chat-search-button" type="button" aria-label="Close search" title="Close (Escape)">✕</button>
298
298
  </div>
299
- <div id="mainOutputLoading" class="main-output-loading" role="status" aria-live="polite" aria-atomic="true" aria-controls="chat" hidden>
300
- <span class="main-output-loading-spinner" aria-hidden="true"></span>
301
- <span>Loading agent output…</span>
302
- </div>
303
- <div id="chat" class="chat" aria-live="polite" aria-busy="false">
304
- <button id="stickyUserPromptButton" class="sticky-user-prompt-button" type="button" aria-controls="chat" hidden></button>
299
+ <div class="main-output-surface">
300
+ <div id="mainOutputLoading" class="main-output-loading" role="status" aria-live="polite" aria-atomic="true" aria-controls="chat" hidden>
301
+ <span class="main-output-loading-spinner" aria-hidden="true"></span>
302
+ <span>Loading agent output…</span>
303
+ </div>
304
+ <div id="chat" class="chat" aria-live="polite" aria-busy="false">
305
+ <button id="stickyUserPromptButton" class="sticky-user-prompt-button" type="button" aria-controls="chat" hidden></button>
306
+ </div>
307
+ <button id="jumpToLatestButton" class="jump-to-latest-button" type="button" hidden>Latest ↓</button>
305
308
  </div>
306
309
  <div id="runIndicatorHost" class="run-indicator-host"></div>
307
310
  <div id="feedbackTray" class="feedback-tray" aria-live="polite" hidden>
308
311
  <span id="feedbackTraySummary">No action feedback queued.</span>
309
312
  <button id="sendFeedbackButton" type="button">Send &amp; create LEARNING</button>
310
313
  </div>
311
- <button id="jumpToLatestButton" class="jump-to-latest-button" type="button" hidden>Latest ↓</button>
312
314
  <div id="statusBar" class="statusbar" aria-live="polite"></div>
313
315
  <section id="contextMeterBar" class="context-meter-bar" aria-live="polite"></section>
314
316
  <section id="gitWorkflowPanel" class="git-workflow-panel" aria-live="polite" hidden>
@@ -1246,6 +1248,7 @@
1246
1248
  <div id="visibilityContextMenu" class="file-context-menu control-visibility-context-menu" role="menu" aria-label="Choose visible controls" hidden></div>
1247
1249
  <div id="gitFooterContextMenu" class="file-context-menu git-footer-context-menu" role="menu" aria-label="Git footer box actions" hidden>
1248
1250
  <button type="button" role="menuitem" data-git-footer-menu-action="disable">Disable this box</button>
1251
+ <button type="button" role="menuitemcheckbox" aria-checked="false" data-git-footer-menu-action="toggle-advanced" hidden>Toggle advanced</button>
1249
1252
  <button type="button" role="menuitem" data-git-footer-menu-action="visibility">Open Git-footer Visibility</button>
1250
1253
  </div>
1251
1254
  <div id="eventTreeContextMenu" class="file-context-menu event-tree-context-menu" role="menu" aria-labelledby="eventTreeContextMenuLabel" hidden>
@@ -1674,6 +1677,10 @@
1674
1677
  <p id="pathPickerCurrent" class="path-picker-current"></p>
1675
1678
  <button id="pathPickerAddFastPickButton" type="button" class="path-picker-add-fast-pick">Pin this folder</button>
1676
1679
  </div>
1680
+ <div class="path-picker-path-row" aria-label="Open a directory by path">
1681
+ <input id="pathPickerPathInput" class="path-picker-path-input" type="text" placeholder="Path, e.g. C:/ or D:/project" autocomplete="off" spellcheck="false" aria-label="Directory path" />
1682
+ <button id="pathPickerPathButton" type="button" class="path-picker-path-button">Go</button>
1683
+ </div>
1677
1684
  <div id="pathPickerFastPicks" class="path-picker-fast-picks" aria-label="Pinned folders"></div>
1678
1685
  <div id="pathPickerRoots" class="path-picker-roots"></div>
1679
1686
  <div class="path-picker-create-row" aria-label="Create a new directory in the current directory">
@@ -1686,7 +1693,7 @@
1686
1693
  </div>
1687
1694
  <p id="pathPickerSearchStatus" class="path-picker-search-status muted" role="status" aria-live="polite"></p>
1688
1695
  <div id="pathPickerList" class="path-picker-list" role="listbox" aria-label="Directories"></div>
1689
- <p id="pathPickerError" class="path-picker-error" hidden></p>
1696
+ <p id="pathPickerError" class="path-picker-error" role="alert" hidden></p>
1690
1697
  <menu>
1691
1698
  <button id="pathPickerCancelButton" type="button">Cancel</button>
1692
1699
  <button id="pathPickerChooseButton" type="button" class="primary">Use this directory</button>
@@ -1882,7 +1889,7 @@
1882
1889
  </form>
1883
1890
  </dialog>
1884
1891
 
1885
- <script id="webuiBootLoader" data-app-src="/app.js?v=166">
1892
+ <script id="webuiBootLoader" data-app-src="/app.js?v=175">
1886
1893
  (() => {
1887
1894
  "use strict";
1888
1895
 
@@ -1,4 +1,4 @@
1
- const CACHE_NAME = "pi-webui-pwa-v132";
1
+ const CACHE_NAME = "pi-webui-pwa-v142";
2
2
  const APP_SHELL = [
3
3
  "/",
4
4
  "/index.html",
package/public/styles.css CHANGED
@@ -270,8 +270,9 @@ textarea {
270
270
  }
271
271
  textarea::placeholder { color: rgba(var(--ctp-subtext-rgb), 0.62); }
272
272
  #promptInput {
273
+ --prompt-input-block-chrome: calc(1.8rem + 2px);
273
274
  min-height: calc(1.5em + 1.8rem);
274
- max-height: min(25vh, 10rem);
275
+ max-height: calc(6lh + var(--prompt-input-block-chrome));
275
276
  resize: none;
276
277
  overflow-y: auto;
277
278
  overscroll-behavior-y: contain;
@@ -5459,7 +5460,7 @@ button.subagent-gate-attempt:focus-visible {
5459
5460
  body.terminal-tabs-left .chat-panel {
5460
5461
  display: grid;
5461
5462
  grid-template-columns: minmax(0, 1fr) minmax(13rem, var(--terminal-tabs-sidebar-width));
5462
- grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto auto auto auto auto;
5463
+ grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto auto auto auto;
5463
5464
  align-items: stretch;
5464
5465
  overflow: visible;
5465
5466
  }
@@ -5564,11 +5565,9 @@ button.subagent-gate-attempt:focus-visible {
5564
5565
  body.terminal-tabs-left .widget-area,
5565
5566
  body.terminal-tabs-left .subagent-terminal-view,
5566
5567
  body.terminal-tabs-left .chat-search-bar,
5567
- body.terminal-tabs-left .main-output-loading,
5568
- body.terminal-tabs-left .chat,
5568
+ body.terminal-tabs-left .main-output-surface,
5569
5569
  body.terminal-tabs-left .run-indicator-host,
5570
5570
  body.terminal-tabs-left .feedback-tray,
5571
- body.terminal-tabs-left .jump-to-latest-button,
5572
5571
  body.terminal-tabs-left .statusbar,
5573
5572
  body.terminal-tabs-left .context-meter-bar,
5574
5573
  body.terminal-tabs-left .git-workflow-panel,
@@ -5582,17 +5581,15 @@ button.subagent-gate-attempt:focus-visible {
5582
5581
  body.terminal-tabs-left .widget-area { grid-row: 2; }
5583
5582
  body.terminal-tabs-left .subagent-terminal-view { grid-row: 1 / -1; }
5584
5583
  body.terminal-tabs-left .chat-search-bar { grid-row: 3; }
5585
- body.terminal-tabs-left .main-output-loading,
5586
- body.terminal-tabs-left .chat { grid-row: 4; }
5587
- body.terminal-tabs-left .main-output-loading { align-self: start; justify-self: center; margin-top: 0.75rem; }
5584
+ body.terminal-tabs-left .main-output-surface { grid-row: 4; }
5585
+ body.terminal-tabs-left .main-output-loading { top: 0.75rem; }
5588
5586
  body.terminal-tabs-left .run-indicator-host { grid-row: 5; }
5589
5587
  body.terminal-tabs-left .feedback-tray { grid-row: 6; }
5590
- body.terminal-tabs-left .jump-to-latest-button { grid-row: 7; }
5591
- body.terminal-tabs-left .statusbar { grid-row: 8; }
5592
- body.terminal-tabs-left .context-meter-bar { grid-row: 9; }
5593
- body.terminal-tabs-left .git-workflow-panel { grid-row: 10; }
5588
+ body.terminal-tabs-left .statusbar { grid-row: 7; }
5589
+ body.terminal-tabs-left .context-meter-bar { grid-row: 8; }
5590
+ body.terminal-tabs-left .git-workflow-panel { grid-row: 9; }
5594
5591
  body.terminal-tabs-left .composer,
5595
- body.terminal-tabs-left .composer-remote-mic-consent { grid-row: 11; }
5592
+ body.terminal-tabs-left .composer-remote-mic-consent { grid-row: 10; }
5596
5593
  body.terminal-tabs-left .side-panel-button-chevron { transform: scaleX(-1); }
5597
5594
 
5598
5595
  body.terminal-tabs-left.terminal-tabs-sidebar-start .chat-panel {
@@ -5619,11 +5616,9 @@ button.subagent-gate-attempt:focus-visible {
5619
5616
  body.terminal-tabs-left.terminal-tabs-sidebar-start .widget-area,
5620
5617
  body.terminal-tabs-left.terminal-tabs-sidebar-start .subagent-terminal-view,
5621
5618
  body.terminal-tabs-left.terminal-tabs-sidebar-start .chat-search-bar,
5622
- body.terminal-tabs-left.terminal-tabs-sidebar-start .main-output-loading,
5623
- body.terminal-tabs-left.terminal-tabs-sidebar-start .chat,
5619
+ body.terminal-tabs-left.terminal-tabs-sidebar-start .main-output-surface,
5624
5620
  body.terminal-tabs-left.terminal-tabs-sidebar-start .run-indicator-host,
5625
5621
  body.terminal-tabs-left.terminal-tabs-sidebar-start .feedback-tray,
5626
- body.terminal-tabs-left.terminal-tabs-sidebar-start .jump-to-latest-button,
5627
5622
  body.terminal-tabs-left.terminal-tabs-sidebar-start .statusbar,
5628
5623
  body.terminal-tabs-left.terminal-tabs-sidebar-start .context-meter-bar,
5629
5624
  body.terminal-tabs-left.terminal-tabs-sidebar-start .git-workflow-panel,
@@ -6103,6 +6098,17 @@ button.footer-meta {
6103
6098
  .footer-worktree.footer-meta-action {
6104
6099
  border-color: rgba(166, 227, 161, 0.24);
6105
6100
  }
6101
+ body.footer-model-picker-open .workspace-column {
6102
+ position: relative;
6103
+ z-index: 112;
6104
+ }
6105
+ body.footer-model-picker-open .workspace-column > .chat-panel,
6106
+ body.footer-model-picker-open .statusbar {
6107
+ overflow: visible;
6108
+ }
6109
+ body.footer-model-picker-open .statusbar {
6110
+ z-index: 113;
6111
+ }
6106
6112
  .footer-model-picker {
6107
6113
  position: absolute;
6108
6114
  left: var(--footer-model-picker-left, auto);
@@ -6122,6 +6128,59 @@ button.footer-meta {
6122
6128
  linear-gradient(145deg, rgba(var(--ctp-crust-rgb), 0.98), rgba(var(--ctp-base-rgb), 0.96));
6123
6129
  box-shadow: 0 1.2rem 2.8rem rgba(var(--ctp-crust-rgb), 0.68), 0 0 1.4rem rgba(148, 226, 213, 0.14), inset 0 1px 0 rgba(255,255,255,0.055);
6124
6130
  }
6131
+ .footer-model-picker-advanced {
6132
+ width: max-content;
6133
+ min-width: min(14.5rem, calc(100vw - 1rem));
6134
+ max-width: calc(100vw - 1rem);
6135
+ overflow: hidden;
6136
+ }
6137
+ .footer-model-picker-advanced .footer-model-picker-source {
6138
+ width: 100%;
6139
+ max-width: none;
6140
+ }
6141
+ .footer-model-provider-columns {
6142
+ display: grid;
6143
+ grid-auto-flow: column;
6144
+ grid-auto-columns: 13rem;
6145
+ align-items: start;
6146
+ gap: 0.58rem;
6147
+ width: fit-content;
6148
+ min-width: 0;
6149
+ max-width: calc(100vw - 2.5rem);
6150
+ max-height: min(38dvh, 22rem);
6151
+ overflow: auto;
6152
+ padding: 0.08rem 0.08rem 0.3rem;
6153
+ overscroll-behavior: contain;
6154
+ scrollbar-gutter: stable;
6155
+ }
6156
+ .footer-model-provider-column {
6157
+ display: grid;
6158
+ gap: 0.34rem;
6159
+ min-width: 0;
6160
+ padding: 0.48rem;
6161
+ border: 1px solid rgba(180, 190, 254, 0.18);
6162
+ border-radius: 0.78rem;
6163
+ background: rgba(var(--ctp-crust-rgb), 0.46);
6164
+ transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
6165
+ }
6166
+ .footer-model-provider-column:focus-within {
6167
+ border-color: rgba(148, 226, 213, 0.56);
6168
+ background: rgba(148, 226, 213, 0.06);
6169
+ box-shadow: 0 0 0 2px rgba(148, 226, 213, 0.10), 0 0 1rem rgba(148, 226, 213, 0.14);
6170
+ }
6171
+ .footer-model-provider-title {
6172
+ min-width: 0;
6173
+ padding: 0.08rem 0.16rem 0.28rem;
6174
+ overflow: hidden;
6175
+ color: var(--ctp-pink);
6176
+ border-bottom: 1px solid rgba(245, 194, 231, 0.22);
6177
+ font-size: var(--text-xs);
6178
+ font-weight: 950;
6179
+ letter-spacing: 0.09em;
6180
+ text-overflow: ellipsis;
6181
+ text-transform: uppercase;
6182
+ white-space: nowrap;
6183
+ }
6125
6184
  .footer-model-picker-title {
6126
6185
  color: var(--ctp-teal);
6127
6186
  font-size: var(--text-xs);
@@ -6187,12 +6246,24 @@ button.footer-meta {
6187
6246
  border-color: rgba(166, 227, 161, 0.46);
6188
6247
  box-shadow: inset 3px 0 0 var(--ctp-green), 0 0 1rem rgba(166, 227, 161, 0.14);
6189
6248
  }
6190
- .footer-model-option[data-footer-model-key] {
6249
+ .footer-model-picker:not(.footer-model-picker-advanced) .footer-model-option[data-footer-model-key] {
6191
6250
  position: relative;
6192
6251
  cursor: grab;
6193
6252
  touch-action: none;
6194
6253
  user-select: none;
6195
6254
  }
6255
+ .footer-model-picker-advanced .footer-model-option[data-footer-model-key] {
6256
+ min-width: 0;
6257
+ cursor: grab;
6258
+ touch-action: none;
6259
+ user-select: none;
6260
+ }
6261
+ .footer-model-picker-advanced .footer-model-option:focus-visible {
6262
+ border-color: var(--ctp-teal);
6263
+ outline: 2px solid rgba(148, 226, 213, 0.74);
6264
+ outline-offset: 1px;
6265
+ box-shadow: inset 3px 0 0 var(--ctp-teal), 0 0 0 3px rgba(148, 226, 213, 0.13), 0 0 1rem rgba(148, 226, 213, 0.22);
6266
+ }
6196
6267
  .footer-model-option.dragging {
6197
6268
  cursor: grabbing;
6198
6269
  border-color: rgba(148, 226, 213, 0.72);
@@ -8216,6 +8287,13 @@ button.git-workflow-step:hover:not(:disabled) {
8216
8287
  color: rgba(var(--ctp-subtext-rgb), 0.64);
8217
8288
  font-size: var(--text-xs);
8218
8289
  }
8290
+ .main-output-surface {
8291
+ position: relative;
8292
+ display: flex;
8293
+ flex: 1 1 auto;
8294
+ min-width: 0;
8295
+ min-height: 0;
8296
+ }
8219
8297
  .chat {
8220
8298
  position: relative;
8221
8299
  display: flex;
@@ -8229,15 +8307,16 @@ button.git-workflow-step:hover:not(:disabled) {
8229
8307
  }
8230
8308
  .main-output-loading[hidden] { display: none !important; }
8231
8309
  .main-output-loading {
8232
- position: relative;
8310
+ position: absolute;
8233
8311
  z-index: 13;
8312
+ top: 0.55rem;
8313
+ left: 50%;
8234
8314
  display: inline-flex;
8235
- flex: 0 0 auto;
8236
- align-self: center;
8237
8315
  align-items: center;
8238
8316
  gap: 0.48rem;
8239
8317
  max-width: calc(100% - 1.2rem);
8240
- margin: 0.55rem auto 0;
8318
+ margin: 0;
8319
+ transform: translateX(-50%);
8241
8320
  padding: 0.42rem 0.7rem;
8242
8321
  pointer-events: none;
8243
8322
  user-select: none;
@@ -8323,15 +8402,24 @@ button.git-workflow-step:hover:not(:disabled) {
8323
8402
  }
8324
8403
  .jump-to-latest-button[hidden] { display: none; }
8325
8404
  .jump-to-latest-button {
8326
- align-self: center;
8327
- z-index: 3;
8328
- margin: 0.45rem 0;
8405
+ position: absolute;
8406
+ z-index: 14;
8407
+ bottom: 0.75rem;
8408
+ left: 50%;
8409
+ margin: 0;
8410
+ transform: translateX(-50%);
8329
8411
  color: #11111b;
8330
8412
  font-weight: 900;
8331
8413
  background: linear-gradient(120deg, var(--ctp-teal), var(--ctp-blue), var(--ctp-mauve));
8332
8414
  border-color: transparent;
8333
8415
  box-shadow: 0 0 1.2rem var(--glow-teal), 0 0.7rem 1.6rem rgba(0, 0, 0, 0.28);
8334
8416
  }
8417
+ .jump-to-latest-button:hover {
8418
+ transform: translateX(-50%) translateY(-1px);
8419
+ }
8420
+ .jump-to-latest-button:active {
8421
+ transform: translateX(-50%) translateY(0);
8422
+ }
8335
8423
  .feedback-tray[hidden] { display: none; }
8336
8424
  .feedback-tray {
8337
8425
  display: flex;
@@ -12939,8 +13027,7 @@ body:not(.mobile-keyboard-open) .composer-input-row:has(.composer-workflow-mode-
12939
13027
  }
12940
13028
  body.subagent-terminal-active .workspace-dashboard,
12941
13029
  body.subagent-terminal-active .widget-area,
12942
- body.subagent-terminal-active .main-output-loading,
12943
- body.subagent-terminal-active .chat,
13030
+ body.subagent-terminal-active .main-output-surface,
12944
13031
  body.subagent-terminal-active .feedback-tray,
12945
13032
  body.subagent-terminal-active .jump-to-latest-button,
12946
13033
  body.subagent-terminal-active .statusbar,
@@ -14585,12 +14672,19 @@ body.subagent-terminal-active .composer-remote-mic-consent {
14585
14672
  color: var(--ctp-teal);
14586
14673
  border-color: rgba(148, 226, 213, 0.30);
14587
14674
  }
14675
+ .path-picker-path-row,
14588
14676
  .path-picker-create-row {
14589
14677
  display: grid;
14590
14678
  grid-template-columns: minmax(0, 1fr) auto;
14591
14679
  gap: 0.45rem;
14680
+ }
14681
+ .path-picker-path-row {
14682
+ margin: 0.72rem 0 0;
14683
+ }
14684
+ .path-picker-create-row {
14592
14685
  margin: 0 0 0.72rem;
14593
14686
  }
14687
+ .path-picker-path-input,
14594
14688
  .path-picker-create-input {
14595
14689
  min-width: 0;
14596
14690
  width: 100%;
@@ -14599,11 +14693,14 @@ body.subagent-terminal-active .composer-remote-mic-consent {
14599
14693
  border-color: rgba(137, 180, 250, 0.20);
14600
14694
  background: rgba(var(--ctp-surface-rgb), 0.38);
14601
14695
  }
14696
+ .path-picker-path-button,
14602
14697
  .path-picker-create-button {
14603
14698
  align-self: stretch;
14604
14699
  color: var(--ctp-blue);
14605
14700
  border-color: rgba(137, 180, 250, 0.32);
14606
14701
  }
14702
+ .path-picker-path-button:hover,
14703
+ .path-picker-path-button:focus-visible,
14607
14704
  .path-picker-create-button:hover,
14608
14705
  .path-picker-create-button:focus-visible {
14609
14706
  color: #11111b;
@@ -14614,7 +14711,7 @@ body.subagent-terminal-active .composer-remote-mic-consent {
14614
14711
  display: grid;
14615
14712
  grid-template-columns: minmax(0, 1fr) auto;
14616
14713
  gap: 0.45rem;
14617
- margin: 0 0 0.38rem;
14714
+ margin: 0.72rem 0 0.38rem;
14618
14715
  }
14619
14716
  .path-picker-search-input {
14620
14717
  min-width: 0;
@@ -15406,7 +15503,7 @@ button.git-workflow-step { min-height: 1.9rem; }
15406
15503
  }
15407
15504
  .jump-to-latest-button {
15408
15505
  min-height: 44px;
15409
- margin: 0.35rem auto;
15506
+ margin: 0;
15410
15507
  padding: 0.55rem 0.92rem;
15411
15508
  font-size: 0.86rem;
15412
15509
  }
@@ -15515,9 +15612,24 @@ button.git-workflow-step { min-height: 1.9rem; }
15515
15612
  right: max(0.55rem, env(safe-area-inset-right));
15516
15613
  bottom: var(--footer-model-picker-bottom, calc(7.2rem + env(safe-area-inset-bottom)));
15517
15614
  width: auto;
15615
+ max-width: none;
15518
15616
  max-height: min(52dvh, 24rem);
15519
15617
  z-index: 60;
15520
15618
  }
15619
+ .footer-model-picker-advanced {
15620
+ overflow: hidden;
15621
+ }
15622
+ .footer-model-provider-columns {
15623
+ grid-auto-flow: row;
15624
+ grid-template-columns: minmax(0, 1fr);
15625
+ grid-auto-columns: auto;
15626
+ max-height: min(38dvh, 17rem);
15627
+ overflow-x: hidden;
15628
+ overflow-y: auto;
15629
+ }
15630
+ .footer-model-provider-column {
15631
+ width: 100%;
15632
+ }
15521
15633
  .footer-line-main {
15522
15634
  display: none;
15523
15635
  grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -15642,8 +15754,9 @@ button.git-workflow-step { min-height: 1.9rem; }
15642
15754
  border-radius: 0.72rem;
15643
15755
  }
15644
15756
  #promptInput {
15757
+ --prompt-input-block-chrome: calc(1.04rem + 2px);
15645
15758
  min-height: calc(1.35em + 1.05rem);
15646
- max-height: min(24dvh, 10rem);
15759
+ max-height: calc(6lh + var(--prompt-input-block-chrome));
15647
15760
  padding: 0.52rem 0.62rem;
15648
15761
  resize: none;
15649
15762
  font-size: 0.95rem;
@@ -15680,7 +15793,7 @@ button.git-workflow-step { min-height: 1.9rem; }
15680
15793
  }
15681
15794
  body.mobile-keyboard-open #promptInput {
15682
15795
  min-height: calc(1.35em + 1.05rem);
15683
- max-height: min(22dvh, 8rem);
15796
+ max-height: min(22dvh, calc(6lh + var(--prompt-input-block-chrome)));
15684
15797
  }
15685
15798
  body.mobile-keyboard-open .composer-row {
15686
15799
  grid-template-columns: 1fr;
@@ -16204,9 +16317,11 @@ button.git-workflow-step { min-height: 1.9rem; }
16204
16317
  .app-runner-stdin-send,
16205
16318
  .app-runner-stdin-eof { width: 100%; }
16206
16319
  .path-picker-current-row,
16320
+ .path-picker-path-row,
16207
16321
  .path-picker-create-row,
16208
16322
  .path-picker-search-row { grid-template-columns: 1fr; }
16209
16323
  .path-picker-add-fast-pick,
16324
+ .path-picker-path-button,
16210
16325
  .path-picker-create-button,
16211
16326
  .path-picker-clear-search-button { width: 100%; }
16212
16327
  .path-picker-fast-pick { grid-template-columns: minmax(0, 1fr) 44px; }
@@ -18160,7 +18275,6 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
18160
18275
  html[data-mobile-shell="v2"][data-mobile-presentation="essential"] .thinking-block:not([open]) > :not(summary) { display: none; }
18161
18276
  html[data-mobile-shell="v2"] .message .message-collapse > summary,
18162
18277
  html[data-mobile-shell="v2"] .thinking-block > summary { min-height: 44px; }
18163
- html[data-mobile-shell="v2"] .jump-to-latest-button { bottom: calc(7.3rem + env(safe-area-inset-bottom)); }
18164
18278
  html[data-mobile-shell="v2"] body.mobile-keyboard-open .mobile-shell-nav { display: none; }
18165
18279
  html[data-mobile-shell="v2"] body.mobile-keyboard-open .widget-area,
18166
18280
  html[data-mobile-shell="v2"] body.mobile-keyboard-open .statusbar { display: grid !important; }
@@ -19379,6 +19493,7 @@ body:has(#undoToast:not([hidden])) .notice-toast-stack { bottom: calc(max(1rem,
19379
19493
  .composer-input-row { gap: 0.28rem; }
19380
19494
  .composer-attach-button { padding: 0.36rem; border-radius: 0.64rem; }
19381
19495
  #promptInput {
19496
+ --prompt-input-block-chrome: calc(0.88rem + 2px);
19382
19497
  min-height: calc(1.3em + 0.88rem);
19383
19498
  padding: 0.44rem 0.52rem;
19384
19499
  font-size: 0.88rem;
@@ -19494,7 +19609,6 @@ body:has(#undoToast:not([hidden])) .notice-toast-stack { bottom: calc(max(1rem,
19494
19609
  html[data-mobile-shell="v2"] .mobile-continuity-notice { top: calc(4.8rem + env(safe-area-inset-top)); right: 0.58rem; left: 0.58rem; padding: 0.44rem 0.56rem; }
19495
19610
  html[data-mobile-shell="v2"] .mobile-failed-send-recovery { gap: 0.3rem; padding: 0.38rem; }
19496
19611
  html[data-mobile-shell="v2"] .mobile-indicator { min-height: 1.2rem; padding: 0.06rem 0.3rem; font-size: 0.7rem; }
19497
- html[data-mobile-shell="v2"] .jump-to-latest-button { bottom: calc(6.75rem + env(safe-area-inset-bottom)); }
19498
19612
  html[data-mobile-shell="v2"] body.mobile-keyboard-open .composer { padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)); }
19499
19613
  }
19500
19614