-
Notifications
You must be signed in to change notification settings - Fork 65
fix: make userMessageDisplay opt-in to prevent CC 2.1.6+ input bug #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: make userMessageDisplay opt-in to prevent CC 2.1.6+ input bug #372
Conversation
2 3 The userMessageDisplay patch causes an "insta-ESC" bug on Claude Code 2.1.6 4 where user input is immediately cancelled. This makes Claude Code unusable 5 when the patch is applied. 6 7 Root cause: The patch modifies the component structure for rendering user 8 messages, which appears to interfere with input handling in CC 2.1.6+. 9 10 Fix: 11 - Add `enabled?: boolean` field to UserMessageDisplayConfig 12 - Default to `enabled: false` in DEFAULT_SETTINGS 13 - Only apply the patch when `enabled === true` (strict check) 14 - Show migration warning for users with custom styling who haven't 15 explicitly enabled the feature 16 17 This allows users to continue using other tweakcc features safely while 18 making userMessageDisplay opt-in for those willing to test it. 19 20 Tested and validated working on Claude Code 2.1.6. 21 22 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR introduces an opt-in mechanism for user message display customization by adding an Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (1)src/patches/index.ts (1)
🔇 Additional comments (3)
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 |
|
Hi @treygoff24! The "inst-esc" issue you described sounds exactly like what happens when tweakcc accidentally breaks some Claude Code internals. It's because there's actually an error occurring when you send a message, but Claude Code doesn't normally display. To see the actual error, will you please
|
1 ## Summary
2
3 The
userMessageDisplaypatch causes an "insta-ESC" bug on Claude Code 2.1.6 where user input is immediately cancelled/escaped. This makes Claude Code completely unusable when the patch is applied.4
5 ### Root Cause
6
7 The patch modifies the component structure for rendering user messages (wrapping in a Box component, changing the React element tree). This structural change appears to interfere with input handling in CC 2.1.6+.
8
9 ### The Fix
10
11 Make
userMessageDisplayopt-in instead of always-on:12
13 - Add
enabled?: booleanfield toUserMessageDisplayConfigtype14 - Default to
enabled: falseinDEFAULT_SETTINGS15 - Only apply the patch when
enabled === true(strict equality check)16 - Show a helpful migration warning for users who have custom styling configured but haven't explicitly enabled the feature
17
18 This allows users to continue using all other tweakcc features (themes, thinking verbs, etc.) safely, while making
userMessageDisplayopt-in for those willing to test it on their CC version.19
20 ### Why
enabled === true(not!== false)21
22 Existing user configs won't have the
enabledkey, so:23 -
undefined !== false→true❌ would still apply broken patch24 -
undefined === true→false✅ safely skips the patch25
26 ## Test Plan
27
28 - [x] TypeScript compiles without errors
29 - [x] All existing tests pass (132 passed)
30 - [x] Tested on Claude Code 2.1.6 - confirmed working
31 - [x] Other tweakcc features (themes, thinking verbs) still work correctly
32 - [x] Migration warning displays for users with custom styling
33
34 ## Files Changed
35
36 -
src/types.ts- Addedenabled?: booleantoUserMessageDisplayConfig37 -
src/defaultSettings.ts- Setenabled: falseas default38 -
src/patches/index.ts- Check for explicit opt-in + migration warning39
40 ---
41
42 🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.