Repository navigation
Description
Problem or use case
In a Pi native chat session, every fire-and-forget extension UI call is silently dropped. Widget-style Pi extensions therefore render nothing at all — the user cannot tell whether the extension is running, broken, or filtered.
Environment: Orca 1.4.261 (macOS, Apple silicon), Pi 1.5.2, @juicesharp/rpiv-todo 2.15.0.
Concrete case: @juicesharp/rpiv-todo draws its live todo list with ctx.ui.setWidget(KEY, lines) (todo-overlay.ts, "Persistent widget showing todo list above the editor") plus a collapse hotkey registered through pi.registerShortcut. In a Pi terminal pane both work. In a Pi native chat neither does: the overlay never appears, and the hotkey cannot fire. The todo tool itself still runs and shows up as an ordinary tool row, so the model-side list keeps working and the gap is easy to miss.
Why (from reading the 1.4.261 bundle):
In out/main/chunks/structured-agent-session-host-assembly-*.js, the Pi dialog handler drops these before they can reach any UI:
mF = new Set(['notify', 'setStatus', 'setWidget', 'setTitle', 'setEditorText'])
receive(e) {
if (this.backgroundWork.receive(e) || this.subagents.receive(e) || (typeof e.method === 'string' && mF.has(e.method))) return
...
}Only two private setStatus keys are consumed further: orca-background-work (Orca's own injected bridge) and orca-subagents. Everything else — setWidget, notify, setStatus for any other key, setTitle — returns without rendering anything and without telling the extension.
That matters because Pi's rpc-extension-ui.md makes these the only channel an extension has in RPC mode. The four dialog methods (select / confirm / input / editor) work, and extensions that adapt to them do work in chat — @juicesharp/rpiv-ask-user-question explicitly falls back from ui.custom() to ui.select()/ui.input() for RPC hosts and behaves correctly in Orca chat. Extensions that draw with setWidget have no equivalent path.
Reproduce:
- Install
@juicesharp/rpiv-todo(or any extension that callsctx.ui.setWidgetorctx.ui.notify). - Ask the agent in a Pi native chat to create a todo list with the
todotool. - In a Pi terminal pane the overlay appears above the editor. In the native chat nothing appears, and nothing indicates an update was dropped.
Proposed solution
Render the documented string-array methods instead of discarding them:
setWidget→ a collapsible pinned panel above or below the composer, keyed bywidgetKey, re-rendered on each request and hidden whenwidgetLinesis omitted. The panel content is plain text lines, so this is a small renderer.notify→ a transient toast or an inline system row in the transcript, styled bynotifyType(info/warning/error).setStatusfor arbitrarystatusKey→ a status chip in the chat header or composer. The plumbing already exists for Orca's two private keys.setTitle→ the chat tab title, which would also let extensions name the session.
If a full renderer is out of scope for now, at minimum surface unknown widget/notify traffic in a collapsed "extension UI" row so the drop is visible rather than silent.
Alternatives or additional context
- I am not asking for the TUI-only half.
custom(),onTerminalInput(),setFooter/setHeader/setEditorComponent/addAutocompleteProvider, theme switching and extension shortcuts are documented no-ops in RPC mode and cannot be emulated; the request is limited to the methods Pi says are functional over the dialog sub-protocol. - Related: [Feature]: Show suggested replies from Pi extensions as chips in Chat view #37908 (Pi extension suggested replies as chips in Chat view) is the same "gateway" idea for one specific payload; rendering
setWidgetwould cover a much wider set of extensions without per-extension work. - Extension authors cannot detect the drop from their side:
ctx.hasUIistruein RPC mode (Pi's documented behavior), so an extension that checkshasUIwill believe its widget was shown.
Activity
ninerui commentedon Nov 22, 2026
Seconding this with a concrete
setStatuscase (Orca 1.4.269, macOS, Pi 1.5.x). For extensions,setStatusis not really a chip — it is the session's one-line status bar, and in native chat that information exists nowhere.Two extensions I run in every Pi session:
@cortexkit/pi-magic-context→ keymc, textmc: 38.9K (5%) · idle(input tokens, % of window, turn state).@dietrichgebert/ponytail→ keyponytail, text🐴 ponytail: ⌁ FULL(active mode).In a Pi terminal pane Orca renders both, because it is just Pi's own TUI footer:
mc: 38.9K (5%) · idle · 🐴 ponytail: ⌁ FULL.In a Pi native chat both vanish. Orca's context-usage ring covers the token half on hover, so the loss is easy to miss — but the extension-reported turn state and any extension-owned mode (skill/mode indicators, background job summaries) have no surface at all, and the extension is never told the update was dropped.
For reference, T3 Code joins the same
setStatusentries into one muted, tabular line directly under the composer — this is exactly the shape that reads well:Minimal version, if a full widget renderer is out of scope:
statusKey → statusTextper session, updated on eachsetStatus, deleting the entry whenstatusTextis undefined (that is how Pi clears one key).·in a singletext-2xs/muted, tabular-nums line above or below the composer, with the same lifetime as the otherorca-*status keys across reconnect.Happy to test a build if you want a real session with the two extensions above.
qszfy666 commentedon Nov 26, 2026
A heads-up that an implementation for this is open as #45081, in case it saves someone else from starting the same work.
What it does — each frame now lands where Pi's
rpc-extension-ui.mdsays it can, instead of being dropped by theDECORATIONguard inrpc-dialog-callbacks.ts:notify→ a notice row in the transcript, toned bynotifyType.setStatus→ one keyed entry in a quiet strip on the composer's top edge; a second send for the same key revises that row and pi clearing the key removes it.setWidget→ a keyed mono panel above or below the composer perwidgetPlacement; same-key sends revise in place andwidgetLines: undefinedremoves it.setTitle/set_editor_text→ consumed, not drawn. Orca owns the chat tab title (naming and user rename) and the composer draft, and no host channel lets a provider child claim either. This is the one bullet of this issue the PR deliberately leaves open — if a channel for naming a session is wanted, it needs its own change and probably its own issue; say the word and I'll file it rather than leave it implicit.Rows ride the existing agent journal as
kind: 'status'items with additivepresentationhints, so they need no new persistence and older clients keep the ordinary text fallback. Third-party text aimed at the DOM is bounded at the boundary: 64 widget lines, 500 characters per line, and a repeated identical value costs no journal revision.Current state: kept merged up to
main(mergeable, 0 behind as of today), before/after screenshots of the composer panel on the PR, added tests that fail without the change, andpnpm check:changedpassing locally. The repository's CI still needs a maintainer approval to run on a fork PR, and CodeRabbit has not re-reviewed the last pushes.Happy to split or narrow the PR if that makes review easier.
asked by @qszfy666 via 卜卜