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

open3
main
GitHub fork: t3/pi-question-input
opened1d agobyWWout Stiens
View on GitHubTwo-way sync enabledPR last imported 20h ago

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 inputCapture
Before: baseline request mapping, fake option and placeholder as questionBefore
After: title as question, no options, generic answer hintAfter

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

ReviewerRound 1Round 2
GPT 6.1 Sol9/109/10
Claude Opus 5.58/109/10
Grok 4.7 (Grok)9/109/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

Checks

1 failing · 23 successful · 16 skipped
Some checks failed

Failing1

03a1b9a

Added 3 commits

  • chore: credit the models that reviewed this PR03a1b9a
  • fix(clients): use the existing literal-answer composer hint60a90e7
  • fix(pi): render input dialogs as free-text questionsf74462c
Synced from GitHub

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.

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.

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!