@firstpick/pi-package-webui 0.9.5 → 0.9.6
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 +5 -3
- package/bin/pi-webui.mjs +90 -5
- package/lib/optional-feature-catalog.mjs +1 -1
- package/lib/session-actions.mjs +20 -2
- package/package.json +1 -1
- package/public/app.js +1823 -262
- package/public/index.html +51 -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 +249 -18
- 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/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/composer-action-grid-reorder-static.test.mjs +8 -7
- package/tests/control-visibility-static.test.mjs +3 -3
- package/tests/controls-layout-static.test.mjs +3 -3
- package/tests/cwd-footer-reliability-static.test.mjs +1 -1
- package/tests/fast-mode-client-static.test.mjs +1 -1
- package/tests/feature-decision-output-popup-static.test.mjs +2 -2
- package/tests/file-viewer-image-static.test.mjs +3 -3
- package/tests/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/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 +74 -63
- 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/runtime-error-visibility.test.mjs +3 -3
- package/tests/session-auth-harness.test.mjs +26 -1
- package/tests/session-sampling-ui-static.test.mjs +3 -3
- 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-observability-static.test.mjs +2 -2
- package/tests/syntax-highlighting-static.test.mjs +3 -3
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/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/public/styles.css
CHANGED
|
@@ -273,7 +273,8 @@ textarea::placeholder { color: rgba(var(--ctp-subtext-rgb), 0.62); }
|
|
|
273
273
|
min-height: calc(1.5em + 1.8rem);
|
|
274
274
|
max-height: min(25vh, 10rem);
|
|
275
275
|
resize: none;
|
|
276
|
-
overflow-y:
|
|
276
|
+
overflow-y: auto;
|
|
277
|
+
overscroll-behavior-y: contain;
|
|
277
278
|
}
|
|
278
279
|
|
|
279
280
|
.topbar {
|
|
@@ -351,7 +352,8 @@ body.terminal-split-open.file-viewer-open .workspace-column { grid-template-colu
|
|
|
351
352
|
.layout > .side-panel-right { min-width: 0; min-height: 0; }
|
|
352
353
|
.layout > .side-panel-left[hidden],
|
|
353
354
|
.layout > .side-panel-right[hidden] { display: none !important; }
|
|
354
|
-
|
|
355
|
+
/* :where() keeps this default at (0,1,1) so the collapsed/overlay rules below always win. */
|
|
356
|
+
body:where(:not(.control-deck-left):not(.control-deck-both)) .layout { grid-template-columns: minmax(0, 1fr) minmax(20rem, var(--side-panel-right-width, var(--side-panel-width))); }
|
|
355
357
|
body.control-deck-left .layout { grid-template-columns: minmax(20rem, var(--side-panel-left-width, 384px)) minmax(0, 1fr); }
|
|
356
358
|
body.control-deck-both .layout { grid-template-columns: minmax(20rem, var(--side-panel-left-width, 384px)) minmax(0, 1fr) minmax(20rem, var(--side-panel-right-width, var(--side-panel-width))); }
|
|
357
359
|
body.side-panel-right-collapsed.control-deck-right .layout,
|
|
@@ -1860,9 +1862,29 @@ body.control-deck-section-dragging .side-panel-empty-drop-target {
|
|
|
1860
1862
|
padding-left: 0.3rem;
|
|
1861
1863
|
border-left: 1px solid rgba(180, 190, 254, 0.14);
|
|
1862
1864
|
}
|
|
1865
|
+
.git-side-panel-repository-header {
|
|
1866
|
+
display: flex;
|
|
1867
|
+
align-items: stretch;
|
|
1868
|
+
min-width: 0;
|
|
1869
|
+
}
|
|
1870
|
+
.git-side-panel-repository-header > .git-side-panel-repository-toggle { flex: 1 1 auto; min-width: 0; }
|
|
1871
|
+
.git-side-panel-repository-header > .git-side-panel-overflow-button {
|
|
1872
|
+
align-self: center;
|
|
1873
|
+
margin-right: 0.3rem;
|
|
1874
|
+
color: var(--ctp-subtext);
|
|
1875
|
+
}
|
|
1876
|
+
.git-side-panel-file > .git-side-panel-overflow-button {
|
|
1877
|
+
width: 1.7rem;
|
|
1878
|
+
min-width: 1.7rem;
|
|
1879
|
+
min-height: 1.7rem;
|
|
1880
|
+
color: var(--ctp-subtext);
|
|
1881
|
+
opacity: 0.75;
|
|
1882
|
+
}
|
|
1883
|
+
.git-side-panel-file:hover > .git-side-panel-overflow-button,
|
|
1884
|
+
.git-side-panel-file:focus-within > .git-side-panel-overflow-button { opacity: 1; }
|
|
1863
1885
|
.git-side-panel-file {
|
|
1864
1886
|
display: grid;
|
|
1865
|
-
grid-template-columns: 1.3rem minmax(5rem, 1fr) auto;
|
|
1887
|
+
grid-template-columns: 1.3rem minmax(5rem, 1fr) auto auto;
|
|
1866
1888
|
align-items: center;
|
|
1867
1889
|
gap: 0.26rem;
|
|
1868
1890
|
min-width: 0;
|
|
@@ -1947,10 +1969,12 @@ body.control-deck-section-dragging .side-panel-empty-drop-target {
|
|
|
1947
1969
|
}
|
|
1948
1970
|
.file-tree-toolbar {
|
|
1949
1971
|
display: grid;
|
|
1950
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
1972
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
1951
1973
|
gap: 0.55rem;
|
|
1952
1974
|
align-items: start;
|
|
1953
1975
|
}
|
|
1976
|
+
.text-prompt-dialog { width: min(34rem, calc(100vw - 2rem)); }
|
|
1977
|
+
.text-prompt-dialog .dialog-input { width: 100%; margin: 0.6rem 0 0.4rem; }
|
|
1954
1978
|
.file-tree-toolbar strong {
|
|
1955
1979
|
display: block;
|
|
1956
1980
|
color: var(--ctp-text);
|
|
@@ -2420,6 +2444,12 @@ body.control-deck-section-dragging .side-panel-empty-drop-target {
|
|
|
2420
2444
|
border-color: rgba(148, 226, 213, 0.28);
|
|
2421
2445
|
font-weight: 800;
|
|
2422
2446
|
}
|
|
2447
|
+
.control-action-row .control-apply-button.pending {
|
|
2448
|
+
border-color: rgba(249, 226, 175, 0.75);
|
|
2449
|
+
box-shadow: 0 0 0 1px rgba(249, 226, 175, 0.35), 0 0 0.9rem rgba(249, 226, 175, 0.25);
|
|
2450
|
+
color: var(--ctp-yellow);
|
|
2451
|
+
}
|
|
2452
|
+
.control-action-row .control-apply-button.pending::after { content: " •"; }
|
|
2423
2453
|
.control-action-row .control-apply-button:hover,
|
|
2424
2454
|
.control-action-row .control-apply-button:focus-visible {
|
|
2425
2455
|
color: #11111b;
|
|
@@ -3717,7 +3747,7 @@ body.control-deck-section-dragging .side-panel-empty-drop-target {
|
|
|
3717
3747
|
border-radius: 999px;
|
|
3718
3748
|
color: var(--ctp-blue);
|
|
3719
3749
|
background: rgba(137, 180, 250, 0.08);
|
|
3720
|
-
font-size:
|
|
3750
|
+
font-size: var(--text-xs);
|
|
3721
3751
|
font-weight: 850;
|
|
3722
3752
|
line-height: 1.2;
|
|
3723
3753
|
text-overflow: ellipsis;
|
|
@@ -8465,7 +8495,12 @@ button.git-workflow-step:hover:not(:disabled) {
|
|
|
8465
8495
|
}
|
|
8466
8496
|
.message.streaming {
|
|
8467
8497
|
outline: 1px solid rgba(148, 226, 213, 0.72);
|
|
8468
|
-
|
|
8498
|
+
/* Streaming cards repaint on every token; keep the glow cheap (small blur, single layer). */
|
|
8499
|
+
box-shadow: 0 0 0.6rem var(--glow-teal);
|
|
8500
|
+
}
|
|
8501
|
+
@media (max-width: 720px), (pointer: coarse) and (hover: none) {
|
|
8502
|
+
.message { box-shadow: none; }
|
|
8503
|
+
.message::before { box-shadow: none; }
|
|
8469
8504
|
}
|
|
8470
8505
|
.message.run-indicator-message {
|
|
8471
8506
|
margin-bottom: 0.5rem;
|
|
@@ -8520,6 +8555,13 @@ button.git-workflow-step:hover:not(:disabled) {
|
|
|
8520
8555
|
text-overflow: ellipsis;
|
|
8521
8556
|
white-space: nowrap;
|
|
8522
8557
|
}
|
|
8558
|
+
.run-indicator-elapsed {
|
|
8559
|
+
flex: 0 0 auto;
|
|
8560
|
+
color: rgba(var(--ctp-text-rgb), 0.62);
|
|
8561
|
+
font-size: var(--text-xs);
|
|
8562
|
+
font-variant-numeric: tabular-nums;
|
|
8563
|
+
white-space: nowrap;
|
|
8564
|
+
}
|
|
8523
8565
|
@keyframes run-indicator-pulse {
|
|
8524
8566
|
0%, 100% { transform: scale(0.78); opacity: 0.62; }
|
|
8525
8567
|
50% { transform: scale(1.16); opacity: 1; }
|
|
@@ -8605,6 +8647,18 @@ button.git-workflow-step:hover:not(:disabled) {
|
|
|
8605
8647
|
transition: transform 140ms ease;
|
|
8606
8648
|
}
|
|
8607
8649
|
.message-collapse[open] > summary.message-header::after { transform: rotate(90deg); }
|
|
8650
|
+
.thinking-disclosure > .message-header { cursor: pointer; flex-wrap: wrap; }
|
|
8651
|
+
.thinking-disclosure-preview {
|
|
8652
|
+
flex: 1 1 100%;
|
|
8653
|
+
min-width: 0;
|
|
8654
|
+
overflow: hidden;
|
|
8655
|
+
color: rgba(var(--ctp-subtext-rgb), 0.78);
|
|
8656
|
+
font-style: italic;
|
|
8657
|
+
font-size: var(--text-sm);
|
|
8658
|
+
text-overflow: ellipsis;
|
|
8659
|
+
white-space: nowrap;
|
|
8660
|
+
}
|
|
8661
|
+
.thinking-disclosure[open] > .message-header > .thinking-disclosure-preview { display: none; }
|
|
8608
8662
|
.message-collapse > .message-body {
|
|
8609
8663
|
padding: 0 0.9rem 0.85rem;
|
|
8610
8664
|
border-top: 1px solid rgba(249, 226, 175, 0.12);
|
|
@@ -10069,6 +10123,16 @@ button.composer-skill-tag:focus-visible {
|
|
|
10069
10123
|
text-transform: uppercase;
|
|
10070
10124
|
letter-spacing: 0.08em;
|
|
10071
10125
|
}
|
|
10126
|
+
.command-suggest-hint {
|
|
10127
|
+
position: sticky;
|
|
10128
|
+
bottom: 0;
|
|
10129
|
+
padding: 0.32rem 0.75rem;
|
|
10130
|
+
border-top: 1px solid rgba(180, 190, 254, 0.12);
|
|
10131
|
+
background: rgba(var(--ctp-crust-rgb), 0.96);
|
|
10132
|
+
color: rgba(var(--ctp-subtext-rgb), 0.78);
|
|
10133
|
+
font-size: var(--text-xs);
|
|
10134
|
+
letter-spacing: 0.02em;
|
|
10135
|
+
}
|
|
10072
10136
|
.command-suggest-empty {
|
|
10073
10137
|
padding: 0.7rem 0.8rem;
|
|
10074
10138
|
color: var(--muted);
|
|
@@ -10086,7 +10150,7 @@ body.composer-action-grid-enabled .composer-row {
|
|
|
10086
10150
|
--composer-action-cell-min-width: 3.2rem;
|
|
10087
10151
|
position: relative;
|
|
10088
10152
|
display: grid;
|
|
10089
|
-
grid-template-columns: repeat(auto-fill,
|
|
10153
|
+
grid-template-columns: repeat(auto-fill, var(--composer-action-cell-min-width));
|
|
10090
10154
|
grid-auto-flow: dense;
|
|
10091
10155
|
align-items: stretch;
|
|
10092
10156
|
}
|
|
@@ -10124,7 +10188,7 @@ body.composer-action-grid-enabled.composer-action-drag-active .composer-row > .c
|
|
|
10124
10188
|
z-index: 0;
|
|
10125
10189
|
inset: 0;
|
|
10126
10190
|
display: grid;
|
|
10127
|
-
grid-template-columns: repeat(auto-fill,
|
|
10191
|
+
grid-template-columns: repeat(auto-fill, var(--composer-action-cell-min-width));
|
|
10128
10192
|
grid-template-rows: repeat(var(--composer-action-grid-rows, 1), minmax(0, 1fr));
|
|
10129
10193
|
gap: 0.5rem;
|
|
10130
10194
|
pointer-events: none;
|
|
@@ -10199,11 +10263,20 @@ body.composer-action-grid-enabled .composer-row [data-composer-action-id].compos
|
|
|
10199
10263
|
background: linear-gradient(90deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08));
|
|
10200
10264
|
transform: scaleX(0);
|
|
10201
10265
|
transform-origin: left center;
|
|
10202
|
-
animation: abort-long-press-fill var(--abort-long-press-duration,
|
|
10266
|
+
animation: abort-long-press-fill var(--abort-long-press-duration, 1200ms) linear forwards;
|
|
10203
10267
|
}
|
|
10204
10268
|
@keyframes abort-long-press-fill {
|
|
10205
10269
|
to { transform: scaleX(1); }
|
|
10206
10270
|
}
|
|
10271
|
+
.composer-abort-button.tap-hint {
|
|
10272
|
+
animation: abort-tap-hint 0.36s ease-in-out;
|
|
10273
|
+
border-color: rgba(249, 226, 175, 0.75);
|
|
10274
|
+
}
|
|
10275
|
+
@keyframes abort-tap-hint {
|
|
10276
|
+
0%, 100% { transform: translateX(0); }
|
|
10277
|
+
25% { transform: translateX(-3px); }
|
|
10278
|
+
75% { transform: translateX(3px); }
|
|
10279
|
+
}
|
|
10207
10280
|
.composer-row label {
|
|
10208
10281
|
display: flex;
|
|
10209
10282
|
align-items: center;
|
|
@@ -10506,6 +10579,9 @@ body:not(.mobile-keyboard-open) .composer-input-row:has(.composer-workflow-mode-
|
|
|
10506
10579
|
.composer-publish-menu.open .composer-publish-menu-panel {
|
|
10507
10580
|
display: flex;
|
|
10508
10581
|
}
|
|
10582
|
+
/* After Escape (or choosing an item) the menu stays closed even though the pointer still hovers
|
|
10583
|
+
the trigger or the trigger keeps focus; hovering away and back (or clicking) reopens it. */
|
|
10584
|
+
.composer-publish-menu.menu-dismissed:not(.open) .composer-publish-menu-panel { display: none; }
|
|
10509
10585
|
.composer-auto-height-menu-panel {
|
|
10510
10586
|
height: auto;
|
|
10511
10587
|
max-height: none;
|
|
@@ -13870,6 +13946,23 @@ body.subagent-terminal-active .composer-remote-mic-consent {
|
|
|
13870
13946
|
border-color: rgba(148, 226, 213, 0.45);
|
|
13871
13947
|
background: linear-gradient(90deg, rgba(148, 226, 213, 0.16), rgba(137, 180, 250, 0.10));
|
|
13872
13948
|
}
|
|
13949
|
+
.native-selector-group {
|
|
13950
|
+
position: sticky;
|
|
13951
|
+
top: 0;
|
|
13952
|
+
z-index: 1;
|
|
13953
|
+
margin-top: 0.3rem;
|
|
13954
|
+
padding: 0.2rem 0.4rem;
|
|
13955
|
+
color: var(--ctp-subtext);
|
|
13956
|
+
background: rgba(var(--ctp-base-rgb), 0.96);
|
|
13957
|
+
font-size: var(--text-xs);
|
|
13958
|
+
font-weight: 900;
|
|
13959
|
+
letter-spacing: 0.08em;
|
|
13960
|
+
text-transform: uppercase;
|
|
13961
|
+
}
|
|
13962
|
+
.native-selector-item.keyboard-active {
|
|
13963
|
+
border-color: rgba(148, 226, 213, 0.72);
|
|
13964
|
+
box-shadow: inset 3px 0 0 var(--ctp-teal), 0 0 0 1px rgba(148, 226, 213, 0.28);
|
|
13965
|
+
}
|
|
13873
13966
|
.native-selector-item:disabled {
|
|
13874
13967
|
cursor: default;
|
|
13875
13968
|
opacity: 0.62;
|
|
@@ -16802,10 +16895,13 @@ button.workspace-dashboard-chip {
|
|
|
16802
16895
|
.command-palette-item {
|
|
16803
16896
|
display: grid;
|
|
16804
16897
|
grid-template-columns: 4.8rem minmax(0, 1fr);
|
|
16898
|
+
/* Chromium sizes <button> grid tracks against the button's own line box, which squeezed the
|
|
16899
|
+
title row below its text height (clipped ascenders). Force content-sized rows instead. */
|
|
16900
|
+
grid-template-rows: minmax(min-content, auto) minmax(min-content, auto);
|
|
16805
16901
|
gap: 0.1rem 0.7rem;
|
|
16806
16902
|
width: 100%;
|
|
16807
16903
|
min-width: 0;
|
|
16808
|
-
min-height: 3.
|
|
16904
|
+
min-height: 3.9rem;
|
|
16809
16905
|
padding: 0.62rem 0.74rem;
|
|
16810
16906
|
overflow: hidden;
|
|
16811
16907
|
text-align: left;
|
|
@@ -16832,10 +16928,12 @@ button.workspace-dashboard-chip {
|
|
|
16832
16928
|
white-space: nowrap;
|
|
16833
16929
|
}
|
|
16834
16930
|
.command-palette-item-label {
|
|
16931
|
+
display: block;
|
|
16835
16932
|
min-width: 0;
|
|
16836
16933
|
overflow: hidden;
|
|
16837
16934
|
color: var(--ctp-text);
|
|
16838
16935
|
font-weight: 900;
|
|
16936
|
+
line-height: 1.3;
|
|
16839
16937
|
text-overflow: ellipsis;
|
|
16840
16938
|
white-space: nowrap;
|
|
16841
16939
|
}
|
|
@@ -17000,7 +17098,7 @@ button.workspace-dashboard-chip {
|
|
|
17000
17098
|
.command-palette-item {
|
|
17001
17099
|
grid-template-columns: minmax(3.4rem, 0.26fr) minmax(0, 1fr);
|
|
17002
17100
|
gap: 0.04rem 0.46rem;
|
|
17003
|
-
min-height:
|
|
17101
|
+
min-height: 3rem;
|
|
17004
17102
|
padding: 0.42rem 0.5rem;
|
|
17005
17103
|
border-radius: 0.68rem;
|
|
17006
17104
|
line-height: 1.18;
|
|
@@ -18137,6 +18235,126 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18137
18235
|
|
|
18138
18236
|
.native-settings-remote-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
|
|
18139
18237
|
.native-settings-note.warning { border-color: rgba(249, 226, 175, 0.46); background: rgba(249, 226, 175, 0.10); }
|
|
18238
|
+
.image-block-button {
|
|
18239
|
+
display: block;
|
|
18240
|
+
width: auto;
|
|
18241
|
+
max-width: 100%;
|
|
18242
|
+
min-width: 0;
|
|
18243
|
+
min-height: 0;
|
|
18244
|
+
padding: 0;
|
|
18245
|
+
border: 0;
|
|
18246
|
+
border-radius: 0.6rem;
|
|
18247
|
+
background: transparent;
|
|
18248
|
+
box-shadow: none;
|
|
18249
|
+
cursor: zoom-in;
|
|
18250
|
+
}
|
|
18251
|
+
.image-block-button > img { display: block; }
|
|
18252
|
+
.attachment-pill-thumb-button {
|
|
18253
|
+
display: inline-grid;
|
|
18254
|
+
place-items: center;
|
|
18255
|
+
width: 2.2rem;
|
|
18256
|
+
min-width: 2.2rem;
|
|
18257
|
+
height: 2.2rem;
|
|
18258
|
+
min-height: 2.2rem;
|
|
18259
|
+
padding: 0;
|
|
18260
|
+
overflow: hidden;
|
|
18261
|
+
border-radius: 0.45rem;
|
|
18262
|
+
background: rgba(var(--ctp-crust-rgb), 0.6);
|
|
18263
|
+
cursor: zoom-in;
|
|
18264
|
+
}
|
|
18265
|
+
.attachment-pill-thumb { width: 100%; height: 100%; object-fit: cover; }
|
|
18266
|
+
.image-lightbox {
|
|
18267
|
+
width: min(96vw, 1400px);
|
|
18268
|
+
max-width: 96vw;
|
|
18269
|
+
max-height: 96vh;
|
|
18270
|
+
padding: 0.5rem;
|
|
18271
|
+
border: 1px solid rgba(180, 190, 254, 0.28);
|
|
18272
|
+
border-radius: 0.8rem;
|
|
18273
|
+
color: var(--ctp-text);
|
|
18274
|
+
background: rgba(var(--ctp-crust-rgb), 0.98);
|
|
18275
|
+
}
|
|
18276
|
+
.image-lightbox::backdrop { background: rgba(0, 0, 0, 0.72); }
|
|
18277
|
+
.image-lightbox figure { display: grid; justify-items: center; gap: 0.4rem; margin: 0; }
|
|
18278
|
+
.image-lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 0.5rem; }
|
|
18279
|
+
.image-lightbox figcaption { color: var(--ctp-subtext); font-size: var(--text-sm); }
|
|
18280
|
+
.image-lightbox-close {
|
|
18281
|
+
position: absolute;
|
|
18282
|
+
top: 0.4rem;
|
|
18283
|
+
right: 0.4rem;
|
|
18284
|
+
width: 2.4rem;
|
|
18285
|
+
min-width: 2.4rem;
|
|
18286
|
+
min-height: 2.4rem;
|
|
18287
|
+
padding: 0;
|
|
18288
|
+
}
|
|
18289
|
+
.message-actions {
|
|
18290
|
+
display: flex;
|
|
18291
|
+
flex-wrap: wrap;
|
|
18292
|
+
gap: 0.45rem;
|
|
18293
|
+
margin: 0.4rem 0.75rem 0.7rem;
|
|
18294
|
+
}
|
|
18295
|
+
.message-action-button {
|
|
18296
|
+
min-height: 2.1rem;
|
|
18297
|
+
padding: 0.25rem 0.75rem;
|
|
18298
|
+
font-size: var(--text-sm);
|
|
18299
|
+
}
|
|
18300
|
+
.message-action-button.primary {
|
|
18301
|
+
color: var(--ctp-crust);
|
|
18302
|
+
border-color: transparent;
|
|
18303
|
+
background: var(--neon-gradient);
|
|
18304
|
+
font-weight: 800;
|
|
18305
|
+
}
|
|
18306
|
+
.footer-model-option.unsupported { opacity: 0.55; }
|
|
18307
|
+
/* Non-blocking warn/error notices (P0-5): errors used to reach only the collapsed Events log. */
|
|
18308
|
+
.notice-toast-stack {
|
|
18309
|
+
position: fixed;
|
|
18310
|
+
z-index: 129;
|
|
18311
|
+
left: 50%;
|
|
18312
|
+
bottom: max(1rem, env(safe-area-inset-bottom));
|
|
18313
|
+
display: grid;
|
|
18314
|
+
gap: 0.45rem;
|
|
18315
|
+
width: min(40rem, calc(100vw - 2rem));
|
|
18316
|
+
transform: translateX(-50%);
|
|
18317
|
+
pointer-events: none;
|
|
18318
|
+
}
|
|
18319
|
+
body:has(#undoToast:not([hidden])) .notice-toast-stack { bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 5.4rem); }
|
|
18320
|
+
.notice-toast {
|
|
18321
|
+
display: grid;
|
|
18322
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
18323
|
+
align-items: center;
|
|
18324
|
+
gap: 0.2rem 0.6rem;
|
|
18325
|
+
padding: 0.62rem 0.7rem;
|
|
18326
|
+
color: var(--ctp-text);
|
|
18327
|
+
border: 1px solid rgba(249, 226, 175, 0.55);
|
|
18328
|
+
border-radius: 0.8rem;
|
|
18329
|
+
background: rgba(var(--ctp-mantle-rgb), 0.98);
|
|
18330
|
+
box-shadow: 0 1rem 2.5rem rgba(var(--ctp-crust-rgb), 0.48);
|
|
18331
|
+
pointer-events: auto;
|
|
18332
|
+
}
|
|
18333
|
+
.notice-toast.error { border-color: rgba(243, 139, 168, 0.66); }
|
|
18334
|
+
.notice-toast.info { border-color: rgba(137, 180, 250, 0.55); }
|
|
18335
|
+
.notice-toast.success { border-color: rgba(166, 227, 161, 0.55); }
|
|
18336
|
+
.notice-toast.info .notice-toast-message::before { content: "ℹ"; color: var(--ctp-blue); }
|
|
18337
|
+
.notice-toast.success .notice-toast-message::before { content: "✓"; color: var(--ctp-green); }
|
|
18338
|
+
.notice-toast-message { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
|
|
18339
|
+
.notice-toast-message::before {
|
|
18340
|
+
content: "⚠";
|
|
18341
|
+
margin-right: 0.45rem;
|
|
18342
|
+
color: var(--ctp-yellow);
|
|
18343
|
+
}
|
|
18344
|
+
.notice-toast.error .notice-toast-message::before { content: "✖"; color: var(--ctp-red); }
|
|
18345
|
+
.notice-toast-count {
|
|
18346
|
+
margin-left: 0.4rem;
|
|
18347
|
+
padding: 0 0.4rem;
|
|
18348
|
+
border-radius: 999px;
|
|
18349
|
+
background: rgba(var(--ctp-surface-rgb), 0.9);
|
|
18350
|
+
color: var(--ctp-subtext);
|
|
18351
|
+
font-size: var(--text-xs);
|
|
18352
|
+
font-weight: 900;
|
|
18353
|
+
}
|
|
18354
|
+
.notice-toast-events,
|
|
18355
|
+
.notice-toast-dismiss { min-height: 2rem; padding: 0.2rem 0.6rem; font-size: var(--text-sm); }
|
|
18356
|
+
.notice-toast-dismiss { width: 2.25rem; min-width: 2.25rem; padding-inline: 0; color: var(--ctp-subtext); }
|
|
18357
|
+
.events-unread-badge { border-color: rgba(243, 139, 168, 0.55); color: var(--ctp-red); }
|
|
18140
18358
|
.undo-toast {
|
|
18141
18359
|
--undo-timeout: 10000ms;
|
|
18142
18360
|
position: fixed;
|
|
@@ -18621,7 +18839,7 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18621
18839
|
min-width: 0;
|
|
18622
18840
|
grid-column: auto;
|
|
18623
18841
|
padding-inline: 0.28rem;
|
|
18624
|
-
font-size:
|
|
18842
|
+
font-size: var(--text-xs);
|
|
18625
18843
|
}
|
|
18626
18844
|
body.mobile-composer-disclosure.pi-run-active:not(.mobile-keyboard-open) .composer-row > #abortButton { order: 1; }
|
|
18627
18845
|
body.mobile-composer-disclosure.pi-run-active:not(.mobile-keyboard-open) .composer-row > #steerButton { order: 2; }
|
|
@@ -18817,14 +19035,14 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18817
19035
|
.terminal-tab-close { flex-basis: var(--mobile-control-size); min-width: var(--mobile-control-size); }
|
|
18818
19036
|
.terminal-tabs { gap: 0.28rem; padding: 0.42rem; }
|
|
18819
19037
|
.terminal-tab-button { padding: 0.26rem 0.44rem; }
|
|
18820
|
-
.terminal-tab-title { font-size:
|
|
19038
|
+
.terminal-tab-title { font-size: var(--text-xs); }
|
|
18821
19039
|
.terminal-new-tab-button,
|
|
18822
19040
|
.terminal-new-tab-menu-item { padding: 0.3rem 0.48rem; }
|
|
18823
19041
|
|
|
18824
19042
|
.widget-area { padding: 0.28rem 0.46rem; }
|
|
18825
19043
|
.release-npm-widget { gap: 0.36rem; padding: 0.46rem; }
|
|
18826
19044
|
.release-npm-stream-header { padding: 0.24rem 0.34rem; }
|
|
18827
|
-
.release-npm-terminal { padding: 0.44rem 0.36rem; font-size:
|
|
19045
|
+
.release-npm-terminal { padding: 0.44rem 0.36rem; font-size: var(--text-xs); }
|
|
18828
19046
|
.todo-widget { padding: 0.3rem 0.36rem; }
|
|
18829
19047
|
.todo-widget[open] { gap: 0.22rem; padding-bottom: 0.34rem; }
|
|
18830
19048
|
.todo-widget-body { gap: 0.2rem; }
|
|
@@ -18839,7 +19057,11 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18839
19057
|
.message.has-copy-action:not(.toolResult):not(.bashExecution):not(.compactionSummary) > .message-header,
|
|
18840
19058
|
.message.has-copy-action:not(.toolResult):not(.bashExecution):not(.compactionSummary) > .message-body,
|
|
18841
19059
|
.message.has-copy-action > .message-collapse > summary.message-header { padding-right: 2.2rem; }
|
|
18842
|
-
|
|
19060
|
+
/* Copy + edit/retry side by side need room; otherwise the timestamp sits under the buttons. */
|
|
19061
|
+
.message-edit-retry-button { top: 0.28rem; right: 2.3rem; width: 1.8rem; min-width: 1.8rem; min-height: 1.8rem; }
|
|
19062
|
+
.message.has-edit-retry-action:not(.toolResult):not(.bashExecution):not(.compactionSummary) > .message-header,
|
|
19063
|
+
.message.has-edit-retry-action:not(.toolResult):not(.bashExecution):not(.compactionSummary) > .message-body { padding-right: 4.3rem; }
|
|
19064
|
+
.code-block { padding: 0.48rem; font-size: var(--text-xs); }
|
|
18843
19065
|
details { padding: 0.42rem; }
|
|
18844
19066
|
.statusbar { padding: 0.22rem 0.34rem; font-size: var(--mobile-label-text); }
|
|
18845
19067
|
.footer-metric,
|
|
@@ -18863,7 +19085,7 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18863
19085
|
grid-column: 1 / -1;
|
|
18864
19086
|
padding: 0.08rem 0.12rem 0.02rem;
|
|
18865
19087
|
color: rgba(var(--ctp-subtext-rgb), 0.68);
|
|
18866
|
-
font-size:
|
|
19088
|
+
font-size: var(--text-xs);
|
|
18867
19089
|
font-weight: 900;
|
|
18868
19090
|
letter-spacing: 0.11em;
|
|
18869
19091
|
text-transform: uppercase;
|
|
@@ -18884,7 +19106,7 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18884
19106
|
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-metric-label { grid-area: label; }
|
|
18885
19107
|
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-metric-value { grid-area: value; }
|
|
18886
19108
|
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-metric-label,
|
|
18887
|
-
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-meta-label { font-size:
|
|
19109
|
+
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-meta-label { font-size: var(--text-xs); letter-spacing: 0.08em; }
|
|
18888
19110
|
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-metric-value,
|
|
18889
19111
|
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-meta-value { font-size: 0.76rem; line-height: 1.2; }
|
|
18890
19112
|
html:not([data-mobile-shell="v2"]):not([data-tablet-shell="v2"]) body.footer-details-expanded .footer-line-meta .footer-meta {
|
|
@@ -18912,7 +19134,7 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
18912
19134
|
line-height: 1.3;
|
|
18913
19135
|
}
|
|
18914
19136
|
.composer-row { gap: 0.24rem; margin-top: 0.3rem; }
|
|
18915
|
-
.composer-row button { padding: 0.28rem 0.36rem; font-size:
|
|
19137
|
+
.composer-row button { padding: 0.28rem 0.36rem; font-size: var(--text-xs); }
|
|
18916
19138
|
.composer-row button.primary { font-size: 0.8rem; }
|
|
18917
19139
|
.composer-actions-panel { gap: 0.34rem; padding: 0.56rem; }
|
|
18918
19140
|
.composer-actions-panel label { gap: 0.42rem; font-size: var(--mobile-label-text); }
|
|
@@ -19034,3 +19256,12 @@ html[data-density="compact"] .composer { padding-block: 0.5rem; }
|
|
|
19034
19256
|
opacity: 0 !important;
|
|
19035
19257
|
}
|
|
19036
19258
|
}
|
|
19259
|
+
|
|
19260
|
+
/* Windows High Contrast / forced colors: keep controls, cards, and the active choice visible. */
|
|
19261
|
+
@media (forced-colors: active) {
|
|
19262
|
+
button, select, input, textarea { border: 1px solid ButtonText; }
|
|
19263
|
+
.message, .side-panel-section, .footer-meta, .notice-toast, .undo-toast, .command-palette-item, .native-selector-item { border: 1px solid CanvasText; }
|
|
19264
|
+
.command-palette-item.active, .native-selector-item.keyboard-active, .footer-model-option.active, .terminal-tab.active > button { outline: 2px solid Highlight; outline-offset: 1px; }
|
|
19265
|
+
.run-indicator-pulse, .subagent-state-dot { background: Highlight; forced-color-adjust: none; }
|
|
19266
|
+
.message::before { background: CanvasText; box-shadow: none; }
|
|
19267
|
+
}
|
|
@@ -301,19 +301,35 @@ export function createTranscriptRenderer({ chat, contextKey = () => "", surfaceS
|
|
|
301
301
|
messageKey,
|
|
302
302
|
kind = "assistant-final",
|
|
303
303
|
text = "",
|
|
304
|
+
complete = false,
|
|
304
305
|
stableBoundary,
|
|
305
306
|
renderInto,
|
|
307
|
+
renderLiveTail,
|
|
308
|
+
appendLiveTail,
|
|
306
309
|
} = {}) {
|
|
307
310
|
if (!surface || typeof stableBoundary !== "function" || typeof renderInto !== "function") return { applied: false, invalid: true };
|
|
308
311
|
const value = String(text || "");
|
|
309
312
|
let state = markdownStates.get(surface);
|
|
310
|
-
const diverged = !!state && !value.startsWith(state.
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
+
const diverged = !!state && !value.startsWith(state.value);
|
|
314
|
+
const boundaryResult = stableBoundary(value, diverged ? null : state?.boundaryState, { complete, appendOnly: !!state && !diverged });
|
|
315
|
+
const boundaryInfo = boundaryResult && typeof boundaryResult === "object"
|
|
316
|
+
? boundaryResult
|
|
317
|
+
: { boundary: Number(boundaryResult) || 0, state: null, liveMode: "markdown", tailKind: "text", scannedChars: value.length };
|
|
318
|
+
const stableFloor = diverged ? 0 : state?.stableText?.length || 0;
|
|
319
|
+
const nextBoundary = Math.max(stableFloor, Math.min(value.length, Number(boundaryInfo.boundary) || 0));
|
|
320
|
+
const nextTail = value.slice(nextBoundary);
|
|
321
|
+
const canReuseLiveTail = !!state?.tailNodes?.length
|
|
322
|
+
&& typeof appendLiveTail === "function"
|
|
323
|
+
&& ["open-fence", "plain"].includes(boundaryInfo.liveMode)
|
|
324
|
+
&& state.tailMode === boundaryInfo.liveMode
|
|
325
|
+
&& state.tailBoundary === nextBoundary
|
|
326
|
+
&& nextTail.startsWith(state.tailText);
|
|
327
|
+
const replacesMutableTail = !!state?.tailNodes?.length && !canReuseLiveTail;
|
|
328
|
+
const mutation = commitTranscriptMutation({
|
|
313
329
|
key: key || `markdown:${surfaceKey(surface)}`,
|
|
314
330
|
context,
|
|
315
|
-
//
|
|
316
|
-
//
|
|
331
|
+
// Replacing/reparsing an open tail is destructive and must wait for an
|
|
332
|
+
// intersecting native drag. Suffix appends reuse the mounted live nodes.
|
|
317
333
|
kind: diverged || replacesMutableTail ? "reconcile" : "append",
|
|
318
334
|
surfaces: [surface],
|
|
319
335
|
invalidateSelection: diverged,
|
|
@@ -322,30 +338,63 @@ export function createTranscriptRenderer({ chat, contextKey = () => "", surfaceS
|
|
|
322
338
|
state = markdownStates.get(surface);
|
|
323
339
|
if (!state || diverged) {
|
|
324
340
|
for (const node of [...surface.childNodes]) node.remove();
|
|
325
|
-
state = { stableText: "", tailNodes: [], committedBlocks: 0 };
|
|
341
|
+
state = { stableText: "", value: "", tailNodes: [], tailText: "", tailMode: "", tailBoundary: 0, boundaryState: null, committedBlocks: 0 };
|
|
326
342
|
markdownStates.set(surface, state);
|
|
327
343
|
}
|
|
328
|
-
|
|
329
|
-
state.
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
state.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
|
|
345
|
+
const boundary = Math.max(state.stableText.length, nextBoundary);
|
|
346
|
+
const tail = value.slice(boundary);
|
|
347
|
+
const reuse = !!state.tailNodes.length
|
|
348
|
+
&& typeof appendLiveTail === "function"
|
|
349
|
+
&& ["open-fence", "plain"].includes(boundaryInfo.liveMode)
|
|
350
|
+
&& state.tailMode === boundaryInfo.liveMode
|
|
351
|
+
&& state.tailBoundary === boundary
|
|
352
|
+
&& tail.startsWith(state.tailText);
|
|
353
|
+
|
|
354
|
+
if (reuse) {
|
|
355
|
+
appendLiveTail(state.tailNodes, state.tailText, tail, boundaryInfo);
|
|
356
|
+
} else {
|
|
357
|
+
const committedSlice = value.slice(state.stableText.length, boundary);
|
|
358
|
+
const promotesMountedTail = !!state.tailNodes.length
|
|
359
|
+
&& ["markdown", "authoritative"].includes(state.tailMode)
|
|
360
|
+
&& committedSlice.startsWith(state.tailText)
|
|
361
|
+
&& !committedSlice.slice(state.tailText.length).trim();
|
|
362
|
+
if (promotesMountedTail) {
|
|
363
|
+
state.committedBlocks = ownBlocks(state.tailNodes, { messageKey, kind, start: state.committedBlocks });
|
|
364
|
+
state.tailNodes = [];
|
|
365
|
+
state.stableText = value.slice(0, boundary);
|
|
366
|
+
} else {
|
|
367
|
+
for (const node of state.tailNodes) node.remove();
|
|
368
|
+
state.tailNodes = [];
|
|
369
|
+
if (boundary > state.stableText.length) {
|
|
370
|
+
const fragment = document.createDocumentFragment();
|
|
371
|
+
renderInto(fragment, committedSlice);
|
|
372
|
+
const nodes = [...fragment.childNodes];
|
|
373
|
+
state.committedBlocks = ownBlocks(nodes, { messageKey, kind, start: state.committedBlocks });
|
|
374
|
+
surface.append(fragment);
|
|
375
|
+
state.stableText = value.slice(0, boundary);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (tail.trim()) {
|
|
379
|
+
const fragment = document.createDocumentFragment();
|
|
380
|
+
if (["open-fence", "plain"].includes(boundaryInfo.liveMode) && typeof renderLiveTail === "function") {
|
|
381
|
+
renderLiveTail(fragment, tail, boundaryInfo);
|
|
382
|
+
} else {
|
|
383
|
+
renderInto(fragment, tail);
|
|
384
|
+
}
|
|
385
|
+
state.tailNodes = [...fragment.childNodes];
|
|
386
|
+
ownBlocks(state.tailNodes, { messageKey, kind, tail: true });
|
|
387
|
+
surface.append(fragment);
|
|
388
|
+
}
|
|
346
389
|
}
|
|
390
|
+
state.value = value;
|
|
391
|
+
state.tailText = tail;
|
|
392
|
+
state.tailMode = boundaryInfo.liveMode || "markdown";
|
|
393
|
+
state.tailBoundary = boundary;
|
|
394
|
+
state.boundaryState = boundaryInfo.state || null;
|
|
347
395
|
},
|
|
348
396
|
});
|
|
397
|
+
return { ...mutation, boundary: nextBoundary, tailKind: boundaryInfo.tailKind || "text", liveMode: boundaryInfo.liveMode || "markdown", scannedChars: Number(boundaryInfo.scannedChars) || 0, fallback: !!boundaryInfo.fallback, reusedTail: canReuseLiveTail };
|
|
349
398
|
}
|
|
350
399
|
|
|
351
400
|
function updateTextSurface({ key, context = contextKey(), surface, messageKey, kind = "compact-output", text = "" } = {}) {
|
|
@@ -65,7 +65,7 @@ function makeEnvironment({
|
|
|
65
65
|
reload: new FakeElement(),
|
|
66
66
|
copyStatus: new FakeElement(),
|
|
67
67
|
};
|
|
68
|
-
const styleLink = new FakeElement({ href: "http://127.0.0.1:31415/styles.css?v=
|
|
68
|
+
const styleLink = new FakeElement({ href: "http://127.0.0.1:31415/styles.css?v=132", sheet: stylesheetLoaded ? {} : null });
|
|
69
69
|
const listeners = new Map();
|
|
70
70
|
const timers = new Map();
|
|
71
71
|
let timerId = 0;
|
|
@@ -84,7 +84,7 @@ function makeEnvironment({
|
|
|
84
84
|
removeEventListener(name) { listeners.delete(name); },
|
|
85
85
|
};
|
|
86
86
|
const document = {
|
|
87
|
-
currentScript: new FakeElement({ dataset: { appSrc: "/app.js?v=
|
|
87
|
+
currentScript: new FakeElement({ dataset: { appSrc: "/app.js?v=157" } }),
|
|
88
88
|
readyState: "complete",
|
|
89
89
|
querySelector(selector) {
|
|
90
90
|
return {
|
|
@@ -232,7 +232,7 @@ for (const moduleName of startupModuleNames) {
|
|
|
232
232
|
assert.ok(serviceWorker.includes(`"/${moduleName}"`), `the PWA app shell should include every app.js startup module: ${moduleName}`);
|
|
233
233
|
}
|
|
234
234
|
assert.match(serviceWorker, /pi-webui-pwa-v\d+/, "the app-shell cache should retain a versioned identity");
|
|
235
|
-
assert.ok(html.indexOf('id="webuiBootLoader"') < html.indexOf("/app.js?v=
|
|
235
|
+
assert.ok(html.indexOf('id="webuiBootLoader"') < html.indexOf("/app.js?v=157"), "the inline loader should own app module startup");
|
|
236
236
|
assert.doesNotMatch(html, /<script type="module" src="\/app\.js/, "the app module should not bypass the guarded loader");
|
|
237
237
|
|
|
238
238
|
console.log("boot-failure-diagnostics.test.mjs passed");
|