Skip to content

fix(pi): render input dialogs as free-text questions - #33494

Open
StiensWout wants to merge 3 commits into
pingdotgg:mainfrom
StiensWout:t3/pi-question-input
Open

StiensWout wants to merge 3 commits into
pingdotgg:mainfrom
StiensWout:t3/pi-question-input

Conversation

@StiensWout

Copy link
Copy Markdown
Contributor

Pi extension input dialogs displayed their placeholder as the question and offered a fake “Submit empty value” option. They now use the existing free-text/editor card: a generic header, the unchanged title as the question, no preset options, and the composer for the answer.

Reuse initialAnswer: "" so both clients preserve exact text and accept an intentionally empty answer. Web and mobile use “Type your answer” for this existing literal-answer flow. Select behavior and editor prefill remain covered by the existing tests.

Validation:

  • Test-first adapter proof: the input mapping assertion failed on upstream main; the literal-answer assertion failed before the second fix. All 120 Pi adapter tests pass, including whitespace, empty string, cancellation, select values and editor prefill. Another 20 shared answer/draft tests pass.
  • pnpm exec vp run check:changed passes all nine tasks. No full suite was run.
  • A credential-free real Pi 1.5 extension called ctx.ui.input in an isolated web client. The extension received {"value":" SQLite","cancelled":false} and {"value":"","cancelled":false}. The slash command made no model request.
Real Pi input Capture
Before: baseline request mapping, fake option and placeholder as question Before
After: title as question, no options, generic answer hint After

This implements selected Paper A. Pi-specific placeholder hints remain deferred: there is no placeholder wire field, and the question is not rewritten to include the hint. Literal newlines remain intact in the adapter; their visual presentation is separate #33353, whose patch is not included. Extension-specific structured select recovery is outside this change.

Web was exercised; desktop shares that component. Mobile's draft seeding, exact/empty answer handling, input field and placeholder were audited in source. Native mobile keyboard/layout, the Electron shell, and a live cancellation roundtrip were not separately verified; cancellation is covered at the adapter boundary.

Small change: 36 production lines changed, no new state or interface. Separate trim and proof-auditor runs skipped under the small-change rule. Local cubic flagged the deferred placeholder hint; appending it would violate the selected unchanged-question design. Its earlier mobile-copy finding was fixed; its multiline-input concern follows the explicitly selected existing editor behavior. Optional review nits on comment wording and the blank-placeholder case were retained. Design-lens follow-up: if future providers combine initialAnswer with options, revisit the hint condition; today Pi only emits it for optionless questions.

Council review

Reviewer Round 1 Round 2
GPT 6.1 Sol 9/10 9/10
Claude Opus 5.5 8/10 9/10
Grok 4.7 (Grok) 9/10 9/10

No blocker or should finding remains. Round 2 includes the mobile hint correction. The final commit only adds model credits.

Created with GPT 6.1 Sol (implementation and review) through Codex, Claude Opus 5.5 (review) through Claude, and Grok 4.7 (Grok) (review and evidence) through Grok, in T3 Code.

Closes #23494

StiensWout and others added 3 commits November 9, 2026 19:39
Co-authored-by: GPT 6.1 Sol <codex@openai.com>
Co-authored-by: GPT 6.1 Sol <codex@openai.com>
Co-authored-by: GPT 6.1 Sol <codex@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Grok 4.7 (Grok) <noreply@x.ai>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 9, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 03a1b9a

Macroscope's review found this PR approvable — Pi input dialogs now render as free-text questions with clearer web and mobile hints, preserving intentionally empty and exact-text answers. The change reuses existing answer handling and introduces no material operational or data exposure.

You can add or adjust custom eligibility rules. Learn more.

Copy link
Copy Markdown
Member

Thanks, @StiensWout! Closing this as a duplicate of your earlier #23662, which also fixes the input mapping and literal answers, preserves the placeholder hint and line breaks, and has broader verification. Please continue the fix there.

Copy link
Copy Markdown
Member

Reopening: this recent, focused fix is the live keeper for Pi input dialogs; the earlier #23662 has an older head and its files have changed on main. Thanks, @StiensWout!

@maria-rcks

maria-rcks commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

verified the unchanged head 03a1b9ad9807bc41faf93e87ff0a13fc0e44320a against github/main at 8df455c09bf153433f65e45eb548a478c39655f8 on linux. ran one dev server at a time, with isolated scenario state, playwright from the repo dependencies, and /usr/bin/google-chrome. created the project and threads through the web app, pointing at a real git repository. real codex gpt-6.1-sol turns read its readme and returned its title on both revisions.

used pi 1.5.2 with a real project extension calling ctx.ui.input, ctx.ui.select, and ctx.ui.editor. these slash commands run through the actual pi subprocess and server/client request path; they do not need a model completion.

  • main reproduced the bug: the placeholder became the question, a fake "Submit empty value" option appeared, and " SQLite " reached the extension as "SQLite".
  • the pr showed the original question under "Question", no preset option, and "Type your answer". the extension received " SQLite ", "", and " SQLite\n " exactly, all with cancelled: false.
  • neighboring select returned "SQLite"; editor prefill submitted as "database=SQLite\nmode=local" unchanged.
  • stop cleared the pending question and marked the turn interrupted. a subsequent input command completed successfully. the input also rendered and submitted in a 390×844 dark web viewport.

runtime callback transcript:

{"kind":"input","value":"  SQLite  ","cancelled":false}
{"kind":"input","value":"","cancelled":false}
{"kind":"select","value":"SQLite","cancelled":false}
{"kind":"editor","value":"database=SQLite\nmode=local","cancelled":false}
{"kind":"input","value":"  SQLite\n ","cancelled":false}

144 existing tests passed on blacksmith across the pi adapter, shared pending input, web pending input, and question attachments. current build/typecheck, lint, and test checks passed. the red coderabbit entry is a cancelled run from the earlier closed state; no review bot was invoked. no source changes or pushes were needed.

main: placeholder used as question and fake empty option

pr: original question, no options, and literal answer composer

empty input submission, select choice, and editor prefill roundtrips

pr input in the narrow dark web client

command and callback transcript

Not verified

native ios/android input and keyboard behavior, the electron shell, and macos/windows were not exercised on this linux vm. stop was verified at the client, but no extension cancellation callback was observed, so a live cancelled: true roundtrip is not claimed. placeholder-specific hints remain deferred by this pr. no relay/tunnel or multi-device pass was run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Pi extension input dialogs render as a single "Submit empty value" option, with the placeholder as the question

3 participants