Attempted on Linux x64 at main 70e5e384da. Started the isolated web/server dev app and opened it in the browser. Installed Pi 1.1.0 and @juicesharp/rpiv-ask-user-question 2.12.0, then sent an RPC prompt requesting one question with a multi-line markdown option preview. Pi rejected the prompt before any question was emitted: No API key found for the selected model. Its model listing also reports No models available. This VM has no authenticated Pi provider, so the reported rendering remains unverified; verification needs a Pi-authenticated environment. No fix or closure applied.
Pi extension select dialogs show the title twice and lose line breaks#17895
What happened
With the Pi provider, a Pi extension asks a question through ctx.ui.select(title, options). The pending question panel shows the full title twice: once cut short in the header row and once as the question body. The body also loses its line breaks, so a multi-line title (for example a markdown preview with headings and lists) runs together into one paragraph.
@juicesharp/rpiv-ask-user-question hits this on every question in RPC mode: its ask_user_question tool puts the header, the question and any option previews into title.
Screenshot below.
Diagnosis
piQuestion in packages/provider-pi/src/server/adapter.ts sets:
| 1 | header: title, |
| 2 | question: recordString(event, "message") ?? recordString(event, "placeholder") ?? title, |
Pi's RPC select request carries title and options but no message or placeholder, so header and question both get the whole title. The panel renders the question as plain text without keeping newlines. The code is the same on main at a0a601c.
Steps to reproduce
- Use the Pi provider with
@juicesharp/rpiv-ask-user-questioninstalled. - Have the agent call
ask_user_questionwith one question whose option has a multi-line markdownpreview. - Look at the pending question panel.
Expected: the title appears once, with its line breaks.
Version
0.0.46-nightly.20261010.2935
Environment
Linux x64, Pi 1.1.0 (--mode rpc), @juicesharp/rpiv-ask-user-question 2.12.0
Related
juicesharp/rpiv-mono#299: a separate bug in the same flow, where text typed in the panel's answer box reaches the extension as a dismissal.
Investigated and written by Claude Opus 5.5 running in Pi inside T3 Code. Reviewed and posted by @SpyrosPsarras.
Confirming this on the current nightly with an authenticated Pi provider, plus the piece the report was missing: Pi has no way to send a message, so question is guaranteed to fall back to title, and the same mapping defect also duplicates every option's text.
Environment: T3 Code 0.1.3-nightly.20261026.3710 (commit f40c7c6435e3), macOS, Pi 1.4.0, @juicesharp/rpiv-ask-user-question 2.15.0.
1. header and question are the same string by construction
Pi's dialog API is select(title: string, options: string[], opts?) — there is no message field, so for every select request recordString(event, "message") ?? recordString(event, "placeholder") ?? title always resolves to title. Both header and question therefore receive the full prompt, which is what the panel shows twice.
It is not just duplication at 600 characters either: the plugin's RPC fallback builds
| 1 | const title = `${header}${q.question}${buildPreviewBlock(q)}`; |
so the prompt arrives as roughly [Header] question followed by one 600-char block per option preview. The header row renders that whole string on one line and clips it mid-word, and the body repeats it below.
2. description: option.description || option.label duplicates per-option text
select carries one string per option, so there is no separate description to fall back from — description is always equal to label. Every option row renders its text twice.
Suggested fix (server side, small)
- Give
headerandquestiondifferent inputs instead of falling back to the same field: puttitleinquestion, and either derive a short header (first line, truncated) or skip the header row whenheader === question. - Keep newlines in the question body (
whitespace-pre-wrap) so a multi-line title stays readable — this is the "loses line breaks" half of the report. - Skip rendering
descriptionwhen it equalslabel.
Workaround
Patching the plugin's rpc-fallback.ts (4 replacements: title becomes q.question, no header prefix, no folded preview blocks, no index prefix on option rows) makes the same questionnaire render cleanly in T3 — the prompt then appears once and the option rows are single-line. That keeps the fix client-side, but any pi question plugin keeps hitting the same ceiling because select simply has no second text field, so the server-side mapping is still worth fixing.
Still reproduces on T3 Code 0.1.4 (macOS, stable channel) with no third-party plugin. A minimal local extension that calls ctx.ui.select(question, ["Yes", "No"]) shows the question twice in the pending question card: once as the header and once as the body.
ctx.ui.input(header, question) renders correctly, because piQuestion uses placeholder as the body. select has no second text field, so this can only be fixed in piQuestion, for example by skipping the header when it equals the question.
Note
🤖 GPT 6.1 Sol responding on behalf of StiensWout
The duplicate-title mapping was already fixed by #22463. Our independent #33353 addresses the remaining literal-newline presentation on web and mobile with a two-line change. It includes credential-free real Pi select before/after captures on web and Android plus answer roundtrips; changed-file checks pass. Once a build containing both fixes is available, could you verify the original title and multiline preview, and close this issue if both duplication and line breaks are resolved? iOS and the Electron shell were not separately exercised.