Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): show question option previews #15633

Closedmaria-rckswants to merge 4 commits intomain fromrefs/pull/15633/headopened View on GitHub

maria-rckscommented

claude question options can carry a draft or code preview, but the v2 adapter and contract dropped it, so question cards asked users to approve text they couldn't see.

the adapter now keeps each option's optional preview and the v2 contract carries it. web/desktop render the hovered, focused, or selected option's preview (first option before any answer) as markdown with raw html disabled; a custom answer clears it. mobile shows the tapped option's preview as selectable text. answer values and actions are unchanged.

verification on blacksmith: ClaudeAdapterV2.test.ts, ComposerPendingUserInputPanel.test.tsx, pendingUserInput.test.ts, and contracts tests (220 tests), scoped lint (no new warnings), and server/web/mobile/contracts typechecks pass. a live claude turn through the web client is shown below; mobile is unverified.

Closes #14237

Evidence

Same live Claude Sonnet 5.5 prompt on both builds: one AskUserQuestion with two options, each carrying a markdown preview.

before (main): question card shows only option labels and descriptions, the previews claude sent are dropped

after (this PR): question card shows a "Preview · Formal" panel rendering the first option's markdown preview

after (this PR): hovering Formal and Casual swaps the rendered preview between the two options

Written by claude-opus-5-5 via Claude Code in T3 Code

    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Warning

      Review limit reached

      Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

      Next included review available in 9 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used all 10 included reviews currently available.

      Learn how review limits work.

      Review configuration:

      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 611c45b9-015f-4824-baae-8a49ae698adc

      📥 Commits

      Reviewing files that changed from the base of the PR and between 5dcb59ed6c191589e730fb964aabad005466eb6d and 68b4da3470f1065fc54b8d90bb57ae6f0dc4aa9c.


      📒 Files selected for processing (5)
      • apps/mobile/src/features/threads/PendingUserInputCard.tsx
      • apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
      • apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
      • apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
      • packages/contracts/src/orchestrationV2.ts


      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs Human Approval

      Macroscope's review found this PR requires human approval — This focused fix preserves Claude option previews and displays them in the existing web and mobile question cards without changing submitted answers. The web UI also introduces a new default initial preview—the first option before any answer—so the resulting product-default change warrants human review.

      Notes:

      • Diff unchanged. Approvability was decided on eligibility alone.
      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Wassap124(GitHub profile, opens in a new tab)commented

      @maria-rcks not a review but heads up - https://github.com/pingdotgg/t3code/pull/14238 which solves the same issue was closed because it was missing some verification steps, including "before/after captures". And the UI verification guide confirms that -

      UI changes require clear before/after screenshots.

    5. juliusmarminge added labelsmacroscope-review

    6. juliusmarminge assignedjuliusmarminge

    7. Taking over this one as maintainer for batch claude-04. I will rebuild the preview support against current main as a small stack separating protocol support from client rendering, fix stale web previews during custom answers, and run independent reviews and focused verification. Thanks for the provider payload investigation and original before/after captures.

    8. Thanks @maria-rcks for finding the missing Claude option preview field and building the web/mobile proof of concept, including the duplicate-answer-value handling.

      Rebuilt this against the current question navigation and split it into two focused layers:

      • #21932: optional preview contract and Claude adapter preservation.
      • #21933: web/desktop Markdown previews and mobile selectable Markdown, including custom-answer precedence and clearing stale hover/focus.

      I compared the complete original diff with the stack. All intended pieces are covered: the field, adapter mapping, regression coverage, web preview, and mobile preview. The original adapter test is folded into the existing AskUserQuestion scenario; the new interaction coverage lives in the existing navigation suite. Current-main timer/permission behavior is retained, and the legacy web question-progress type is corrected. No intended behavior was dropped.

      The final focused suites pass (299 adapter/contracts tests and 35 client tests), as do contracts/server/web/mobile typechecks and scoped lint/formatting. Three independent full-stack review rounds from Opus 5.5 and GPT-6-Sol found no blockers, including the rebase integration with persistent drafts. Linux web before/after proof and the custom-answer recording are in the client PR body; native mobile Device access is disabled, so iOS/Android and Electron/macOS/Windows remain unverified. The stale-focus review thread is fixed and resolved. Later CodeRabbit findings also corrected ambiguous saved-option restoration on both clients and reused mobile’s Markdown renderer; the existing interaction case covers the restoration regression without more cases. Closing this in favor of the credited replacement stack; the coordinator owns approval and landing. Nothing was merged.

    9. juliusmarminge closed this

Sign in to join this conversation.