Skip to content

fix(web): confirm question choices before submitting - #44836

Open
maria-rcks wants to merge 1 commit into
mainfrom
t3/xfb-feat-question-submit
Open

maria-rcks wants to merge 1 commit into
mainfrom
t3/xfb-feat-question-submit

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

before: clicking a question option sends the answer immediately
after: correct a mistaken choice, then submit explicitly
before: the question is already answered after one click
after: the corrected selection stays editable with submit available

Single-choice agent questions advance or submit 200 ms after a click, leaving little time to correct a mistake. Clicking or pressing a numbered shortcut now only changes the draft. The existing Next and Submit controls confirm it. Mobile already requires Submit answers, so this brings web and desktop into line with it.

Removed the auto-advance timer, its optimistic selection state, and the callback that let the option panel submit. The existing navigation browser test now renders the real panel and proves that clicking, correcting with a number key, and explicitly advancing preserve the draft. On Blacksmith it fails against the original panel (question 2 instead of question 1), and passes on this head. vp run check:changed a505181812d9c50faa529deb597b18568886349d passes, including 115 tests and four React Compiler checks (proof level 2). The boat harness reproduced the original click-to-submit and verified the corrected answer reaches the replay provider only after Submit; dark, light and 390 px views were inspected (proof level 4). Uploaded clips play and seek in Chrome.

X report: https://x.com/KapadiyaVikas/status/2126512804350079146

Council review, one round on a7f720c2a4d94020c2cd11b47480b611a437721d. Both reviewers found no issues. Gemini Neon was unavailable because its individual quota was reached; green-pr's independent Sol fallback was used.

Reviewer Round 1
GPT-6.1 Sol 10/10
GPT-6.1 Sol, independent fallback 10/10
Gemini Neon unavailable: quota

Not verified: native Electron and mobile clients, authenticated production providers, relay/tunnel connections, and T3's inline media player. Mobile's existing explicit-submit path was inspected in source.

Model and harness: gpt-6.1-sol, Codex in T3 Code.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 28, 2026
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Single-choice option selection now updates draft answers without scheduling automatic advancement. The pending-input panel no longer accepts an advance callback, and browser tests cover selection and question navigation.

Changes: Pending input selection

Layer / File(s) Summary
Draft-only option selection
apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx, apps/web/src/components/chat/ComposerPendingUserInputPanel.*.browser.test.tsx
Selecting an option updates the draft without optimistic selection or timed advancement. Browser tests cover selection and navigation behavior.
Remove advance callback wiring
apps/web/src/components/chat/usePendingThreadRequests.ts, apps/web/src/components/ChatView.tsx, apps/web/src/components/chat/ChatComposer.tsx
The hook exposes onAdvanceActivePendingUserInput directly. ChatView and ChatComposer no longer pass an advance callback to the pending-input panel.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • Issue 37354 — The change affects numbered option selection by keeping the user on the current question, but it does not address the issue’s modifier handling or contenteditable early return.

Possibly related PRs

  • pingdotgg/t3code#41047: Both PRs change option selection in the pending-input panel, including selection through numbered shortcuts.
  • pingdotgg/t3code#32324: That PR preserves the single-select auto-advance callback behavior that this PR removes.

Suggested labels: bugfix

Suggested reviewers: only21mil, macroscopeapp

Merge Risk: Minimal · up to a7f72

Clicking or pressing a numbered shortcut on a single-choice question now only updates the draft. The user then confirms with Next or Submit, which matches the existing mobile flow. The confirmation path was traced through the source and the change is easy to revert, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): confirm question choices before submitting" matches the main change. Single-choice question options now only update the draft, and the user confirms the choice with the Next or Su…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is thorough and follows the template closely. It states the problem (single-choice questions auto-advance or submit 200 ms after a click, leaving little time to correct mistakes) and t…
Full details: Title check

Explanation

The title "fix(web): confirm question choices before submitting" matches the main change. Single-choice question options now only update the draft, and the user confirms the choice with the Next or Submit controls. The title is a conventional commit, is specific, and is 52 characters long.

Full details: Description check

Explanation

The description is thorough and follows the template closely. It states the problem (single-choice questions auto-advance or submit 200 ms after a click, leaving little time to correct mistakes) and the change (clicking or pressing a numbered shortcut only updates the draft; Next and Submit confirm it; the auto-advance timer, optimistic selection state, and submit callback are removed). The Scope section links an X report but does not link a GitHub issue that shows the bug, and it does not explain why no issue is needed. The Verification section gives concrete commands, test counts, observed before/after failure behavior, a manual harness run, and screenshots/recordings, and it lists what was not verified. It also names the model and harness. The main gaps are the missing issue link or justification in Scope and the fact that the title is not restated in a conventional-commit form within the body, though the PR objectives show the title is conventional. Because the required information is mostly present, the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b927b1f and a7f720c.

Files selected for processing: 7

  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/chat/ChatComposer.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.browser.test.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.direction.browser.test.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.navigation.browser.test.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
  • apps/web/src/components/chat/usePendingThreadRequests.ts
Files with no reviewable changes: 5

  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/chat/ChatComposer.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.browser.test.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.direction.browser.test.tsx
  • apps/web/src/components/chat/usePendingThreadRequests.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

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 Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant