fix: SW-2072 chat input grey by default — scope input-group disabled greying to the control#143
Open
boramyi-ts wants to merge 1 commit into
Open
fix: SW-2072 chat input grey by default — scope input-group disabled greying to the control#143boramyi-ts wants to merge 1 commit into
boramyi-ts wants to merge 1 commit into
Conversation
…t is disabled The InputGroup greyed itself (bg-input/50 + opacity-50) whenever it contained ANY disabled descendant via has-disabled. In the AI chat the submit button is disabled while the input is empty, so the whole field went grey even though it was available to type in. Scope the disabled styling to the control itself (has-[[data-slot=input-group-control]:disabled]) so only a disabled input/textarea greys the field — white when available, grey when the control is genuinely unavailable. Also fixes the same issue for any InputGroup with a disabled addon button. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SW-2072 — the AI chat element rendered grey by default; it should be white when available and grey only when unavailable.
Root cause
The
InputGroupgreys itself (has-disabled:bg-input/50+has-disabled:opacity-50) whenever it contains any disabled descendant. In the chat, the submit button isdisabledwhile the input is empty, so:has(:disabled)matched and the whole field went grey — even though the textarea is enabled and the chat is usable.Fix
Scope the disabled styling to the control rather than any descendant — input-group.tsx:15:
Now only a disabled input/textarea greys the field. Also fixes the same latent issue for any InputGroup with a disabled addon button (clear/submit/etc.).
Before / after
Before: disabled submit greys the available chat · After (available): white · After (unavailable, control disabled): still grey, as intended.
📄 Interactive: sw-2072-chat-grey-before-after.html · download raw
Verification
bg-input/50).[data-slot=input-group-control]→bg-input/50(grey) — the unavailable state still works.yarn lint+yarn typecheckpass.🤖 Generated with Claude Code