Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style(chat-input): unify control bar chip sizing on the compact recipe (#18404)

Arvin Xu5b13bf7489f1
diff --git a/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx b/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx
index 36d51f6eb40..cf73323a2e0 100644
--- a/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx
+++ b/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx
@@ -54,9 +54,9 @@ const styles = createStaticStyles(({ css }) => ({
gap: 6px;
align-items: center;
- height: 28px;
- padding-inline: 8px;
- border-radius: 6px;
+ padding-block: 2px;
+ padding-inline: 4px;
+ border-radius: 4px;
font-size: 12px;
color: ${cssVar.colorTextSecondary};
@@ -66,7 +66,7 @@ const styles = createStaticStyles(({ css }) => ({
&:hover {
color: ${cssVar.colorText};
- background: ${cssVar.colorFillSecondary};
+ background: ${cssVar.colorFillTertiary};
}
`,
buttonLabel: css`
diff --git a/src/features/ChatInput/ControlBar/ModeSelector.tsx b/src/features/ChatInput/ControlBar/ModeSelector.tsx
index 8d182ac47bf..4ec2d96a161 100644
--- a/src/features/ChatInput/ControlBar/ModeSelector.tsx
+++ b/src/features/ChatInput/ControlBar/ModeSelector.tsx
@@ -51,9 +51,9 @@ const styles = createStaticStyles(({ css }) => ({
gap: 6px;
align-items: center;
- height: 28px;
- padding-inline: 8px;
- border-radius: 6px;
+ padding-block: 2px;
+ padding-inline: 4px;
+ border-radius: 4px;
font-size: 12px;
color: ${cssVar.colorTextSecondary};
@@ -63,7 +63,7 @@ const styles = createStaticStyles(({ css }) => ({
&:hover {
color: ${cssVar.colorText};
- background: ${cssVar.colorFillSecondary};
+ background: ${cssVar.colorFillTertiary};
}
`,
buttonDisabled: css`
diff --git a/src/features/ChatInput/ControlBar/index.tsx b/src/features/ChatInput/ControlBar/index.tsx
index 7d3c6f7f540..53b2272f55e 100644
--- a/src/features/ChatInput/ControlBar/index.tsx
+++ b/src/features/ChatInput/ControlBar/index.tsx
@@ -15,7 +15,10 @@ import ModeSelector from './ModeSelector';
import WorkspaceControls from './WorkspaceControls';
const styles = createStaticStyles(({ css }) => ({
+ // `flex: none` keeps the row at 28px inside the column-flex composer; without
+ // it the bar shrinks to the compact chips' min-content height.
bar: css`
+ flex: none;
height: 28px;
padding-block: 0;
padding-inline: 4px;
diff --git a/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/HeteroControlBar.tsx b/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/HeteroControlBar.tsx
index c1e695b6077..b0d11a92b3c 100644
--- a/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/HeteroControlBar.tsx
+++ b/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/HeteroControlBar.tsx
@@ -24,8 +24,15 @@ import { agentByIdSelectors } from '@/store/agent/selectors';
import { ClaudeCodeQuotaMenu, CodexQuotaMenu } from './QuotaMenu';
const styles = createStaticStyles(({ css }) => ({
+ // Pinned to the same 28px row as the plain ControlBar so the composer footer
+ // keeps its rhythm regardless of which chips render. `flex: none` matters:
+ // the bar sits in a column flex parent and would otherwise shrink to the
+ // (compact) chips' min-content height.
bar: css`
container: runtimebar / inline-size;
+ flex: none;
+
+ height: 28px;
padding-block: 0;
padding-inline: 4px;
`,
diff --git a/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/QuotaMenu/QuotaMenu.tsx b/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/QuotaMenu/QuotaMenu.tsx
index 849b719c5ca..7c8f8d56eef 100644
--- a/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/QuotaMenu/QuotaMenu.tsx
+++ b/src/routes/(main)/agent/features/Conversation/HeterogeneousChatInput/QuotaMenu/QuotaMenu.tsx
@@ -106,7 +106,7 @@ const styles = createStaticStyles(({ css }) => ({
&:hover {
color: ${cssVar.colorTextSecondary};
- background: ${cssVar.colorFillSecondary};
+ background: ${cssVar.colorFillTertiary};
}
&[data-quota-level='low'] {