Skip to content

fix(ask): show the custom response text in the ask_user_choice transcript - #1695

Open
jals1212 wants to merge 1 commit into
Gentleman-Programming:mainfrom
jals1212:fix/ask-user-choice-custom-response
Open

jals1212 wants to merge 1 commit into
Gentleman-Programming:mainfrom
jals1212:fix/ask-user-choice-custom-response

Conversation

@jals1212

@jals1212 jals1212 commented Oct 3, 2026 •

Copy link
Copy Markdown

Closes #1692

Problem

When ask_user_choice runs with allowCustomResponse: true and the user picks Other… and types a free-text answer, the transcript row renders only ✓ Custom response. The typed text is never shown, so after submitting it the user can no longer read what they answered. The model-facing content already carried the text (User responded: <text>); only renderResult hid it. ask_user_question already renders custom answers with their text.

Change

  • extensions/ask-user-choice.ts: renderResult now renders ✓ Custom response — <text>.
  • tests/ask-user-choice.test.ts: new test asserting the rendered row includes the typed text.
  • LLM-facing content and details are unchanged.

Verification

  • Test-first RED to GREEN: the new test failed against the original renderResult and passes after the change.
  • Focused suite: node --test tests/ask-user-choice.test.ts, 22/22 pass.
  • npm run typecheck: no regressions.
  • Full suite (npm test): provider-contract and runtime-harness PASS; unit-tests 4602/4606. The 4 failures are unrelated to this change:
    • tests/yolo-mode.test.ts ("structured primary prompt gains and loses directive…", "active YOLO waives only ordinary push…") fail on origin/main without this change too.
    • tests/yolo-mode-runtime.test.ts ("SDK loads both extensions on one bus and drives real customize view", both variants) fail only in the full run; the file passes 4/4 in isolation on both origin/main and this branch.
  • Manually confirmed the original bug in the interactive TUI (screenshot in bug(ask): ask_user_choice transcript hides the custom response text the user typed #1692).
  • Commit eebc3c5 on fix/ask-user-choice-custom-response, based on origin/main ac67159.

Out of scope

Summary by CodeRabbit

  • Bug Fixes
    • Custom responses now display their selected text in the transcript alongside the “Custom response” label.

…ript

The result row rendered only "✓ Custom response", so after submitting
a free-text answer the user could no longer read what they typed. The
model-facing content already carried the text; only renderResult hid it.

Closes Gentleman-Programming#1692
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9b72f5f7-1802-4c58-b625-ea04d209ef84
📥 Commits

Reviewing files that changed from the base of the PR and between ac67159 and eebc3c5.

📒 Files selected for processing (2)
  • extensions/ask-user-choice.ts
  • tests/ask-user-choice.test.ts

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


📝 Walkthrough

Walkthrough

ask_user_choice now displays the submitted custom-response text in the transcript. A test verifies the rendered result.

Changes

Custom response transcript

Layer / File(s) Summary
Render and verify custom response text
extensions/ask-user-choice.ts, tests/ask-user-choice.test.ts
The custom response result now includes the response text. A transcript test checks the rendered output after removing terminal sequences and trailing whitespace.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: alan-thegentleman

Merge Risk: ⚪ Minimal · up to eebc3

The submitted answer now appears in the transcript, with a focused test for the expected display. No concrete merge-blocking risk is evident.

Security Architecture Review

Security architecture risk: 🔵 Low · up to eebc3

The change displays an answer that was already included in the tool result. It does not change permissions or tool availability. No exploitable security issue was established, but safe handling of terminal control characters could not be fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The verified change affects custom-answer transcript rendering. Tool execution remains restricted to the TUI or an explicitly enabled interactive RPC host; ordinary headless execution is rejected.

Security Findings and Attack Paths

  • inferred — No exploitable attack path was established. Custom-answer text reaches the display without local escaping in this branch, but acceptance and interpretation of hostile control sequences depend on unavailable input and rendering implementations. An independently attackable source or broader transcript audience was not demonstrated.

Trust Boundaries and Controls

  • observed — Free-text entry remains opt-in through allowCustomResponse. The head preserves the existing interactive-mode gate and returns the same content and details; the new behavior is their display projection, not an authorization decision.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: showing custom-response text in the ask_user_choice transcript.
Linked Issues check ✅ Passed Issue [#1692] requires the ask_user_choice transcript to show the submitted custom-response text. extensions/ask-user-choice.ts now renders ✓ Custom response — ${details.customResponse}. The new…
Out of Scope Changes check ✅ Passed The diff changes only custom-response rendering and adds a test for that behavior. Both changes directly support issue [#1692]. The separate readability layout is not required by the issue and is not …
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ask): ask_user_choice transcript hides the custom response text the user typed

1 participant