You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(pi): submit custom answers that match the hidden option - #42670
Pi asked users to re-enter a custom answer when it exactly matched the extension’s hidden free-text option. The Pi adapter now checks only the displayed choices and passes matching custom text to the extension’s follow-up input automatically.
Start a new chat with Pi, with Pi's English ask-user-question extension enabled.
Ask Pi to ask you one single-choice question that has exactly two choices.
When that question is on screen, leave both choices unselected and type 3. Type something. as your own answer.
Submit the answer.
A second prompt appears and asks you to type the answer again. Expected: Pi accepts 3. Type something. as the answer and the chat continues.
The cause is at packages/provider-pi/src/server/adapter.ts:3803. Ran cd packages/provider-pi && pnpm exec vp test run src/server/adapter.test.ts with the repro test added: it failed in 2 of 2 runs on a clean checkout, with expected 'ui-custom-parallel' to equal 'next-ui-custom-parallel' in the output.
Evidence
Environment: Linux x64, the repository's own tests.
failed with "expected 'ui-custom-parallel' to equal 'next-ui-custom-parallel'"
passed
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
9f56796947 adds the failing test, alone, before the fix.
pnpm exec vp run check:changed ca81b7b97a1c4b91e5ac25768d0f6629f37732fd passed on head.
Not in this change
Empty or missing answers and expired or duplicate submissions follow the existing response rules.
RPC send failures, missing or delayed follow-ups, and response ordering for identical question titles are handled separately from classifying an answer.
Extension configuration, unrecognized prompt formats, and other providers are outside this adapter path.
Web, desktop, and mobile share the Pi adapter, so the regression is covered there.
Who did the work
Repro written by GPT 6.2 Sol, in Codex
Outside view by Grok 4.7, in Grok
Duplicate check judged by Claude Opus 5.5, in Claude Code
Written by GPT 6.2 Sol, in Codex
Trimmed by Claude Opus 5.5, in Claude Code
Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex, and by Gemini 4 Neon, in Antigravity
Reproduction, checks and proof run by a program on base and head, not by an agent
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon
Reviewing files that changed from the base of the PR and between f287a9d and f4b0531.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The Pi adapter now stores custom-answer options separately from the trailing sentinel and uses those options to detect custom answers. Tests cover parallel custom-answer selections and independently identified follow-up inputs.
Changes: Pi custom-answer routing
Layer / File(s)
Summary
Separate options from the sentinel packages/provider-pi/src/server/adapter.ts
The route stores option lines separately from the trailing sentinel. Custom-answer detection and the follow-up title prefix use the option lines.
Test parallel custom-answer inputs packages/provider-pi/src/server/adapter.test.ts
The tests select the explicit “Type something.” option and check that each follow-up input has its own question ID in the next waiting request.
This fixes the Pi adapter re-prompting when a user's custom text matches the hidden "Type something." option. No concrete regression was found, so the change looks safe to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(pi): submit custom answers that match the hidden option" names the main change. The adapter now passes custom text that matches the hidden free-text option to the follow-up input, inste…
Description check
The description follows the template. It has a Problem section that gives the expected behavior and reproduction steps, and a Change section that explains the fix. The Scope section links related issu…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(pi): submit custom answers that match the hidden option" names the main change. The adapter now passes custom text that matches the hidden free-text option to the follow-up input, instead of asking the user to re-enter it. The title is specific, uses a conventional commit prefix, and matches the objectives and the summarized changes in adapter.ts and adapter.test.ts.
Full details: Description check
Explanation
The description follows the template. It has a Problem section that gives the expected behavior and reproduction steps, and a Change section that explains the fix. The Scope section links related issues but does not clearly state that the work is a bug fix for a linked issue. The Verification section gives focused test results with before and after commits, and it names the test command and outcomes. It also lists exclusions and author attribution. The description is mostly complete. The Scope section could state more clearly which issue shows the bug, since the Related links only list issue numbers without describing them.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between ca81b7b and f287a9d.
Files selected for processing: 2
packages/provider-pi/src/server/adapter.test.ts
packages/provider-pi/src/server/adapter.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Asked Pi / Claude Haiku 4.5 the exact Red/Blue question from the reproduction, left both choices unselected, typed 3. Type something., and submitted. Both sides used fresh databases, extension 2.15.0, Chromium at 1280×800, and dark theme.
Base control: Green returned directly. Caveat: the first head run also avoided the extension re-prompt and delivered the correct tool result, but Haiku asked a prose clarification. The unchanged reproduction succeeded in a second fresh thread.
Not shown:
Consistent model obedience is not established: the first head run asked a prose clarification despite receiving the correct custom answer; the second identical run returned it exactly.
Desktop and mobile were not exercised; evidence covers the real Pi adapter through the web client.
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
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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.
Pi asked users to re-enter a custom answer when it exactly matched the extension’s hidden free-text option. The Pi adapter now checks only the displayed choices and passes matching custom text to the extension’s follow-up input automatically.
Related: #37119, #29467, #40446, #30996
Reproduction on main
Commit ca81b7b97a (main), in the running web app:
A second prompt appears and asks you to type the answer again. Expected: Pi accepts 3. Type something. as the answer and the chat continues.
The cause is at
packages/provider-pi/src/server/adapter.ts:3803. Rancd packages/provider-pi && pnpm exec vp test run src/server/adapter.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withexpected 'ui-custom-parallel' to equal 'next-ui-custom-parallel'in the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit 9f56796947 and passes on the head f287a9de38, both on main ca81b7b97a.
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
pnpm exec vp run check:changed ca81b7b97a1c4b91e5ac25768d0f6629f37732fdpassed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon