fix(web,mobile): keep line breaks in pending question text#33353
Pending question bodies collapse literal single newlines, including multiline titles from Pi extension select dialogs. Enable the existing newline-preservation options at the web and mobile question renderers. The cards and collapsed summaries keep their current layout. The duplicate-title mapping was already fixed by https://git.cafe/pingdotgg/t3code/pulls/22463.
Small change: two added props, no new state, contracts, or question flow. Implements selected Paper A.
Validation: pnpm exec vp run check:changed passed, including affected typechecks, existing browser tests and React compiler checks. Local cubic review --base pingdotgg/main --json found no issues; GitCafe origin means repository context was unavailable. Visual proof replaces new UI tests for this presentation-only fix.
A credential-free Pi extension called ctx.ui.select through the real adapter in an isolated client. First line\nSecond line collapsed before and renders on two lines after. Headings and lists still render, paragraph soft breaks now render, and collapsed summaries stay on one line. Both web and Android answers round-tripped as Keep newlines, then Yes. Android before proof temporarily omitted only the new prop, then restored the committed source. iOS and the Electron shell were not separately exercised; desktop uses the verified web component.
| Proof | Before | After |
|---|---|---|
| Web literal newline | Capture | Capture |
| Web markdown preview | Capture | Capture |
| Android literal newline | Capture | Capture |
Additional captures: Android markdown, collapsed literal, collapsed markdown.
Independent live-provider verification
Maria’s independent verification reproduced the bug on main and verified unchanged head c199f71 with real Codex GPT 6.1 Sol turns through the web client, without mocks or replay fixtures. It covered newline/Markdown rendering, collapse/expand, exact answer submission, dark mode and 390px web width, and reported changed-file checks passing. This supplements the Pi/web/Android evidence above; it is not native iOS or Electron proof.
Before · After · Interaction recording
Conflict resolution verification
Merged upstream 43915a4064 into the existing PR branch at a208b4f583, without rebasing. Main still lacks both newline props. The sole conflict combines web lineBreaks with upstream pt-0.5 question spacing and py-1.5 header alignment; mobile is unchanged from the prior head. Collapsed summaries, Markdown parsing and literal answer paths retain their behavior.
On the merged head, pnpm exec vp run check:changed pingdotgg/main passed format, lint, knip, affected typechecks, six existing browser tests and React compiler checks. Local cubic found no issues (repository context unavailable on GitCafe origin). Historical captures above and Maria’s independent live-provider proof remain prior-head evidence, rather than new merged-head device/live-provider verification. Native iOS and Electron remain unexercised.
Merged-head direct proof: an isolated Chromium browser render at 320px used the real ComposerPendingUserInputPanel and ChatMarkdown, with no Markdown mock. It verified a literal soft break, Markdown heading/list, computed 6px header padding and 2px question top padding, collapse/reopen, and keep-header-value from a differently labelled option. Expanded capture · Collapsed capture. This proves component rendering and the option callback, not a new live-provider submission or native-device run; there was no new red/green comparison. Historical Android/Pi and Maria proof are retained with those limits.
Council review
Rounds: 2. No blocker, should, or nit findings. Round 2 reviewed merge a208b4f583 onto upstream 43915a4064 for the #34095 conflict. The PR remains two existing-renderer props; upstream header alignment is retained. Trim and proof audit skipped under the small-change rule.
| Delegate | Round 1 | Round 2 |
|---|---|---|
| Claude Opus 5.5 | 9/10 | 9/10 |
| GPT 6.1 Sol | 9/10 | 9/10 |
| Grok 4.7 (Grok) | 9/10 | 9/10 |
Created with Claude Opus 5.5 (design/build), GPT 6.1 Sol (lead/review), and Grok 4.7 (Grok) (review/evidence) in T3 Code through the Claude, Codex, and Grok harnesses.
Closes https://git.cafe/pingdotgg/t3code/issues/17895
Fixes pingdotgg/t3code#17895
Checks
Added 2 commits
Approvability
Verdict: Approved at c199f71
Macroscope's review found this PR approvable — Pending questions now preserve line breaks on web and mobile using existing Markdown rendering options. The change is presentation-only and leaves shared defaults and response handling unchanged.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
-
The mobile and web pending-question panels now preserve line breaks when rendering the active question text.
Changes: Pending question rendering
Layer / File(s) Summary Preserve question line breaks
apps/mobile/src/features/threads/PendingUserInputCard.tsx,apps/web/src/components/chat/ComposerPendingUserInputPanel.tsxThe mobile renderer enables preserveSoftBreaksonSelectableMarkdownText. The web renderer enableslineBreaksonChatMarkdownfor the question.Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related issues
- pingdotgg/t3code#23494 — The change preserves line breaks in the Pi pending-question panel. It does not address the separate input mapping, placeholder, or option behavior described in that issue.
Possibly related PRs
- pingdotgg/t3code#23662 — This PR enables the same line-break options in the mobile and web question renderers.
Suggested labels:
bugfix,📱 Native ChangeSuggested reviewers:
juliusmarminge,t3dotgg
Merge Risk: External image Minimal · up to a208b
-
Pending questions should retain line breaks on web and mobile. No merge-blocking issue was identified.
Pre-merge checks: Passed 4
-
Check name Status Explanation Title check Passed The title clearly summarizes the main change: preserving line breaks in pending question text on web and mobile. Linked Issues check Passed Issue #17895requires the pending question title to appear once and preserve its line breaks. The web renderer now passeslineBreakstoChatMarkdowninComposerPendingUserInputPanel.tsx. The mob…Out of Scope Changes check Passed The reported whole-PR changes add the two newline-preservation props to the web and mobile question renderers. The retained upstream header-spacing changes are not introduced by this PR’s merge-base d… Description check Passed The description explains the newline-rendering problem, the two-renderer change, its narrow scope, and the verification performed. It links the issue and provides detailed test results and evidence. I… Full details: Linked Issues check
-
Explanation
Issue
#17895requires the pending question title to appear once and preserve its line breaks. The web renderer now passeslineBreakstoChatMarkdowninComposerPendingUserInputPanel.tsx. The mobile renderer now passespreserveSoftBreakstoSelectableMarkdownTextinPendingUserInputCard.tsx. The PR description and linked review summary report that the title-mapping fix is already present at the reviewed head; this PR supplies the remaining newline rendering change. The separate answer-box dismissal issue is outside#17895’s coding requirements.
Full details: Out of Scope Changes check
-
Explanation
The reported whole-PR changes add the two newline-preservation props to the web and mobile question renderers. The retained upstream header-spacing changes are not introduced by this PR’s merge-base diff. No unrelated change is established by the available diff summary or inspected files.
Full details: Description check
-
Explanation
The description explains the newline-rendering problem, the two-renderer change, its narrow scope, and the verification performed. It links the issue and provides detailed test results and evidence. It does not use the template headings, but the required information is mostly present.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 43915a4
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3499a53b-35cd-45f0-ae55-4a10540a6da3
External image Commits
-
Reviewing files that changed from the base of the PR and between c199f71aaae40c245aeeddd3cddef13273f504ab and a208b4f583a36bc880b13b991a4df2cd28733bc1.
External image Files selected for processing: 1
-
apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 43915a4
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3499a53b-35cd-45f0-ae55-4a10540a6da3
External image Commits
-
Reviewing files that changed from the base of the PR and between c199f71aaae40c245aeeddd3cddef13273f504ab and a208b4f583a36bc880b13b991a4df2cd28733bc1.
External image Files selected for processing: 1
-
apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
Note
🤖 GPT 6.1 Sol responding on behalf of StiensWout
The linked-issue prerequisite is present: #22463’s merge commit 253acde is an ancestor of c199f71, and the reviewed head’s piQuestion maps title-only selects to header Question with the title once in the body. This PR supplies the remaining newline presentation; real Pi web/Android captures and answer roundtrips cover it.
Declining the template-only suggestion: the description already states the problem, two-line change, scope and verification, with the issue and evidence linked. No extra product or code change is needed for the two inconclusive advisory checks. CodeRabbit reported no actionable comments.
Note
Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
Verified unchanged head c199f71aaae40c245aeeddd3cddef13273f504ab on this Linux Boat VM. Used the repository's Playwright with /usr/bin/google-chrome, actual dev servers, and real Codex gpt-6.1-sol turns through the local proxy. Created the project and threads through the web UI against a real git checkout. No mocks, fixtures, replay provider, or source changes.
First reproduced on github/main (e89abadaee) in a separate worktree. Stopped that server before starting this exact PR head. Both checkouts ran vp i. The VM's Codex CLI needed its default_mode_request_user_input feature enabled to issue questions in default mode.
The same question body, First line\nSecond line\n\n**Markdown stays bold**\n- alpha\n- beta., collapsed its first single newline on main and renders on two lines on this head. Bold text and both list items still render. Collapse keeps the summary on one line; expansion restores the question. Selecting Keep newlines reached Codex and produced the exact final response Keep newlines. Also inspected the question at 390px width and in dark mode.
Runtime observations from the rendered question paragraph:
| 1 | main: <p>First line\nSecond line</p> height=22.75px |
| 2 | head: <p>First line<br>\nSecond line</p> height=45.5px |
| 3 | collapsed summary height=30px |
| 4 | provider response: Keep newlines |
vp run check:changed 4f0b74e190261c8233ae52af17b0fd1734e99e50 passed through blacksmith-check: format, lint, both knip passes, affected typechecks, 6 existing browser tests, and 7 compiler checks. Installed the worker's missing Chromium prerequisite before the successful run. CI reports 30 successful checks.
Before, on main:
main collapses the single newline in the real codex question
After, on the exact PR head:
pr preserves the single newline with matching question text and options
Collapse, expand, answer submission, and the real provider's final response:
real codex question interaction and answer roundtrip
Inspected both screenshots and watched the uploaded 14.52-second recording through playback and seeking.
Not verified
Native Android/iOS and the Electron shell were not exercised on this Linux VM. The 390px check is the web client, not a native mobile check. Pi extension dialogs, other providers, remote/relay, and tunnel connections were not exercised; the provider integration verified here is Codex. The existing Pi title mapping was inspected in source, not verified through a live Pi turn.
Added 1 commit
- Merge pingdotgg/main into t3/preserve-pi-question-newlinesa208b4f