[Bug]: Pi ask_user_question single-select questions render as flattened strings instead of a structured card#32092

opened7d agobyPPaoloDelCasale

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Use the Pi provider with @juicesharp/rpiv-ask-user-question installed (2.15.0 here).

  2. Have the agent call ask_user_question with a single-select question that has a header and options with label and description, for example:

    json
    1{ "questions": [{ "header": "Area", "question": "Which area should we work on?",
    2 "options": [{ "label": "Docker/Compose", "description": "Review or edit Compose projects" },
    3 { "label": "Home Assistant", "description": "Automations, dashboards or YAML" }] }] }
  3. Look at the pending question panel.

Expected behavior

The same card a Claude AskUserQuestion gets: the header in the header row, the question as the body, each option's label with its description underneath, and no extra free-text option (the composer's "Type your own answer" box already covers it).

Actual behavior

In RPC mode the extension's dialog walker asks each single-select question through ctx.ui.select(title, options), which only carries strings, and piQuestion in packages/provider-pi/src/server/adapter.ts renders them as they are:

  • The header row shows the generic "Question", and the real header is prefixed into the question text: [Area] Which area should we work on?.
  • Every option is one flattened line, 1. Docker/Compose — Review or edit Compose projects, so label and description are not separated and the number duplicates the shortcut badge.
  • The extension's own 3. Type something. row shows up as a regular option, next to T3's custom answer box.

The structured question is available to the adapter: it already records each call's args from tool_execution_start (turn.toolArgs), and #30608 uses them to rebuild the multi-select variant of this dialog. That PR leaves single-select out ("Single-select questions work"); they are answerable, but still rendered from the flattened strings.

Related: #17895 (title shown twice, fixed by #22463), #23494 and #30608 (multi-select input dialog).

Impact

Cosmetic issue

Version or commit

v0.1.7 (also on main @ 6577c6b618)

Environment

Linux (self-hosted server), web client, Pi 1.5.0, @juicesharp/rpiv-ask-user-question 2.15.0

Logs or stack traces

No response

Screenshots, recordings, or supporting files

Same T3 Code server, same question.

With a local adapter fix that rebuilds the question from the tool call's args (dev server, Pi + Claude Haiku 5.5; picking an option still reaches the model as that option):

Pi question card after the fix: Area header, the question, four options with descriptions, no Type something. row

Workaround

None in T3 Code.

Note

🤖 GPT 6.1 Sol responding on behalf of StiensWout

The maintainer closed our independent #33521 as a duplicate and is retaining #32125 for the same single-select card issue. Our PR retains exact active-dialog correlation cases and actual Pi 1.5 plus published-extension before/after and selected/Unicode custom-answer proof. Once a build contains the retained fix, could you verify the original structured single-select card and close this issue if its structure and answers are correct after that fix lands?