@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.
Files changed (61) hide show
  1. package/README.md +5 -3
  2. package/bin/pi-webui.mjs +90 -5
  3. package/lib/optional-feature-catalog.mjs +1 -1
  4. package/lib/session-actions.mjs +20 -2
  5. package/package.json +1 -1
  6. package/public/app.js +1823 -262
  7. package/public/index.html +51 -31
  8. package/public/service-worker.js +4 -1
  9. package/public/stream-derived-output.mjs +799 -0
  10. package/public/stream-markdown-tail.mjs +204 -0
  11. package/public/stream-output-controller.mjs +193 -51
  12. package/public/stream-render-scheduler.mjs +85 -0
  13. package/public/styles.css +249 -18
  14. package/public/transcript-renderer.mjs +73 -24
  15. package/tests/boot-failure-diagnostics.test.mjs +3 -3
  16. package/tests/browser/composer-action-grid-reorder.spec.mjs +114 -31
  17. package/tests/browser/mobile-foundation.spec.mjs +28 -0
  18. package/tests/browser/stream-output-isolation.spec.mjs +308 -3
  19. package/tests/browser/user-noticeable-fixes.spec.mjs +204 -0
  20. package/tests/codex-fast-mode-static.test.mjs +2 -2
  21. package/tests/composer-action-grid-reorder-static.test.mjs +8 -7
  22. package/tests/control-visibility-static.test.mjs +3 -3
  23. package/tests/controls-layout-static.test.mjs +3 -3
  24. package/tests/cwd-footer-reliability-static.test.mjs +1 -1
  25. package/tests/fast-mode-client-static.test.mjs +1 -1
  26. package/tests/feature-decision-output-popup-static.test.mjs +2 -2
  27. package/tests/file-viewer-image-static.test.mjs +3 -3
  28. package/tests/fixtures/fake-pi.mjs +57 -10
  29. package/tests/fixtures/streaming-workloads.mjs +36 -0
  30. package/tests/footer-provider-usage-visual-static.test.mjs +15 -0
  31. package/tests/foreground-transcript-catch-up-static.test.mjs +7 -1
  32. package/tests/interaction-state-stability-static.test.mjs +3 -1
  33. package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
  34. package/tests/intercom-conversations-http.test.mjs +16 -0
  35. package/tests/main-output-loading-static.test.mjs +3 -3
  36. package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
  37. package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
  38. package/tests/mobile-foundation-static.test.mjs +3 -3
  39. package/tests/mobile-phone-experience-static.test.mjs +1 -1
  40. package/tests/mobile-static.test.mjs +74 -63
  41. package/tests/open-issue-wizard-static.test.mjs +1 -1
  42. package/tests/persistent-ui-layout-static.test.mjs +4 -4
  43. package/tests/prompt-input-vertical-scroll-static.test.mjs +26 -0
  44. package/tests/questionnaire-dialog.test.mjs +3 -3
  45. package/tests/runtime-error-visibility.test.mjs +3 -3
  46. package/tests/session-auth-harness.test.mjs +26 -1
  47. package/tests/session-sampling-ui-static.test.mjs +3 -3
  48. package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
  49. package/tests/stream-derived-output.test.mjs +121 -0
  50. package/tests/stream-markdown-tail.test.mjs +218 -0
  51. package/tests/stream-output-controller.test.mjs +119 -4
  52. package/tests/stream-output-isolation-static.test.mjs +27 -6
  53. package/tests/stream-output-workloads.test.mjs +40 -3
  54. package/tests/stream-render-scheduler.test.mjs +115 -0
  55. package/tests/streaming-ui-coupling.test.mjs +1 -1
  56. package/tests/subagent-observability-static.test.mjs +2 -2
  57. package/tests/syntax-highlighting-static.test.mjs +3 -3
  58. package/tests/theme-customizer-static.test.mjs +1 -1
  59. package/tests/thinking-format-parser.test.mjs +15 -0
  60. package/tests/todo-filter-static.test.mjs +148 -0
  61. package/tests/transcript-markdown-tail.test.mjs +137 -0
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=129" />
15
+ <link rel="stylesheet" href="/styles.css?v=132" />
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.
@@ -982,6 +982,7 @@
982
982
  <strong>Workspace files</strong>
983
983
  <p id="fileTreeCwd" class="file-tree-cwd muted"></p>
984
984
  </div>
985
+ <button id="fileTreeNewFileButton" type="button" title="Create a new file in the workspace root (right-click a folder to create inside it)">New file</button>
985
986
  <button id="fileTreeRefreshButton" type="button">Refresh</button>
986
987
  </div>
987
988
  <div class="file-tree-search" role="search">
@@ -1006,7 +1007,7 @@
1006
1007
  <div id="sidePanelSectionGit" class="side-panel-section-content" hidden>
1007
1008
  <div class="git-side-panel">
1008
1009
  <div class="git-side-panel-intro">
1009
- <p>Expand a repository to view local changes and history. Right-click rows for actions.</p>
1010
+ <p>Expand a repository to view local changes and history. Use the ⋯ button or right-click a row for actions.</p>
1010
1011
  </div>
1011
1012
  <p id="gitPanelStatus" class="git-side-panel-status muted" role="status" aria-live="polite"></p>
1012
1013
  <div id="gitPanelGroups" class="git-side-panel-groups" aria-label="Git repositories"></div>
@@ -1203,7 +1204,10 @@
1203
1204
  <h2>
1204
1205
  <button id="sidePanelSectionToggleEvents" class="side-panel-section-toggle" type="button" aria-expanded="false" aria-controls="sidePanelSectionEvents" aria-label="Expand Events section" title="Expand Events section" data-side-panel-section-toggle="events">
1205
1206
  <span class="side-panel-section-label">Events</span>
1206
- <span class="side-panel-section-chevron" aria-hidden="true">›</span>
1207
+ <span class="side-panel-section-trailing">
1208
+ <span id="eventsUnreadBadge" class="side-panel-section-badge events-unread-badge" hidden>0</span>
1209
+ <span class="side-panel-section-chevron" aria-hidden="true">›</span>
1210
+ </span>
1207
1211
  </button>
1208
1212
  </h2>
1209
1213
  <div id="sidePanelSectionEvents" class="side-panel-section-content" hidden>
@@ -1220,6 +1224,8 @@
1220
1224
  <div id="fileContextMenu" class="file-context-menu" role="menu" hidden>
1221
1225
  <button type="button" role="menuitem" data-file-menu-action="open-default">Open in Default Editor</button>
1222
1226
  <button type="button" role="menuitem" data-file-menu-action="open-webui">Open in WebUI</button>
1227
+ <button type="button" role="menuitem" data-file-menu-action="new-file">New file…</button>
1228
+ <button type="button" role="menuitem" data-file-menu-action="new-folder">New folder…</button>
1223
1229
  <button type="button" role="menuitem" data-file-menu-action="move">Move/Rename…</button>
1224
1230
  <button type="button" role="menuitem" class="danger" data-file-menu-action="delete">Delete…</button>
1225
1231
  </div>
@@ -1231,6 +1237,7 @@
1231
1237
  <button type="button" role="menuitem" data-git-footer-menu-action="visibility">Open Git-footer Visibility</button>
1232
1238
  </div>
1233
1239
 
1240
+ <div id="noticeToastStack" class="notice-toast-stack" aria-label="Notifications"></div>
1234
1241
  <aside id="undoToast" class="undo-toast" aria-live="polite" aria-atomic="true" hidden>
1235
1242
  <span id="undoToastMessage" class="undo-toast-message"></span>
1236
1243
  <span id="undoToastTime" class="undo-toast-time">Undo available for 10 seconds</span>
@@ -1405,7 +1412,7 @@
1405
1412
  </form>
1406
1413
  </dialog>
1407
1414
 
1408
- <dialog id="confirmationDialog" class="extension-dialog confirmation-dialog">
1415
+ <dialog id="confirmationDialog" class="extension-dialog confirmation-dialog" aria-labelledby="confirmationTitle">
1409
1416
  <form method="dialog">
1410
1417
  <h2 id="confirmationTitle">Confirm action</h2>
1411
1418
  <p id="confirmationSummary"></p>
@@ -1420,6 +1427,19 @@
1420
1427
  </form>
1421
1428
  </dialog>
1422
1429
 
1430
+ <dialog id="textPromptDialog" class="extension-dialog text-prompt-dialog" aria-labelledby="textPromptTitle">
1431
+ <form method="dialog">
1432
+ <h2 id="textPromptTitle">Enter a value</h2>
1433
+ <p id="textPromptSummary" class="muted"></p>
1434
+ <input id="textPromptInput" class="dialog-input" type="text" autocomplete="off" spellcheck="false" aria-labelledby="textPromptTitle" />
1435
+ <p id="textPromptError" class="path-picker-error" hidden></p>
1436
+ <menu>
1437
+ <button id="textPromptCancelButton" type="button">Cancel</button>
1438
+ <button id="textPromptConfirmButton" class="primary" type="submit">OK</button>
1439
+ </menu>
1440
+ </form>
1441
+ </dialog>
1442
+
1423
1443
  <dialog id="gitPullErrorDialog" class="extension-dialog git-pull-error-dialog" aria-labelledby="gitPullErrorDialogTitle" aria-describedby="gitPullErrorDialogDescription gitPullErrorOutput">
1424
1444
  <form method="dialog">
1425
1445
  <h2 id="gitPullErrorDialogTitle">Git pull failed</h2>
@@ -1482,9 +1502,9 @@
1482
1502
  </form>
1483
1503
  </dialog>
1484
1504
 
1485
- <dialog id="gitWorktreeBaseDialog" class="extension-dialog git-worktree-base-dialog">
1505
+ <dialog id="gitWorktreeBaseDialog" class="extension-dialog git-worktree-base-dialog" aria-labelledby="gitWorktreeBaseDialogTitle">
1486
1506
  <form method="dialog">
1487
- <h2>Choose branch starting point</h2>
1507
+ <h2 id="gitWorktreeBaseDialogTitle">Choose branch starting point</h2>
1488
1508
  <p>Create <code id="gitWorktreeBaseBranch"></code> from:</p>
1489
1509
  <fieldset class="git-worktree-base-options">
1490
1510
  <legend class="sr-only">Branch starting point</legend>
@@ -1557,9 +1577,9 @@
1557
1577
  </form>
1558
1578
  </dialog>
1559
1579
 
1560
- <dialog id="gitPrDialog" class="extension-dialog git-pr-dialog">
1580
+ <dialog id="gitPrDialog" class="extension-dialog git-pr-dialog" aria-labelledby="gitPrDialogTitle">
1561
1581
  <form method="dialog">
1562
- <h2>Review pull request</h2>
1582
+ <h2 id="gitPrDialogTitle">Review pull request</h2>
1563
1583
  <p class="muted">Confirm or edit the generated /pr description before Web UI runs <code>gh pr create</code>.</p>
1564
1584
  <label class="git-pr-field" for="gitPrTitleInput">
1565
1585
  <span>Title</span>
@@ -1577,7 +1597,7 @@
1577
1597
  </form>
1578
1598
  </dialog>
1579
1599
 
1580
- <dialog id="gitChangesDialog" class="extension-dialog git-changes-dialog">
1600
+ <dialog id="gitChangesDialog" class="extension-dialog git-changes-dialog" aria-labelledby="gitChangesTitle">
1581
1601
  <form method="dialog">
1582
1602
  <div class="git-changes-header">
1583
1603
  <div>
@@ -1599,12 +1619,12 @@
1599
1619
  </form>
1600
1620
  </dialog>
1601
1621
 
1602
- <dialog id="statsOverlayDialog" class="extension-dialog stats-overlay-dialog">
1622
+ <dialog id="statsOverlayDialog" class="extension-dialog stats-overlay-dialog" aria-labelledby="statsOverlayDialogTitle">
1603
1623
  <form method="dialog">
1604
1624
  <div class="stats-overlay-header">
1605
1625
  <div>
1606
1626
  <span class="stats-overlay-kicker">Pi stats</span>
1607
- <h2>Usage dashboard</h2>
1627
+ <h2 id="statsOverlayDialogTitle">Usage dashboard</h2>
1608
1628
  <p id="statsOverlaySubtitle" class="muted">Run stats to load the browser dashboard.</p>
1609
1629
  </div>
1610
1630
  <div class="stats-overlay-controls">
@@ -1627,14 +1647,14 @@
1627
1647
  </form>
1628
1648
  </dialog>
1629
1649
 
1630
- <dialog id="pathPickerDialog" class="extension-dialog path-picker-dialog">
1650
+ <dialog id="pathPickerDialog" class="extension-dialog path-picker-dialog" aria-labelledby="pathPickerTitle">
1631
1651
  <form method="dialog">
1632
1652
  <h2 id="pathPickerTitle">Choose working directory</h2>
1633
1653
  <div class="path-picker-current-row">
1634
1654
  <p id="pathPickerCurrent" class="path-picker-current"></p>
1635
- <button id="pathPickerAddFastPickButton" type="button" class="path-picker-add-fast-pick">Add fast pick</button>
1655
+ <button id="pathPickerAddFastPickButton" type="button" class="path-picker-add-fast-pick">Pin this folder</button>
1636
1656
  </div>
1637
- <div id="pathPickerFastPicks" class="path-picker-fast-picks" aria-label="Fast picks"></div>
1657
+ <div id="pathPickerFastPicks" class="path-picker-fast-picks" aria-label="Pinned folders"></div>
1638
1658
  <div id="pathPickerRoots" class="path-picker-roots"></div>
1639
1659
  <div class="path-picker-create-row" aria-label="Create a new directory in the current directory">
1640
1660
  <input id="pathPickerCreateNameInput" class="path-picker-create-input" type="text" placeholder="New directory name" autocomplete="off" spellcheck="false" maxlength="255" aria-label="New directory name" />
@@ -1654,27 +1674,27 @@
1654
1674
  </form>
1655
1675
  </dialog>
1656
1676
 
1657
- <dialog id="commandPaletteDialog" class="extension-dialog command-palette-dialog">
1677
+ <dialog id="commandPaletteDialog" class="extension-dialog command-palette-dialog" aria-labelledby="commandPaletteDialogTitle">
1658
1678
  <form method="dialog">
1659
1679
  <div class="command-palette-header">
1660
1680
  <div>
1661
1681
  <span class="command-palette-kicker">Quick launcher</span>
1662
- <h2>Command palette</h2>
1682
+ <h2 id="commandPaletteDialogTitle">Command palette</h2>
1663
1683
  </div>
1664
1684
  <div class="command-palette-header-actions">
1665
1685
  <span class="command-palette-shortcut">Ctrl/Cmd+K</span>
1666
1686
  <button id="commandPaletteCloseButton" class="command-palette-close-button" type="button" aria-label="Close command palette" title="Close command palette">Close</button>
1667
1687
  </div>
1668
1688
  </div>
1669
- <input id="commandPaletteInput" class="dialog-input command-palette-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search commands, tabs, models, sessions…" role="combobox" aria-autocomplete="list" aria-controls="commandPaletteList" aria-expanded="true" aria-label="Search command palette" />
1689
+ <input id="commandPaletteInput" class="dialog-input command-palette-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search actions, tabs, models, commands…" role="combobox" aria-autocomplete="list" aria-controls="commandPaletteList" aria-expanded="true" aria-label="Search command palette" />
1670
1690
  <div id="commandPaletteList" class="command-palette-list" role="listbox" aria-label="Command palette results"></div>
1671
1691
  <p id="commandPaletteHint" class="command-palette-hint muted">Use ↑/↓ then Enter. Escape closes.</p>
1672
1692
  </form>
1673
1693
  </dialog>
1674
1694
 
1675
- <dialog id="editRetryDialog" class="extension-dialog edit-retry-dialog">
1695
+ <dialog id="editRetryDialog" class="extension-dialog edit-retry-dialog" aria-labelledby="editRetryDialogTitle">
1676
1696
  <form method="dialog">
1677
- <h2>Edit &amp; retry from here</h2>
1697
+ <h2 id="editRetryDialogTitle">Edit &amp; retry from here</h2>
1678
1698
  <p id="editRetryMessage" class="muted">Fork the session from this user message, optionally edit it, then run the new prompt.</p>
1679
1699
  <textarea id="editRetryText" class="dialog-editor edit-retry-text" spellcheck="true" aria-label="Edited prompt"></textarea>
1680
1700
  <p id="editRetryStatus" class="edit-retry-status muted" role="status" aria-live="polite"></p>
@@ -1686,12 +1706,12 @@
1686
1706
  </form>
1687
1707
  </dialog>
1688
1708
 
1689
- <dialog id="remoteQrDialog" class="extension-dialog remote-qr-dialog">
1709
+ <dialog id="remoteQrDialog" class="extension-dialog remote-qr-dialog" aria-labelledby="remoteQrDialogTitle">
1690
1710
  <form method="dialog">
1691
1711
  <div class="remote-qr-header">
1692
1712
  <div>
1693
1713
  <span class="remote-qr-kicker">/remote</span>
1694
- <h2>Remote WebUI QR</h2>
1714
+ <h2 id="remoteQrDialogTitle">Remote WebUI QR</h2>
1695
1715
  <p id="remoteQrMessage" class="muted">Scan this QR code from a trusted local-network device.</p>
1696
1716
  </div>
1697
1717
  <button id="remoteQrCloseButton" class="remote-qr-close-button" type="button" aria-label="Close Remote WebUI QR popup">Close</button>
@@ -1705,20 +1725,20 @@
1705
1725
  </form>
1706
1726
  </dialog>
1707
1727
 
1708
- <dialog id="nativeCommandDialog" class="extension-dialog native-command-dialog">
1728
+ <dialog id="nativeCommandDialog" class="extension-dialog native-command-dialog" aria-labelledby="nativeCommandTitle">
1709
1729
  <form method="dialog">
1710
1730
  <h2 id="nativeCommandTitle">Pi command</h2>
1711
1731
  <p id="nativeCommandMessage" class="muted"></p>
1712
- <input id="nativeCommandSearch" class="dialog-input native-command-search" type="search" placeholder="Filter choices…" autocomplete="off" hidden />
1732
+ <input id="nativeCommandSearch" class="dialog-input native-command-search" type="search" placeholder="Filter choices…" autocomplete="off" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="nativeCommandBody" aria-label="Filter choices" hidden />
1713
1733
  <div id="nativeCommandBody" class="native-command-body"></div>
1714
1734
  <p id="nativeCommandError" class="path-picker-error" hidden></p>
1715
1735
  <menu id="nativeCommandActions"></menu>
1716
1736
  </form>
1717
1737
  </dialog>
1718
1738
 
1719
- <dialog id="appRunnerInfoDialog" class="extension-dialog app-runner-info-dialog">
1739
+ <dialog id="appRunnerInfoDialog" class="extension-dialog app-runner-info-dialog" aria-labelledby="appRunnerInfoDialogTitle">
1720
1740
  <form method="dialog">
1721
- <h2>App runners</h2>
1741
+ <h2 id="appRunnerInfoDialogTitle">App runners</h2>
1722
1742
  <p class="muted">Run detected project entrypoints directly from the active tab’s working directory, with live output pinned above the chat.</p>
1723
1743
  <div id="appRunnerInfoBody" class="app-runner-info-body"></div>
1724
1744
  <menu>
@@ -1727,9 +1747,9 @@
1727
1747
  </form>
1728
1748
  </dialog>
1729
1749
 
1730
- <dialog id="gitFooterVisibilityDialog" class="extension-dialog git-footer-visibility-dialog">
1750
+ <dialog id="gitFooterVisibilityDialog" class="extension-dialog git-footer-visibility-dialog" aria-labelledby="gitFooterVisibilityDialogTitle">
1731
1751
  <form method="dialog">
1732
- <h2>Git-footer Visibility</h2>
1752
+ <h2 id="gitFooterVisibilityDialogTitle">Git-footer Visibility</h2>
1733
1753
  <p class="muted">Select which Git footer cards, buttons, popovers, and modal affordances are visible in the Web UI. Changes are saved globally through <code>/git-footer-visibility</code> and reused by every Pi session.</p>
1734
1754
  <div class="git-footer-visibility-toolbar" aria-label="Git-footer Visibility quick actions">
1735
1755
  <button id="gitFooterVisibilitySelectAllButton" type="button">Select all</button>
@@ -1745,7 +1765,7 @@
1745
1765
  </form>
1746
1766
  </dialog>
1747
1767
 
1748
- <dialog id="skillEditorDialog" class="extension-dialog skill-editor-dialog">
1768
+ <dialog id="skillEditorDialog" class="extension-dialog skill-editor-dialog" aria-labelledby="skillEditorTitle">
1749
1769
  <form method="dialog">
1750
1770
  <h2 id="skillEditorTitle">Edit skill</h2>
1751
1771
  <p id="skillEditorMeta" class="skill-editor-meta muted"></p>
@@ -1758,7 +1778,7 @@
1758
1778
  </form>
1759
1779
  </dialog>
1760
1780
 
1761
- <dialog id="promptListDialog" class="extension-dialog prompt-list-dialog">
1781
+ <dialog id="promptListDialog" class="extension-dialog prompt-list-dialog" aria-labelledby="promptListDialogTitle">
1762
1782
  <form method="dialog">
1763
1783
  <h2 id="promptListDialogTitle">Create prompt list</h2>
1764
1784
  <p class="muted">Create one start prompt, then add any number of follow-up prompts to queue behind it.</p>
@@ -1786,7 +1806,7 @@
1786
1806
  </form>
1787
1807
  </dialog>
1788
1808
 
1789
- <dialog id="attachmentTextDialog" class="extension-dialog attachment-text-dialog">
1809
+ <dialog id="attachmentTextDialog" class="extension-dialog attachment-text-dialog" aria-labelledby="attachmentTextTitle">
1790
1810
  <form method="dialog">
1791
1811
  <h2 id="attachmentTextTitle">Edit text attachment</h2>
1792
1812
  <p id="attachmentTextMeta" class="attachment-text-meta muted"></p>
@@ -1826,7 +1846,7 @@
1826
1846
  </form>
1827
1847
  </dialog>
1828
1848
 
1829
- <script id="webuiBootLoader" data-app-src="/app.js?v=150">
1849
+ <script id="webuiBootLoader" data-app-src="/app.js?v=157">
1830
1850
  (() => {
1831
1851
  "use strict";
1832
1852
 
@@ -1,4 +1,4 @@
1
- const CACHE_NAME = "pi-webui-pwa-v115";
1
+ const CACHE_NAME = "pi-webui-pwa-v123";
2
2
  const APP_SHELL = [
3
3
  "/",
4
4
  "/index.html",
@@ -12,6 +12,9 @@ const APP_SHELL = [
12
12
  "/guided-git-review-state.mjs",
13
13
  "/fast-output-live.mjs",
14
14
  "/stream-output-controller.mjs",
15
+ "/stream-derived-output.mjs",
16
+ "/stream-markdown-tail.mjs",
17
+ "/stream-render-scheduler.mjs",
15
18
  "/middle-button-drag-scroll.mjs",
16
19
  "/theme-contract.mjs",
17
20
  "/sampling-parameter-controls.mjs",