Declare cascade layer order; the banner reason survives truncation - #345
Merged
Merged
Conversation
…cation ai-chat 0.5 and ui 0.16 nest their rules in the pw-ui and pw-ai-chat layers, except that the compiled ui stylesheet also emits a top-level `base` layer giving every input and textarea a border, padding, and background. Declared after the package layers, it outranked their utilities: the chat composer grew a second border inside its frame and the conversation search lost the left padding that clears its icon. A stylesheet imported first now names `base` before the package layers, making it the lowest. The Studio's own inputs carry their own classes and are unaffected. Measured after the change: composer textarea border 0 and transparent, search input padding 32px. The availability banner quoted raw JSON because the probe cut the provider's error to 200 characters before the reason was extracted, splitting the nested message. The probe now keeps 2,000 characters and the extractor also accepts a message cut off mid-string.
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.
Composer and conversation search (regression from ai-chat 0.5 / ui 0.16). Both packages nest their rules in
pw-ui/pw-ai-chat, but the compiled ui stylesheet also emits a top-level@layer base { input, textarea { border; padding; background } }. Declared after the package layers, it outranked their utilities (border-0,pl-8,bg-transparent), so the composer textarea drew a second bordered box and the search input lost the padding that clears its icon.web/src/layers.css, imported first, declares@layer base, pw-ui, pw-ai-chat;sobaseis lowest. The Studio's own inputs all carry.fieldor a scoped rule and are unaffected. Measured in headless Chrome after the change: textarea border 0 and transparent; search padding-left 32px. (The leak contradicts the ui README's statement that all rules are layered; worth an upstream fix.)Banner showed raw JSON. The probe truncated the provider error to 200 characters before extracting the reason, cutting the nested message in half. It now keeps 2,000, and
providerReasonalso accepts a message cut off mid-string (tested with the exact truncated body the banner displayed).