Repository navigation
Conversation
Pi's select and editor dialogs, and input dialogs without a placeholder, carry only a title. piQuestion used that title as both the header and the question, so the pending question panel showed it twice, and a long title filled the header row too. Show the title once, as the question, under the "Question" header other providers already use. Input dialogs with a placeholder keep the title as the header. Refs pingdotgg#17895 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This narrowly fixes duplicated extension-dialog titles in the Pi provider by separating titles from messages/placeholders while preserving request and response behavior. Focused tests cover title-only dialogs and placeholder-based inputs. You can add or adjust custom eligibility rules. Learn more. |
Contributor
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A Pi extension that asks with
ctx.ui.select(title, options)orctx.ui.editor(title)shows the whole title twice in the pending question panel, once in the header row and again as the question. Aninputdialog without a placeholder does the same. A long or multi-line title, like the onesrpiv-ask-user-questionsends, also fills the header row, runs past the card edge and leaves no room for the collapsed preview.Pi's RPC
selectandeditorrequests carry only atitle(plusoptionsorprefill), with nomessageorplaceholder.piQuestionsetheader: titleand fell back toquestion = title, so both fields got the same text.Change
When a Pi dialog has no
messageorplaceholder,piQuestionnow shows the title once, as the question, under the "Question" header that the Codex, Grok and Antigravity adapters already use when a question has no header of its own. Aninputdialog with a placeholder keeps its title as the header, as before. Answers are keyed by question id, so the responses sent to Pi do not change.This covers the duplicated title in #17895. On current main the expanded question already keeps its line breaks (screenshots below), so this PR does not touch the renderers.
Scope and approval
Fixes the duplicated-title part of #17895, which has no maintainer triage yet. I'm submitting it as a very small, focused fix for an obvious bug. The panel showed the same text twice, and the issue's expected behavior is that the title appears once. The change touches only the line the issue's diagnosis names. It doesn't change any default, setting or answer sent to Pi. Prior PRs: none. No open or closed PR references #17895 or changes
piQuestion.Verification
packages/provider-pi:vp test run src/server/adapter.test.ts -t "input dialog|empty select option|editor prefill". The existing select and editor tests now also assert the header and question, and a new test pins an input dialog with a placeholder. With main'sadapter.ts, the two title-only cases fail because the header is the title, and the placeholder case passes. With this change all three pass.packages/provider-pisuite: 127 of 127 pass.tsc-rs --noEmitexits 0.vp fmt --checkpasses on both files.vp lintexits 0 with main's existing unusedlayerwarning./merge-target, that callsctx.ui.selectwith a five-line title and the optionsmainanddev, plus a placeholder local model entry so T3 lists Pi as available. No model request is made. Pi sends{"method":"select","title":"Merge target\n\nWhich branch should this change merge into?\n\n...","options":["main","dev"]}with nomessageorplaceholder. The T3 server and web dev server ran from source with a fresh state dir, once with main'sadapter.tsand once with this branch, in Chrome 155 at 1920x1081. Each time I picked/merge-targetfrom the composer menu, sent it and captured the panel as it opened, then clicked the header row to collapse it.Main, panel open: the whole title is the header row, running past the card edge over the toggle icon, and it repeats as the question.
This branch, panel open: the header reads "Question" and the title appears once, with its line breaks.
Main, collapsed: the header row still holds the full title, so the preview has no room.
This branch, collapsed: "Question" followed by a truncated preview of the title.
This branch, after clicking
main: the panel closes and the extension's own notice, "Merge target: main", shows that Pi received the answer.Focused tests with main's
adapter.ts, captured before #22557 deleted the bare input test: three failures, each with the title where "Question" was expected.Focused tests on this branch, same earlier run: all four pass.
Not checked:
PendingUserInputCardrenders the sameheaderandquestionfields, so I expect the same result there, but I did not run a simulator or emulator.editorand bareinputdialogs in the app. A unit test coverseditor; bareinputtakes the same no-message, no-placeholderbranch.rpiv-ask-user-questionextension itself. The test extension sends the same request shape, a multi-linetitlewithoptions.Production fix, tests, PR description and images written with Claude Opus 5.5 in T3 Code Nightly.
🤖 Generated with Claude Opus 5.5 in T3 Code Nightly