Skip to content

Fix Agents composer CSS specificity - #328016

Open
Henning Dieterichs (hediet) wants to merge 1 commit into
mainfrom
hediet/sessions-composer-css-order
Open

Fix Agents composer CSS specificity#328016
Henning Dieterichs (hediet) wants to merge 1 commit into
mainfrom
hediet/sessions-composer-css-order

Conversation

@hediet

Copy link
Copy Markdown
Member

Summary

Make Agents composer styling independent of stylesheet order by giving contextual owners enough specificity to beat generic workbench and chat rules.

The native new-session composer now consistently uses its explicit in-session toolbar overrides. This intentionally collapses the generic empty 28px bottom toolbar; the same appearance previously occurred only when stylesheets were reversed. The other composer fixtures preserve their normal-order appearance.

Cascade conflicts

Intended rule Competing rule Affected declarations
.new-chat-in-session .new-chat-widget-container .new-chat-bottom-container .new-chat-widget-container .new-chat-bottom-container max-width, padding, min-height, gap
.new-chat-in-session .new-chat-widget-container .new-chat-bottom-container .action-label .new-chat-widget-container .new-chat-bottom-container .action-label height, padding, font-size
.session-background-activities .session-background-activities-button .codicon[class*='codicon-'] .monaco-workbench .codicon[class*='codicon-'] font-size
.interactive-session .interactive-input-part .chat-input-container … .monaco-editor .monaco-workbench .part.auxiliarybar > .content .monaco-editor background-color
.agent-sessions-workbench .interactive-session .interactive-input-part .chat-input-container … .monaco-editor the generic chat-input background rule above background-color

Inline comments record each non-obvious specificity relationship next to the affected rule.

Validation

  • Rendered 56 composer fixtures in product and fully reversed stylesheet order: 0 exact image mismatches, 0 errors (32 mismatches before the fix).
  • Verified all 48 non-new-session product-order fixtures retain their previous hashes; the 8 native new-session fixtures consistently select their intended contextual overrides.
  • Focused stylelint passed for all four changed stylesheets.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Makes Agents composer styling deterministic regardless of stylesheet order.

Changes:

  • Strengthens contextual composer and toolbar selectors.
  • Ensures embedded chat editors receive the correct background.
  • Documents non-obvious cascade relationships.
Show a summary per file
File Description
chat.css Strengthens embedded chat input background rules.
sessionBackgroundActivitiesControl.css Preserves compact activity icon sizing.
newChatInSession.css Prioritizes in-session composer overrides.
chatView.css Preserves Agents-specific editor backgrounds.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment on lines +1835 to +1836
.interactive-session .interactive-input-part .chat-input-container .chat-editor-container .interactive-input-editor .monaco-editor,
.interactive-session .interactive-input-part .chat-input-container .chat-editor-container .interactive-input-editor .monaco-editor .monaco-editor-background {
@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 70a440a9 Current: f502fd6a

Changed (8)

sessions/chat/newInput/newChatInput/Default/Dark
Before After
before after
sessions/chat/newInput/newChatInput/Default/Light
Before After
before after
sessions/chat/newInput/newChatInput/Selection/Dark
Before After
before after
sessions/chat/newInput/newChatInput/Selection/Light
Before After
before after
sessions/chat/newInput/newChatInput/SlashCommand/Dark
Before After
before after
sessions/chat/newInput/newChatInput/SlashCommand/Light
Before After
before after
sessions/chat/newInput/newChatInput/VariableReference/Dark
Before After
before after
sessions/chat/newInput/newChatInput/VariableReference/Light
Before After
before after

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

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.

5 participants