@firstpick/pi-package-webui 0.9.9 → 0.10.0

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 (56) hide show
  1. package/DEVELOPMENT.md +42 -13
  2. package/README.md +7 -7
  3. package/TECHNICAL.md +8 -8
  4. package/bin/pi-webui.mjs +197 -63
  5. package/index.ts +23 -33
  6. package/lib/git-workflow-preferences.mjs +51 -12
  7. package/lib/tui-model-profile-selector.mjs +183 -0
  8. package/lib/tui-resource-selector.mjs +173 -0
  9. package/package.json +1 -1
  10. package/public/app.js +220 -73
  11. package/public/index.html +2 -2
  12. package/public/service-worker.js +1 -1
  13. package/public/styles.css +63 -15
  14. package/tests/boot-failure-diagnostics.test.mjs +3 -3
  15. package/tests/browser/intercom-conversation-viewer.spec.mjs +76 -53
  16. package/tests/browser/user-noticeable-fixes.spec.mjs +51 -0
  17. package/tests/codex-fast-mode-static.test.mjs +2 -2
  18. package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
  19. package/tests/control-visibility-static.test.mjs +3 -3
  20. package/tests/controls-layout-static.test.mjs +3 -3
  21. package/tests/durable-rpc-supervisor-harness.test.mjs +9 -0
  22. package/tests/events-tree-context-menu-static.test.mjs +3 -3
  23. package/tests/fast-mode-client-static.test.mjs +1 -1
  24. package/tests/feature-decision-output-popup-static.test.mjs +2 -2
  25. package/tests/file-viewer-image-static.test.mjs +3 -3
  26. package/tests/fixtures/fake-pi.mjs +3 -3
  27. package/tests/guided-git-activation-static.test.mjs +24 -12
  28. package/tests/guided-git-fallback-runtime.test.mjs +209 -270
  29. package/tests/guided-git-fallback-ui-static.test.mjs +2 -2
  30. package/tests/guided-git-message-reliability-static.test.mjs +2 -1
  31. package/tests/guided-git-optional-feature.test.mjs +8 -5
  32. package/tests/http-endpoints-harness.test.mjs +22 -4
  33. package/tests/intercom-conversation-viewer-static.test.mjs +7 -6
  34. package/tests/intercom-tag-layout-static.test.mjs +35 -16
  35. package/tests/intercom-tag-overflow-layout.test.mjs +87 -0
  36. package/tests/main-output-loading-static.test.mjs +3 -3
  37. package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
  38. package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
  39. package/tests/mobile-foundation-static.test.mjs +3 -3
  40. package/tests/mobile-phone-experience-static.test.mjs +1 -1
  41. package/tests/mobile-static.test.mjs +11 -6
  42. package/tests/open-issue-wizard-static.test.mjs +1 -1
  43. package/tests/persistent-ui-layout-static.test.mjs +3 -3
  44. package/tests/prompt-input-vertical-scroll-static.test.mjs +3 -3
  45. package/tests/questionnaire-dialog.test.mjs +3 -3
  46. package/tests/remote-auth-settings-harness.test.mjs +18 -3
  47. package/tests/resource-tui-extension.test.mjs +2 -1
  48. package/tests/session-sampling-ui-static.test.mjs +3 -3
  49. package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
  50. package/tests/subagent-observability-static.test.mjs +2 -2
  51. package/tests/syntax-highlighting-static.test.mjs +3 -3
  52. package/tests/theme-customizer-static.test.mjs +1 -1
  53. package/tests/tui-model-profile-selector.test.mjs +102 -0
  54. package/tests/tui-resource-selector.test.mjs +74 -0
  55. package/tests/webui-settings-locking.test.mjs +32 -1
  56. package/tests/windows-drive-cwd-picker-static.test.mjs +3 -3
package/DEVELOPMENT.md CHANGED
@@ -4,6 +4,32 @@ Contributor-only implementation, API, architecture, testing, and maintenance inf
4
4
 
5
5
  [Back to README](README.md) · [Advanced user technical reference](TECHNICAL.md)
6
6
 
7
+ ## TUI tool and skill selector
8
+
9
+ `index.ts` keeps resource scope resolution and persistence in `registerTuiResourceController`. After the user chooses Session, Global, or Model scope, `lib/tui-resource-selector.mjs` owns the shared searchable list used by both `/tools` and `/skills`. Its interaction follows Pi's `/scoped-models` selector: arrows navigate, Enter toggles, the `app.models.enableAll`, `app.models.clearAll`, and `app.models.save` bindings perform bulk actions and save, and Escape or Ctrl+C cancels. Bulk actions affect only filtered resources while search is active.
10
+
11
+ For Model scope, `lib/tui-model-profile-selector.mjs` searches provider, exact ID, and display name. It returns the selected model object directly rather than reconstructing a model from its rendered label. The picker opens at the active model when possible and marks models with a resource-specific profile.
12
+
13
+ Focused contributor validation:
14
+
15
+ ```bash
16
+ node --check lib/tui-resource-selector.mjs
17
+ node --check lib/tui-model-profile-selector.mjs
18
+ node tests/tui-resource-selector.test.mjs
19
+ node tests/tui-model-profile-selector.test.mjs
20
+ node tests/resource-tui-extension.test.mjs
21
+ ```
22
+
23
+ ## Web UI settings write lock
24
+
25
+ `updateWebuiSettings` serializes same-process updates and uses per-writer records under `<settings-file>.lock` for cross-process writes. A process can exit after creating its record but before writing valid JSON, leaving an empty file. Lock acquisition removes incomplete records immediately when their PID is dead. It gives a live writer a one-second grace period, then removes records that are still empty or malformed so one interrupted write cannot block every later settings save.
26
+
27
+ Focused contributor validation:
28
+
29
+ ```bash
30
+ node tests/webui-settings-locking.test.mjs
31
+ ```
32
+
7
33
  ## File viewer image contract
8
34
 
9
35
  `GET /api/files/content` keeps workspace-path confinement and the shared 2 MiB `FILE_VIEWER_MAX_BYTES` cap before reading either text or images. Text responses use `kind: "text"` with UTF-8 `content` and `language`. The explicit extension allowlist maps `.png`, `.jpg`/`.jpeg`, `.gif`, `.webp`, and `.avif` to fixed MIME types; those responses use `kind: "image"`, `mimeType`, and base64 `data` without decoding the bytes as UTF-8. SVG and all unlisted binary formats continue to return `415` through the text/binary guard.
@@ -114,7 +140,7 @@ The separate `WS3 paced cadence and slow-renderer queue pressure remain bounded`
114
140
 
115
141
  `lib/intercom-transcript-filter.mjs` is the separate normal-transcript boundary. After thinking recovery and before HTTP delta slicing, it removes structured `intercom_message` records, generic `intercom` tool-call parts, and results paired by explicit call ID or tool name. It copies only changed mixed assistant records and preserves unrelated meaningful content without mutating the RPC response. Live stream and execution guards in `public/app.js` prevent an Intercom card or event-log line from flashing before the filtered authoritative refresh; unrelated supervisor and tool activity keeps the existing path. The conversation endpoint still reads raw active-branch records independently.
116
142
 
117
- `public/app.js` keeps only in-memory per-tab summaries. `refreshIntercomConversationSummaries` uses tab-generation and request-serial guards; `refreshIntercomConversationDetail` adds a separate serial plus a five-second open-dialog refresh. Switching tabs or closing the native dialog invalidates pending detail responses and cancels its timer. The renderer rebuilds message bubbles only from normalized `direction`, participant name/ID, text, and timestamp fields, assigning text with safe DOM APIs. It never renders server records wholesale. The footer tag group uses equal-width implicit grid columns for up to eight conversations, then applies a wrapped `minmax(44px, 1fr)` grid through the `dense` class for 9–32 conversations. Both modes avoid horizontal scrolling and keep shrinkable visual labels plus full `aria-label` and `title` values. Each reused button stores a compact label/count signature, so unchanged tags retain their children instead of retriggering the polite live region.
143
+ `public/app.js` keeps only in-memory per-tab summaries. `refreshIntercomConversationSummaries` uses tab-generation and request-serial guards; `refreshIntercomConversationDetail` adds a separate serial plus a five-second open-dialog refresh. Switching tabs or closing the native dialog invalidates pending detail responses and cancels its timer. The renderer rebuilds message bubbles only from normalized `direction`, participant name/ID, text, and timestamp fields, assigning text with safe DOM APIs. It never renders server records wholesale. The footer tag group uses a reversed inline strip capped at 50 percent of the desktop prompt row, so the newest conversation starts at the right edge and older tags extend toward the middle. Direct tags are capped at 13rem. A `ResizeObserver` measures complete tag widths and reserves space for `+X`; tags that do not fit move into a bounded popup above the composer. Narrow layouts give the strip the full row and keep 44-pixel targets in the popup. Escape, outside clicks, and focus changes close the popup. Each reused direct or popup button stores a compact label/count signature, so unchanged tags retain their children instead of retriggering the polite live region.
118
144
 
119
145
  ### Tagged local-model thinking
120
146
 
@@ -252,14 +278,14 @@ Compact mode keeps live output lightweight, coalesces sustained live DOM/scroll
252
278
  - Browser voice loop for Natural Conversation Mode (`public/voice-conversation.mjs`): while the mode is active in a tab, the browser's Web Speech APIs listen for speech, send final transcripts as normal prompts, and speak Pi's final answers. The microphone pauses while answers are spoken (echo prevention), speech during final-output streaming becomes a steering interruption, speech during tool execution is queued until the tool phase ends, and silence after a spoken question sends a single structured silence event. Remote (non-localhost) sessions keep the microphone off until the per-tab `Allow remote microphone streaming` consent is granted; only text transcripts ever reach the Pi host on the browser-default path. Opt-in server-side fallback routes are available for local/Groq/OpenAI STT and local/OpenAI TTS when configured with server-side env vars; remote/LAN raw-audio STT fallback uploads require explicit per-request consent.
253
279
  - Browser-native Pi dialogs for `/model`, `/settings`, `/summary-setup`, `/safety-guard-setup`, `/git-workflow-setup`, `/theme`, `/fork`, `/clone`, `/name`, `/resume`, `/tree`, `/login`, `/logout`, `/scoped-models`, `/tools`, and `/skills`, plus an on-demand `/summary` Markdown overlay and native-command adapter output for `/copy`, `/session`, `/new`, `/compact`, `/reload`, and `/export`. Safety Guard Setup includes the opt-in auto-review toggle and active-tab authenticated model/supported-thinking selectors; auto-review remains off by default, and enabled saves reject unavailable selections.
254
280
  - Runtime `/tools` and `/skills` selectors backed by the hidden Web UI RPC helper, with explicit **Session only**, **Global default**, and exact **Model default** scopes. Session choices persist on the current branch and take precedence; global defaults are inherited by future sessions without rewriting existing branches. Disabled skills are removed from the system prompt, and tracked `SKILL.md` files can be opened/edited from skill tags. Responsive fitting keeps visible and hidden tag sets disjoint; the `+X` disclosure renders the hidden set in an upward, bounded popup and preserves selection, outside-dismissal, `Escape`, and focus-return behavior.
255
- - Session resume/switch, metadata rename, and localhost-only safe delete with active/open-tab/session-directory guards.
281
+ - Session resume into a newly created terminal tab, metadata rename, and localhost-only safe delete with active/open-tab/session-directory guards.
256
282
  - Model, thinking, session, workspace, theme, optional-feature, Codex usage, optional Remote WebUI, update/restart/stop, event, notification, thinking-visibility, terminal-tab-layout, and custom-background controls in collapsible side-panel sections.
257
283
  - A side-panel **Git** section mirrors the repositories represented by every open terminal tab/group. Repository cards are shown directly—without session-name parent disclosures—and always use the Git-root or cwd basename as their title. One repository can be expanded at a time. First/stale expansion refreshes local status after a five-minute cache window, while live filesystem updates use a debounced server watcher and SSE invalidation to refresh visible repositories without periodic Git polling or an automatic network `git fetch`. Its compact Changes tree groups conflicted, staged, modified, and untracked paths with additions/deletions; right-click a repository, folder, or file (or press Shift+F10/the Context Menu key) for View Diff, refresh, stage/unstage, and confirmed discard/delete actions. History lists the latest 30 commits and opens bounded read-only commit diffs.
258
284
  - Persistent context-window meter with manual compact and auto-compaction controls near the composer; side-panel thinking changes made while a tab is busy are queued for the next prompt.
259
285
  - Side-panel theme picker backed by optional `@firstpick/pi-themes-bundle` themes plus Pi-native project/global custom themes. **Customize…** provides all 51 required color tokens, variables, optional `thinkingMax`/export colors, synchronized advanced JSON, valid-only live preview, scope badges, and explicit target-bound overwrite confirmation.
260
286
  - Per-tab cwd changes, a clickable footer cwd picker, direct path entry including rooted Windows drive paths, directory creation/search in the picker, saved path fast picks, server-persisted fast picks, and restart-safe restoration of open tabs. On Windows, Parent from a drive root returns a server-owned virtual **This PC** response with an empty cwd and `selectable: false`; the browser keeps drive navigation, filtering, and direct entry available while gating selection, creation, and pinning. When the optional stats and git-footer companions are loaded, clicking the footer **PI** token metric dispatches `/calibrate` in the background and refreshes the metric after the isolated calibration sample is recorded.
261
287
  - Detected app runner dropdown for the active tab cwd, including Cargo, Bun, npm/npx/pnpm, Python/uv, Go/Golang, Zig, C/C++, Docker Compose, root/dev/scripts shell scripts, and other common project runners with live output pinned at the top of the terminal. Stream chunks pass through a terminal-line reducer: LF/CRLF commit scrollback, bare CR replaces the current live line, backspace edits that line, and ANSI sequences remain intact for the browser's safe SGR renderer. This is line-oriented terminal behavior rather than a full VT100 cursor grid. Running app runners expose line-oriented stdin in the widget for interactive scripts. Projects can add browseable custom runners in `.pi-webui-runners.json` with a command (default `./`) plus a relative path to the file to run. The same dialog also configures project discovery paths: project-relative directories that are scanned one level deep (no subdirectories) for `.sh`, `.bash`, `.zsh`, `.fish`, and `.py` files plus extensionless files with a bash/sh, zsh, fish, or Python shebang. Python candidates use `uv run` and/or the available `python3`/`python` interpreter. Discovered scripts extend the built-in root, `dev/`, `scripts/`, and `dev/scripts/` detection and run from the resolved project root.
262
- - Extension-launched Guided Git workflow for existing repos and new repos with persistent model/reasoning preferences, review-first staging, an optional manual staged repository-review gate from `aur-review`, generated or typed commit messages, explicit push/PR confirmation, and optional PR worktrees. `/git-guided-workflow` emits a transient tab-scoped activation request that the browser validates and consumes before generic status rendering; a named prompt-only direct-launch fallback remains temporarily available only when that command is absent. The HTTP server authoritatively rejects the exact command and fallback admission while the tab is streaming, compacting, has pending messages, or already has a pending Guided Git launch, bypassing generic compaction queueing. A browser-generated UUID is stored in one short-lived server record and added only to the trusted live event envelope; the canonical four-field extension payload remains unchanged, and only the browser holding the matching one-shot permit can consume the event. When the review extension is loaded/enabled, both `git add .` and accepting the current staged set send `/aur-review start --scope staged --origin guided-git` to the same tab. Only its matching approval advances to message generation. The browser and server recheck the approved domain-separated staged-content hash before message generation, commit, and PR-worktree transfer; drift, missing hashes, or hash-check errors return to Stage and require a new review. A decline returns to staging and rejects an unchanged declined staged hash until corrected content is restaged. Guided Git never stages, commits, or pushes remediation automatically. The extension remains the decision authority; direct API callers are not granted an approval by this browser workflow.
288
+ - Extension-launched Guided Git workflow for existing repos and new repos with persistent model/reasoning preferences, review-first staging, an optional manual staged repository-review gate from `aur-review`, generated or typed commit messages, explicit push/PR confirmation, and optional PR worktrees. `/git-guided-workflow` emits a transient tab-scoped activation request that the browser validates and consumes before generic status rendering; the browser requires the extension-owned native generation commands and has no prompt-only launch fallback. The HTTP server authoritatively rejects the exact command admission while the tab is streaming, compacting, has pending messages, or already has a pending Guided Git launch, bypassing generic compaction queueing. A browser-generated UUID is stored in one short-lived server record and added only to the trusted live event envelope; the canonical four-field extension payload remains unchanged, and only the browser holding the matching one-shot permit can consume the event. When the review extension is loaded/enabled, both `git add .` and accepting the current staged set send `/aur-review start --scope staged --origin guided-git` to the same tab. Only its matching approval advances to message generation. The browser and server recheck the approved domain-separated staged-content hash before message generation, commit, and PR-worktree transfer; drift, missing hashes, or hash-check errors return to Stage and require a new review. A decline returns to staging and rejects an unchanged declined staged hash until corrected content is restaged. Guided Git never stages, commits, or pushes remediation automatically. The extension remains the decision authority; direct API callers are not granted an approval by this browser workflow.
263
289
  - Browser support for Pi extension UI prompts, widgets, status updates, `/btw` side-question output widgets with optional context transfer/live steering, browser notifications when a tab needs an extension UI response, and an optional side-panel toggle for agent-done notifications.
264
290
  - Localhost-only exact Pi/Web UI update plans with digest-bound confirmation, fail-closed owner refusals, cross-process locking, durable receipts, side-by-side managed Web UI candidates, stable pointer-aware launch, changed-boot-identity reconnect, and automatic health-gated rollback. Combined plans also include update-available Pi-registered optional packages and retain per-package partial receipts. A separate verified Pi executable delegates to that exact executable's self-updater and fails verification if it does not reach the confirmed version; managed targets remain strictly pinned. The former broad package-root scan and `pi update --all`/fallback mutation path is disabled.
265
291
  - Feedback reactions (`👍`, `👎`, `?`) on final assistant output plus tool/bash action cards, which can ask Pi to create or update a LEARNING.
@@ -293,7 +319,7 @@ Focused checks are `node tests/session-tree-event-targets.test.mjs`, `node tests
293
319
  - `GET /api/settings`, `POST /api/settings`, `GET /api/tools`, `POST /api/tools`, `GET /api/skills`, and `POST /api/skills` for browser-native Pi settings/tool/skill selectors.
294
320
  - `GET /api/safety-guard/config` and `POST /api/safety-guard/config` for browser-native persisted Safety Guard Setup. The tab-scoped `GET` includes authenticated models plus a per-model supported-thinking map; `POST` validates the effective enabled auto-review selection before writing.
295
321
  - `GET /api/skill-file` and localhost-only `POST /api/skill-file` for guarded `SKILL.md` editing from tracked skill tags.
296
- - `GET /api/sessions`, `GET /api/session-tree`, `POST /api/switch-session`, `POST /api/session-rename`, and localhost-only `POST /api/session-delete` for resume/tree/session metadata flows.
322
+ - `GET /api/sessions`, `GET /api/session-tree`, `POST /api/switch-session`, `POST /api/session-rename`, and localhost-only `POST /api/session-delete` for resume/tree/session metadata flows. The compatibility-named switch endpoint starts the selected session in a new terminal and returns both the new and source tab metadata.
297
323
  - `GET /api/auth-providers` and localhost-only `POST /api/auth-logout` for provider-auth status and stored-credential removal.
298
324
  - `GET /api/app-runners`, `POST /api/app-runner`, `POST /api/app-runner/input`, `POST /api/app-runner/stop`, `GET/POST/DELETE /api/app-runner-config`, and `GET /api/app-runner-files` for detected and custom project runners. `POST /api/app-runner-config` replaces project discovery paths with `{ "searchPaths": [...] }` or saves a custom runner with `{ "runner": { ... } }`; invalid path submissions fail atomically and leave the stored configuration unchanged.
299
325
  - `GET /api/git-root`, `GET /api/git-panel`, and `GET /api/git-commit?hash=<full-hash>` for compact per-terminal-group repository discovery, local status/history snapshots, and bounded read-only commit diffs. `POST /api/git-changes/stage-all` and `POST /api/git-changes/unstage-all` complement the guarded path-level staging routes.
@@ -644,6 +670,8 @@ Session-specific tool and skill choices are independent and always win when thei
644
670
 
645
671
  `index.ts` owns resource lifecycle only in TUI mode, while `webui-rpc-helper.mjs` owns it in RPC mode. Both capture or resolve an immutable runtime fallback, recompute on session/tree/model events, and fence asynchronous model changes before applying them. HTTP model-profile writes validate the exact authenticated model and update the latest locked settings snapshot so concurrent writers and temporarily unavailable names are preserved.
646
672
 
673
+ `@firstpick/pi-package-qt-webui` consumes this package as the canonical tool/skill state owner. Its backend imports `webuiSettingsFile()`, `readWebuiSettings()`, `updateWebuiSettings()`, and the resource-selection helpers rather than copying the settings schema or lock protocol. Qt global and exact-model writes therefore merge into the same `resourceDefaults`, and its Pi helper uses the same `webui-tools-config` and `webui-skills-config` version-2 branch entries for session explicit/inherit state. Qt-only sampling remains outside this contract. Each Qt resource-state request reads the latest shared settings; there is no direct process-to-process synchronization.
674
+
647
675
  ### Optional features
648
676
 
649
677
  - **What it is:** A Pi package manager for Web UI-aware extensions, prompts, themes, and optional dashboards. Optional companions are separate from the Web UI core install.
@@ -720,8 +748,7 @@ Optional companions:
720
748
  - `@firstpick/pi-extension-bang-command-autocomplete` — `!`/`!!` shell-command autocomplete. Native Pi TUI autocomplete still uses the companion provider; Web UI uses its own browser endpoint because RPC autocomplete providers do not reach the browser composer.
721
749
  - `@firstpick/pi-extension-fish-user-bash` — fish/user-shell backend for `!`/`!!` user bash. Web UI emits Pi `user_bash` from the RPC helper so the companion can supply shell operations before default bash execution.
722
750
  - `@firstpick/pi-extension-btw` — ephemeral `/btw` side-question command with a TUI overlay, Web UI live output widget, and Transfer Context action.
723
- - `@firstpick/pi-extension-git-guided-workflow` — preferred cross-surface `/git-guided-workflow` launcher; WebUI consumes its transient start request and keeps the browser renderer/server workflow local.
724
- - `@firstpick/pi-prompts-git-pr` — generated Guided Git commit messages, branch names, and pull-request text.
751
+ - `@firstpick/pi-extension-git-guided-workflow` — cross-surface `/git-guided-workflow` launcher plus native `/git-staged-msg`, `/git-branch-name`, and `/pr` generation; WebUI consumes its transient start request and keeps the browser renderer/server workflow local.
725
752
  - `@firstpick/pi-extension-release-npm` — NPM publish menu and release widgets.
726
753
  - `@firstpick/pi-extension-release-aur` — AUR publish menu and release widgets.
727
754
  - `@firstpick/pi-extension-aur-review` — Deterministic manual repository/Git review with working-tree standalone snapshots, staged Guided Git snapshots, and a specialized browser card. Install from `/home/firstpick/pi-coding-agent-forge/pi-extension-aur-review` locally for now; npm installation is valid only after publication.
@@ -740,7 +767,9 @@ Optional companions:
740
767
 
741
768
  The preferred WebUI entry points resolve `/git-guided-workflow` from the originating tab's RPC command catalog and send that exact extension command through the normal prompt route with an explicit message. Explicit dispatch leaves the browser composer draft and attachments untouched. Admission checks the captured tab state and queue first: streaming, compaction, pending messages, and unavailable state are refused rather than routed through generic follow-up behavior. A bounded browser-local per-tab permit is granted before dispatch, so only the client that sent the command may consume the next live activation; other browser clients attached to the same Pi tab ignore the broadcast. The extension then emits the activation contract described below; WebUI starts its existing local renderer/server workflow for the trusted envelope tab. The Git workflow button ultimately runs local Git commands in that Pi tab's working directory and covers both empty/new projects and existing repositories.
742
769
 
743
- When `/git-guided-workflow` is absent but tab-local `/git-staged-msg` is present, `startLegacyGuidedGitWorkflowFallback` provides the user-approved temporary direct-launch migration path and records an informational event. It is intentionally one named seam for later removal. If the workflow command is present, no direct fallback is allowed. The full existing browser flow requires tab-local `/git-staged-msg`; branch and PR generation additionally recheck `/git-branch-name` and `/pr` at their action boundaries. Missing generation commands are attributed to `@firstpick/pi-prompts-git-pr`, not the workflow extension.
770
+ The browser does not use a prompt-only launch or generation fallback. The full flow requires tab-local extension provenance for `/git-staged-msg`, `/git-branch-name`, and `/pr`; each action rechecks its exact command before dispatch. Server-side generation preflight independently reads the RPC command catalog, selects only `source: "extension"`, and dispatches the resolved duplicate-suffixed name when needed. A same-named prompt command is rejected rather than expanded.
771
+
772
+ Configured workflow startup reads saved preferences through `GET /api/git-workflow/preferences?includeModels=false`. This path deliberately avoids `get_available_models` on Pi's shared RPC control channel; startup does not need the model catalog. The setup dialog keeps using the full endpoint because it must display authenticated models and their supported reasoning levels.
744
773
 
745
774
  Before first use, run `/git-workflow-setup` in Pi or choose **Common Pi Options → Guided Git Setup** in the browser. Select an exact authenticated primary `provider/modelId`, a supported reasoning effort, and the workflow defaults described below. You may also select a different authenticated fallback model and its separately supported effort, or keep **No fallback**. The browser preselects the active tab model when possible and preserves a valid configured fallback when setup is reopened, but saving is always explicit. Preferences are stored globally in the Pi Web UI settings file (normally `~/.pi/webui/settings.json`), not in browser storage.
746
775
 
@@ -771,13 +800,13 @@ The saved setup includes:
771
800
  - ask/current-branch/PR-worktree delivery highlighting; and
772
801
  - optional pre-commit verification reminders.
773
802
 
774
- If a configured model or effort is unavailable, setup saving fails closed. During generation, Guided Git lets Pi finish any internal primary retries, then uses the explicitly configured fallback at most once after a final primary generation failure. It never chooses an unconfigured model. The original tab model and effort are restored after the successful attempt settles or both attempts fail. Request validation, staged-content checks, cancellation, Git failures, and Pi process exit/error do not trigger fallback; a dead Pi process cannot run another attempt. Footer and Guided Git pushes send the active tab's current `HEAD` to the same-named branch on the preferred remote and set that branch as the upstream instead of retaining a potentially mismatched upstream. Guided Git never force-pushes automatically. Git hooks and signing configuration continue to run normally.
803
+ If a configured model or effort is unavailable, setup saving fails closed. During generation, the server selects the configured profile and invokes the native extension command. The accepted RPC response confirms only that Pi handled the command. The server treats a correlated `extension_error` event as the native command's terminal failure and checks for a fresh correlated artifact only when the command did not report one. If the artifact check fails immediately after the accepted response, the server allows a bounded 500 ms grace period for a separately delivered correlated `extension_error` before reporting the artifact failure. Only the native command's internal direct model/provider-generation failure classification may start the explicitly configured fallback profile once. Invalid generated output, a missing or stale artifact after a command with no reported error, and all non-provider failures remain terminal. It never chooses an unconfigured model. The original tab model and effort are restored after a successful native artifact verification or terminal failure. Request validation, staged-content checks, cancellation, Git failures, and Pi process exit/error do not trigger fallback; a dead Pi process cannot run another attempt. Footer and Guided Git pushes send the active tab's current `HEAD` to the same-named branch on the preferred remote and set that branch as the upstream instead of retaining a potentially mismatched upstream. Guided Git never force-pushes automatically. Git hooks and signing configuration continue to run normally.
775
804
 
776
- After the message is generated, **Create PR** asks Pi to generate `dev/COMMIT/staged-branch-name.txt`, lets you confirm or edit the `type/feature-name` branch, then switches with `git switch -c` before committing. In PR mode, choose **Commit short**, **Commit long**, or type a message and use **Commit input**, then **Push and Create PR** pushes the branch, sends `/pr`, shows the generated `dev/PR/<branch>.md` description for editing/confirmation, and creates the pull request with `gh pr create`. Use **Manual branch** to skip agent branch-name generation and type the branch directly.
805
+ After the message is generated, **Create PR** invokes the native branch command to generate `dev/COMMIT/staged-branch-name.txt`, lets you confirm or edit the `type/feature-name` branch, then switches with `git switch -c` before committing. In PR mode, choose **Commit short**, **Commit long**, or type a message and use **Commit input**, then **Push and Create PR** pushes the branch, invokes `/pr`, shows the generated `dev/PR/<encodeURIComponent(current-branch)>.md` description for editing/confirmation, and creates the pull request with `gh pr create`. Use **Manual branch** to skip model branch-name generation and type the branch directly.
777
806
 
778
- Use the workflow process buttons to jump directly to **Initialize**, **Stage**, **Message**, **Commit**, **Push**, or PR steps when earlier work was already completed manually. Selecting **Message** lets you either run `/git-staged-msg` or type a commit message and use **Commit input** directly. Selecting **Commit** loads the current generated files from `dev/COMMIT/` before enabling the commit choices. Manual preview remains available for existing files, while an active generation uses bounded single-flight polling so duplicate timer, reconnect, and `agent_end` signals cannot race or surface a stale pair. A yellow dot means that process was selected or is available but its action has not completed in this workflow; green means the process action completed.
807
+ Use the workflow process buttons to jump directly to **Initialize**, **Stage**, **Message**, **Commit**, **Push**, or PR steps when earlier work was already completed manually. Selecting **Message** lets you either run `/git-staged-msg` or type a commit message and use **Commit input** directly. Selecting **Commit** loads the current generated files from `dev/COMMIT/` before enabling the commit choices. Manual preview remains available for existing files, while an active generation uses bounded single-flight polling and the exact server generation ID so duplicate timers and reconnects cannot surface a stale artifact. A yellow dot means that process was selected or is available but its action has not completed in this workflow; green means the process action completed.
779
808
 
780
- This requires `/git-staged-msg` and `/pr` from `@firstpick/pi-prompts-git-pr`; branch-name generation uses `/git-branch-name`. Creating the PR also requires an authenticated GitHub CLI (`gh`). Review the generated commit message, branch name, remote URL, and PR description before committing, pushing, or creating a PR.
809
+ All three generation commands come from `@firstpick/pi-extension-git-guided-workflow` and call the active selected model directly. Creating the PR also requires an authenticated GitHub CLI (`gh`). Review the generated commit message, branch name, remote URL, and PR description before committing, pushing, or creating a PR.
781
810
 
782
811
  ### Extension activation contract
783
812
 
@@ -811,9 +840,9 @@ npx playwright test --project=chromium tests/browser/guided-git-extension-comman
811
840
 
812
841
  The persisted `generation.fallback` object always contains `provider`, `modelId`, and `thinkingLevel`; an empty provider/model pair disables fallback. The Guided Git setup client sends the nested fallback object on every save, filters the selected primary out of fallback choices, and sends empty provider/model fields when **No fallback** is selected. Server-side validation remains authoritative for availability, profile equality, and supported effort.
813
842
 
814
- `POST /api/git-workflow/generate` keeps `generation` as the effective profile and allocates one server generation ID for commit, branch, or PR text. An immediate primary dispatch failure that successfully starts fallback also returns `fallbackUsed: true` and `primaryGeneration`; terminal dispatch errors include bounded correlation metadata. Later final-primary failures are server-owned: the browser only observes `webui_git_workflow_generation_fallback_started` and `webui_git_workflow_generation_fallback_failed` tab events. It buffers events that precede the POST response, then requires the exact generation ID for every kind, deduplicates lifecycle output, and never sends a retry.
843
+ `POST /api/git-workflow/generate` keeps `generation` as the effective profile and allocates one server generation ID for commit, branch, or PR text. The server resolves an RPC command with `source: "extension"`, selects the configured profile, sends the exact native slash command, and waits for that synchronous command response. The attempt succeeds only when the command also produces a fresh artifact relative to the captured baseline. If artifact verification fails, a bounded grace period gives the native `extension_error` event precedence when RPC stdout delivers it after the accepted command response. Only the native extension's stable internal direct model/provider-failure classification may start the configured fallback and return `fallbackUsed: true` with `primaryGeneration`; a successful RPC response without either a fresh artifact or correlated native error is terminal. Terminal dispatch errors include bounded correlation metadata.
815
844
 
816
- Both lifecycle events carry the effective `generation`, `primaryGeneration`, `kind`, `tabId`, and `generationId`, plus a curated bounded `reason` or `error`; full provider diagnostics remain server-side. The server retains at most the start and terminal fallback events per tab and replays them on EventSource reconnect. Commit generation keeps its original correlation ID and pre-primary artifact baseline across attempts. Commit, branch, and PR artifact reads require successful terminal settlement of that correlated generation, so failed-primary output cannot become ready while fallback runs. The server—not browser event handling—owns reservation, atomic cancellation, the two-attempt ceiling, and restoration of the original model/effort after success or terminal failure. Validation failures, user aborts, Git command failures, and Pi process exit/error remain ordinary failures and never enter fallback dispatch.
845
+ Fallback lifecycle events start with `webui_git_workflow_generation_fallback_started` and carry the effective `generation`, `primaryGeneration`, `kind`, `tabId`, and `generationId`, plus a curated bounded `reason` or `error`; full provider diagnostics remain server-side. The server retains at most the start and terminal fallback events per tab and replays them on EventSource reconnect. One correlation ID and pre-primary artifact baseline remain authoritative across both attempts. Commit, branch, and PR reads require successful terminal artifact verification, so failed-primary output cannot become ready while fallback runs. The server owns reservation, cancellation state, the two-attempt ceiling, and restoration of the original model/effort after success or terminal failure; the browser observes lifecycle state and never sends a retry. Validation failures, user aborts, Git command failures, and Pi process exit/error remain ordinary failures and never enter fallback dispatch.
817
846
 
818
847
  ## Open Issue bot
819
848
 
package/README.md CHANGED
@@ -17,7 +17,7 @@ Pi Web UI keeps the normal Pi agent experience while giving you more room to man
17
17
 
18
18
  | Area | Highlights |
19
19
  | --- | --- |
20
- | **Sessions and workspaces** | Run several isolated Pi sessions, resume prior work, switch projects, preserve per-tab drafts, add another tab directly from the tab strip, and create branch worktrees. |
20
+ | **Sessions and workspaces** | Run several isolated Pi sessions, resume prior work in a new terminal without replacing the current one, switch projects, preserve per-tab drafts, add another tab directly from the tab strip, and create branch worktrees. |
21
21
  | **Live agent work** | Follow streaming Markdown with syntax highlighting for code blocks, grouped consecutive thinking, tool output, queues, todo progress, managed agent runs, and direct agent-to-agent conversations without leaving the browser. |
22
22
  | **Models and controls** | Change models and thinking effort, manage scoped models, configure tools and skills, and use the command palette. |
23
23
  | **Files and prompts** | Upload or paste files and images, edit text attachments, use slash-command suggestions, browse project files, and reference project paths with `@`. |
@@ -79,7 +79,7 @@ Use **Agent models** in the Subagents panel to choose the default model and thin
79
79
 
80
80
  Independent Pi processes do not appear automatically. Start them through `pi-webui agent run`, attach a persisted session with `pi-webui agent attach`, or use a cooperating registration adapter. See [TECHNICAL.md](TECHNICAL.md#subagent-observability) for supported commands and limitations.
81
81
 
82
- When agents exchange direct Intercom messages or use native subagent-supervisor coordination, one compact tag per conversation appears beneath the composer. Up to eight tags share one row; denser groups wrap into a compact grid instead of creating a horizontal scrollbar. Long names shorten with an ellipsis, while the full name remains available to assistive technology and on hover. Select a tag to open a read-only chat view showing the two agent names or IDs and their messages. Generic Intercom transport calls and received Intercom records stay out of the main agent-output transcript, while attachments, tool output, and reasoning remain excluded from the chat view.
82
+ When agents exchange direct Intercom messages or use native subagent-supervisor coordination, one compact tag per conversation appears beneath the composer. The tags start at the right edge and extend toward the middle, using up to half of the prompt width. Each tag has a bounded width. If they do not fit, WebUI keeps complete tags visible and replaces the rest with a **+X** tag. Select **+X** to open the remaining conversations above the composer. Long names still shorten with an ellipsis when one name exceeds the available space, while the full name remains available to assistive technology and on hover. Select a conversation to open a read-only chat view showing the two agent names or IDs and their messages. Generic Intercom transport calls and received Intercom records stay out of the main agent-output transcript, while attachments, tool output, and reasoning remain excluded from the chat view.
83
83
 
84
84
  Useful shortcuts:
85
85
 
@@ -162,7 +162,7 @@ For a long scoped-model list, right-click the Git footer **Model** box and choos
162
162
 
163
163
  **Optional feature needed:** None — the browser tools setup is included in Pi Web UI core.
164
164
 
165
- Enable tools for the current session, save a global default, or configure an exact model profile. Selecting that model automatically applies its tool profile unless the session has its own tool selection.
165
+ Enable tools for the current session, save a global default, or configure an exact model profile. In Pi's TUI, `/tools` uses the same searchable keyboard workflow as `/scoped-models`: arrow keys move, `Enter` toggles, `Ctrl+A` enables matching entries, `Ctrl+X` clears them, and `Ctrl+S` saves. **Model default** opens a searchable exact-model picker that marks the active model and existing tool profiles without switching the active model. Selecting a configured model automatically applies its tool profile unless the session has its own tool selection.
166
166
 
167
167
  #### Skills setup
168
168
 
@@ -170,7 +170,7 @@ Enable tools for the current session, save a global default, or configure an exa
170
170
 
171
171
  **Optional feature needed:** None — the browser skills setup is included in Pi Web UI core.
172
172
 
173
- Find installed skills and manage session, global, or exact-model activation. Selecting a configured model automatically applies its skill profile unless the session has its own skill selection.
173
+ Find installed skills and manage session, global, or exact-model activation. In Pi's TUI, `/skills` uses the same searchable keyboard workflow as `/scoped-models`, including the exact-model picker used by `/tools`. Selecting a configured model automatically applies its skill profile unless the session has its own skill selection.
174
174
 
175
175
  ### Project automation and Git
176
176
 
@@ -186,11 +186,11 @@ Launch detected development servers, tests, builds, scripts, and project-defined
186
186
 
187
187
  ![Pi Web UI guided Git workflow showing staged changes, generated commit messages, and PR controls](https://raw.githubusercontent.com/Firstp1ck/pi-coding-agent-forge/main/pi-package-webui/images/Webui_GitWorkflow_v0.4.8.png)
188
188
 
189
- **Optional features needed:** `@firstpick/pi-extension-git-guided-workflow` provides the preferred `/git-guided-workflow` launcher and bundles `@firstpick/pi-prompts-git-pr` for generated commit messages, branch names, and pull-request content. `@firstpick/pi-extension-aur-review` optionally adds the staged-review gate. The Optional features panel installs and audits the Guided Git extension as one complete feature.
189
+ **Optional features needed:** `@firstpick/pi-extension-git-guided-workflow` provides `/git-guided-workflow` plus native `/git-staged-msg`, `/git-branch-name`, and `/pr` generation commands. `@firstpick/pi-extension-aur-review` optionally adds the staged-review gate. The Optional features panel installs and audits the Guided Git extension as one complete feature.
190
190
 
191
- Run `/git-guided-workflow` in the browser composer or use the **Guided Git workflow** button. The extension starts the workflow in the originating tab without sending a repository path, diff, or Git data in its activation request. Existing prompt-only installations retain a temporary compatibility launcher, but installing the workflow extension is the supported path.
191
+ Run `/git-guided-workflow` in the browser composer or use the **Guided Git workflow** button. The extension starts the workflow in the originating tab without sending a repository path, diff, or Git data in its activation request. Browser generation requires the extension-owned RPC commands and does not fall back to same-named prompt templates.
192
192
 
193
- Move through review, staging, commit-message generation, commit, push, and pull-request steps with explicit confirmations. In **Guided Git Setup**, you can optionally choose a fallback model and its own reasoning effort. If the primary model reaches a final generation failure, Guided Git tries the fallback once, reports the change in the workflow, and restores the tab’s prior model and effort afterward. Validation failures, cancellation, Git command failures, and a stopped Pi process do not trigger fallback.
193
+ Move through review, staging, commit-message generation, commit, push, and pull-request steps with explicit confirmations. In **Guided Git Setup**, you can optionally choose a fallback model and its own reasoning effort. If the primary model reaches a final generation failure, Guided Git tries the fallback once, reports the change in the workflow, and restores the tab’s prior model and effort afterward. Large staged diffs use multiple model requests; a fallback attempt sends the complete staged evidence again to the configured fallback provider and can nearly double the request count and cost. Validation failures, cancellation, Git command failures, and a stopped Pi process do not trigger fallback.
194
194
 
195
195
  #### Git branch picker
196
196
 
package/TECHNICAL.md CHANGED
@@ -93,7 +93,7 @@ The working-directory picker accepts a direct path for first, new, and split ter
93
93
 
94
94
  When tabs span multiple working directories, a directory with one tab stays a normal, non-dropdown tab. Hover over it—or focus controls within it—to reveal **+ Tab** directly below, matching the placement used by grouped terminal menus without repeating the current tab. Directories with multiple tabs continue to use the grouped terminal menu.
95
95
 
96
- Restarting only the Web UI normally keeps managed Pi tabs, working folders, saved sessions, and active work connected to the replacement server.
96
+ Restarting only the Web UI normally keeps managed Pi tabs, working folders, saved sessions, and active work connected to the replacement server. Choosing a saved session from `/resume` opens it in a separate terminal tab and leaves the current terminal unchanged.
97
97
 
98
98
  Continuity requires the same Pi configuration location and Web UI port. It does not preserve browser drafts, app-runner processes, or an active model request across a machine restart, power loss, explicit shutdown, or supervisor failure. Saved transcript history can still be reopened afterward.
99
99
 
@@ -115,7 +115,7 @@ Text and image reads remain scoped to the active tab's working directory and its
115
115
 
116
116
  ## Optional features
117
117
 
118
- Every server start performs a bounded, read-only startup audit of optional companion packages. Missing, unregistered, or older companions appear in the Optional features panel without blocking the core Web UI. The Guided Git entry installs `@firstpick/pi-extension-git-guided-workflow`, which bundles and registers the `@firstpick/pi-prompts-git-pr` generation prompts as part of the same Pi package.
118
+ Every server start performs a bounded, read-only startup audit of optional companion packages. Missing, unregistered, or older companions appear in the Optional features panel without blocking the core Web UI. The Guided Git entry installs `@firstpick/pi-extension-git-guided-workflow`, which registers the launcher and native commit-message, branch-name, and pull-request generation commands as one Pi package.
119
119
 
120
120
  - **Migrate…** reviews and installs selected legacy companions.
121
121
  - **Later** dismisses the startup reminder while leaving migration available in settings.
@@ -192,7 +192,7 @@ The flat-or-advanced choice is a browser-local display preference. It persists a
192
192
 
193
193
  ## Tool and skill scopes
194
194
 
195
- The browser-native tool and skill selectors, and the TUI `/tools` and `/skills` commands, offer **Session only**, **Global default**, and **Model default** scopes. Tools and skills resolve independently: a session choice wins over an exact case-sensitive provider/model profile, which wins over the global default and then Pi's runtime default.
195
+ The browser-native tool and skill selectors, and the TUI `/tools` and `/skills` commands, offer **Session only**, **Global default**, and **Model default** scopes. In the TUI resource list, type to search, use the arrow keys to move, press `Enter` to toggle, `Ctrl+A` to enable matching entries, `Ctrl+X` to clear matching entries, and `Ctrl+S` to save. `Escape` cancels; `Ctrl+C` clears a non-empty search before cancelling. These shortcuts match `/scoped-models`, including custom Pi bindings for the shared model-selection actions. **Model default** uses a separate searchable provider, ID, and display-name picker. It opens at the active model when available, marks existing profiles, and returns the exact provider/model pair without changing the active model. Tools and skills resolve independently: a session choice wins over an exact case-sensitive provider/model profile, which wins over the global default and then Pi's runtime default.
196
196
 
197
197
  After Pi successfully selects a model, its exact tool and skill profiles apply immediately for resource types that are not pinned by the current session; no reload or selector reopening is needed. A model with no profile falls back through the global and runtime defaults. Choosing a model inside a profile editor selects the profile to edit—it does not switch the active Pi model.
198
198
 
@@ -305,7 +305,7 @@ Troubleshooting:
305
305
 
306
306
  ## Agent conversation viewer
307
307
 
308
- Direct `pi-intercom` messages and native subagent-supervisor coordination appear as conversation tags beneath the composer for the active tab. Each tag represents one direct two-agent conversation. Groups of up to eight divide one row equally; above that dense threshold, tags wrap into a no-scroll grid with a 44-pixel minimum width. Long names visually truncate, while complete conversation names remain exposed through accessible labels and tooltips. Select a tag to open a large, read-only chat dialog; keyboard focus remains inside the dialog until it closes and then returns to the tag when that tag is still present.
308
+ Direct `pi-intercom` messages and native subagent-supervisor coordination appear as conversation tags beneath the composer for the active tab. Each tag represents one direct two-agent conversation. On desktop, the strip starts at the right edge and extends toward the middle, using up to half of the prompt row. Each direct tag is width-bounded. WebUI measures complete tags and replaces those that do not fit with a `+X` disclosure. The disclosure opens a bounded, keyboard-accessible list above the composer. Narrow layouts give the strip the full row and keep 44-pixel touch targets. Long names visually truncate only when one name exceeds its available space, while complete conversation names remain exposed through accessible labels and tooltips. Select a conversation to open a large, read-only chat dialog; keyboard focus remains inside the dialog until it closes and then returns to the originating tag or disclosure.
309
309
 
310
310
  Generic `intercom` tool calls, paired results, and incoming `intercom_message` records are omitted from the normal main-output transcript. Mixed assistant records keep their unrelated text and tool activity. The viewer reads the original persisted records through its separate sanitized endpoint, so removing transport cards from the main output does not remove messages from the conversation dialog.
311
311
 
@@ -319,15 +319,15 @@ If an expected tag is absent, confirm that the agents used direct Intercom or na
319
319
 
320
320
  Install `@firstpick/pi-extension-git-guided-workflow` to make `/git-guided-workflow` the preferred launcher in both Pi's terminal interface and WebUI. In WebUI, typing the command or selecting the Guided Git action requests the browser workflow for the originating tab. Only the browser client that sent the command consumes the live activation. The request is one-shot: a disconnected browser can miss it, but WebUI will not replay it later and unexpectedly restart Git work.
321
321
 
322
- The browser keeps a temporary direct-launch fallback for legacy installations that have a separately installed `@firstpick/pi-prompts-git-pr` package but not the workflow extension. This compatibility path will be removed after the migration period, so install the extension rather than relying on the fallback. Current extension installations bundle the prompt package and do not require a second Pi package entry.
322
+ Browser generation accepts only RPC-capable extension provenance for `/git-staged-msg`, `/git-branch-name`, and `/pr`. A separately installed same-named prompt template is not a fallback for the native path.
323
323
 
324
- The launcher refuses immediately while the originating tab is running, compacting context, or has pending messages; it does not queue Guided Git for later. If the command does not open the workflow, confirm that the tab is idle, has no queued messages, and lists both `/git-guided-workflow` and `/git-staged-msg`. Restart or reload the Pi tab after installing or updating either package. Retrying after an uncertain activation is a manual decision; WebUI does not retry it automatically.
324
+ The launcher refuses immediately while the originating tab is running, compacting context, or has pending messages; it does not queue Guided Git for later. If the command does not open the workflow, confirm that the tab is idle, has no queued messages, and lists `/git-guided-workflow`, `/git-staged-msg`, `/git-branch-name`, and `/pr` as extension commands. Restart or reload the Pi tab after installing or updating the extension. Retrying after an uncertain activation is a manual decision; WebUI does not retry it automatically.
325
325
 
326
326
  ## Guided Git generation profiles
327
327
 
328
- Open **Common Pi Options → Guided Git Setup** or run `/git-workflow-setup` before using generated commit messages, branch names, or pull-request text. Choose the required primary model and its reasoning effort. You may also choose a different fallback model and a separate supported effort, or leave **No fallback** selected. The effort lists follow the capabilities reported for each selected model.
328
+ Open **Common Pi Options → Guided Git Setup** or run `/git-workflow-setup` before using generated commit messages, branch names, or pull-request text. Choose the required primary model and its reasoning effort. You may also choose a different fallback model and a separate supported effort, or leave **No fallback** selected. The effort lists follow the capabilities reported for each selected model. Before enabling fallback, account for its privacy and cost impact: large commit diffs use multiple model requests, and a fallback attempt sends the complete staged evidence again to the configured fallback provider.
329
329
 
330
- A configured fallback is a strict one-retry policy: Guided Git lets Pi finish the primary model’s own retry lifecycle, then makes at most one fallback attempt after a final primary model-generation failure. The workflow output identifies the primary and configured fallback at startup and reports when generation continues with the fallback. Fallback status is restored when you return to the tab or its live event connection reconnects. Generated commit, branch, or PR text is treated as ready only after the correlated attempt finishes successfully. After successful generation or terminal failure, the tab’s model and reasoning effort are restored to the values it had before Guided Git generation began.
330
+ A configured fallback is a strict one-retry policy: Guided Git lets Pi finish the primary model’s own retry lifecycle, then makes at most one fallback attempt after a final primary model-generation failure. The workflow output identifies the primary and configured fallback at startup and reports when generation continues with the fallback. For a commit diff at the extension’s 16 MiB ceiling, one attempt can use up to 35 requests; chunk-summary formatting does not trigger retries. Fallback can repeat the full attempt, for up to 70 requests across both providers. Fallback status is restored when you return to the tab or its live event connection reconnects. Generated commit, branch, or PR text is treated as ready only after the correlated attempt finishes successfully. After successful generation or terminal failure, the tab’s model and reasoning effort are restored to the values it had before Guided Git generation began.
331
331
 
332
332
  Fallback applies only to model generation. Request validation failures, staged-content checks, busy-state rejection, user cancellation, Git command failures, and a stopped or failed Pi process do not trigger it. A dead Pi process cannot run the fallback; restart or reload the tab and start a new generation request after addressing the failure.
333
333