Skip to content

fix(soup): keep chat input mounted when preview opens#2856

Merged
gbirman merged 2 commits into
mainfrom
macro-czo711Vn4mnMn1pEwVQ3W-unable-to-enter-text-in-soup-chat-input
Apr 24, 2026
Merged

fix(soup): keep chat input mounted when preview opens#2856
gbirman merged 2 commits into
mainfrom
macro-czo711Vn4mnMn1pEwVQ3W-unable-to-enter-text-in-soup-chat-input

Conversation

@gbirman
Copy link
Copy Markdown
Contributor

@gbirman gbirman commented Apr 24, 2026

Summary

  • Opening preview mode and closing it left the soup chat input unable to accept typing.
  • Root cause: SoupChatInputInner wrapped the input in <Show when={!soup.previewEntity()}>. Unmounting <MarkdownShell> ran cleanupLexical, tearing down all Lexical plugins. On remount, EditorConfigBuilder.buildHandle() returned its cached _handle — whose plugins had been destroyed — so the editor DOM rendered but keystrokes went nowhere.
  • Fix: replace <Show> with classList={{ hidden: !!soup.previewEntity() }}. The editor stays mounted across preview open/close, preserving its plugin lifecycle.

Unmounting MarkdownShell runs cleanupLexical, which tears down all
plugins. On remount, buildHandle returns the cached (now dead) handle,
so the editor renders but ignores keystrokes. Hide with CSS instead.
@macro-application
Copy link
Copy Markdown

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@gbirman has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 32 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 32 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 05f12bfc-d139-4ac0-95b4-5ad85f59e4ef

📥 Commits

Reviewing files that changed from the base of the PR and between bf31c0f and 4ace7bf.

📒 Files selected for processing (1)
  • js/app/packages/app/component/SoupChatInput.tsx

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
Copy link
Copy Markdown

@gbirman gbirman merged commit 64fb23b into main Apr 24, 2026
23 checks passed
@gbirman gbirman deleted the macro-czo711Vn4mnMn1pEwVQ3W-unable-to-enter-text-in-soup-chat-input branch April 24, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant