Skip to content

Add mobile question tool with one-at-a-time navigation#2046

Open
Crypto-Virus wants to merge 1 commit intopingdotgg:t3code/mobile-remote-connectfrom
Crypto-Virus:t3code/mobile-question-tool
Open

Add mobile question tool with one-at-a-time navigation#2046
Crypto-Virus wants to merge 1 commit intopingdotgg:t3code/mobile-remote-connectfrom
Crypto-Virus:t3code/mobile-question-tool

Conversation

@Crypto-Virus
Copy link
Copy Markdown

@Crypto-Virus Crypto-Virus commented Apr 15, 2026

Summary

Mobile AskUserQuestion flow at web parity. Replaces the placeholder PendingUserInputCard with a full PendingUserInputPanel supporting:

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/pendingUserInput with 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 PendingUserInputCard with a new PendingUserInputPanel that 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-runtime pendingUserInput module (option toggling, custom-answer handling, progress derivation, and answer building) and wires mobile state to track per-request question index and expose userInputProgress instead of a flat answers map; submission now builds answers from drafts and surfaces submit failures via a native alert. Also hides user-input.requested/user-input.resolved activities 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

  • Replaces PendingUserInputCard with a new PendingUserInputPanel that walks users through questions one at a time, with Back/Next controls and a final review screen before submission.
  • Adds multi-select support: single-select questions auto-advance after 200ms; multi-select questions require explicit navigation.
  • Moves pending user input logic (option toggling, answer resolution, progress derivation) into a new pendingUserInput module in client-runtime, exposed via its public index.
  • Tracks per-request question index in a new atom in use-thread-composer-state.ts and surfaces userInputProgress to consumers instead of a flat answers map.
  • Behavioral Change: user-input.requested and user-input.resolved activities are no longer shown in the thread work log.

Macroscope summarized ca4c731.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 10c318f5-b3a3-402e-906c-be4143a1ba96

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 15, 2026
Comment thread packages/client-runtime/src/pendingUserInput.ts
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 15, 2026

Approvability

Verdict: 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>
@Crypto-Virus Crypto-Virus force-pushed the t3code/mobile-question-tool branch from 55b37dd to ca4c731 Compare April 16, 2026 08:44
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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);
}
};
}, []);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ca4c731. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant