Add mobile question tool with one-at-a-time navigation#2046
Add mobile question tool with one-at-a-time navigation#2046Crypto-Virus wants to merge 1 commit intopingdotgg:t3code/mobile-remote-connectfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new mobile feature for one-at-a-time question navigation with substantial new UI components, navigation logic, and shared state management. The scope of new functionality plus an open review comment about divergent behavior between web and mobile implementations warrants human review. You can customize Macroscope's approvability policy. Learn more. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
55b37dd to
ca4c731
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ca4c731. Configure here.
| clearTimeout(autoAdvanceTimerRef.current); | ||
| } | ||
| }; | ||
| }, []); |
There was a problem hiding this comment.
Auto-advance timer not cleared on question navigation
Medium Severity
The auto-advance timer (200ms) for single-select questions is only cleared on unmount or when a new option is selected, but not when the user navigates away via the Back button. If a user selects a single-select option and taps Back within 200ms, the timer fires and calls onAdvanceRef.current(), which by then holds the updated callback that advances from the previous question — bouncing the user forward again unexpectedly. The cleanup effect on line 50 needs to also depend on progress?.questionIndex so the timer is cancelled on navigation.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ca4c731. Configure here.


Summary
Mobile AskUserQuestion flow at web parity. Replaces the placeholder
PendingUserInputCardwith a fullPendingUserInputPanelsupporting:One-at-a-time navigation — Questions presented individually with a step counter, back/next controls, and auto-advance on single-select (200ms delay).
Multi-select and custom answers — Toggle multiple options for multi-select questions, or type a custom text answer. Both paths feed into the same submit flow.
Summary review screen — After the last question, a review screen shows all answers with tap-to-edit before submitting.
Shared logic in client-runtime — Answer resolution, draft management, progress derivation, and submit-time answer building extracted to
@t3tools/client-runtime/pendingUserInputwith 47 tests. Mobile and web share the same functions.Note
Medium Risk
Updates the mobile user-input response flow and answer payload shape (now supports multi-select arrays) and adds new navigation state, which could affect submission behavior and UI progression if edge cases are missed.
Overview
Replaces the mobile
PendingUserInputCardwith a newPendingUserInputPanelthat presents pending questions one-at-a-time, supports back/next navigation (with 200ms auto-advance on single-select), and adds a final review screen with tap-to-edit before submission.Moves pending user-input draft/answer logic into a new
@t3tools/client-runtimependingUserInputmodule (option toggling, custom-answer handling, progress derivation, and answer building) and wires mobile state to track per-request question index and exposeuserInputProgressinstead of a flatanswersmap; submission now builds answers from drafts and surfaces submit failures via a native alert. Also hidesuser-input.requested/user-input.resolvedactivities from the mobile work log.Reviewed by Cursor Bugbot for commit ca4c731. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add one-at-a-time question navigation to the mobile pending user input panel
PendingUserInputCardwith a newPendingUserInputPanelthat walks users through questions one at a time, with Back/Next controls and a final review screen before submission.pendingUserInputmodule inclient-runtime, exposed via its public index.use-thread-composer-state.tsand surfacesuserInputProgressto consumers instead of a flat answers map.user-input.requestedanduser-input.resolvedactivities are no longer shown in the thread work log.Macroscope summarized ca4c731.