Skip to content

Commit 0f0463d

Browse files
ryankeairnscursoragentkibanamachine
authored andcommitted
[Agent Builder] Decrease base font sizes in chat UI. (elastic#283254)
## Summary Tighten Agent Builder chat typography and spacing so the conversation UI feels more consistent with the rest of Kibana. ## Changes - Reduce chat message and markdown text from `m` to `s` - Reduce composer/editor font size from `m` to `s` - Shrink conversation header height (`88` → `64`) and more-actions button size (`m` → `s`) - Use smaller control sizes for input popover buttons and round metadata trigger (`xs`) - Tighten round response/input spacing and padding - Align thinking/tool-call step layout, expansion chevrons, and copy (drop trailing periods) - Simplify to-dos header and adjust its padding/type size - fix: Use canvas-specific attachment header radius (`0 4px 0 0`) - fix: Remove sidebar right border; minor connector selector and new-conversation prompt tweaks ##### Screenshots <img width="3172" height="1930" alt="CleanShot 2026-08-06 at 10 58 26@2x" src="https://github.com/user-attachments/assets/62b87ff8-580b-4d12-abba-6bd3326acd45" /> <img width="3172" height="1930" alt="CleanShot 2026-08-06 at 10 57 47@2x" src="https://github.com/user-attachments/assets/b41de9dc-97d4-4a85-91cf-25625588eca4" /> <img width="3172" height="1930" alt="CleanShot 2026-08-06 at 11 00 02@2x" src="https://github.com/user-attachments/assets/943e7575-52af-44fc-b272-3c5aeed7ea73" /> <img width="3172" height="1930" alt="CleanShot 2026-08-06 at 11 16 05@2x" src="https://github.com/user-attachments/assets/051923cb-aa53-42eb-8188-5a5c9e5265df" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/docs/extend/kibana/contributing/workflow/how-we-use-github#release-notes) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
1 parent 5f675fc commit 0f0463d

25 files changed

Lines changed: 144 additions & 104 deletions

File tree

x-pack/platform/packages/shared/agent-builder/agent-builder-browser/conversation_input_shell/conversation_input_shell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const ConversationInputShell = React.forwardRef<
4545
? euiTheme.colors.backgroundBaseDisabled
4646
: euiTheme.colors.backgroundBasePlain};
4747
min-height: ${isCollapsed ? '0' : INPUT_MIN_HEIGHT};
48-
padding: ${euiTheme.size.base} ${euiTheme.size.base} ${euiTheme.size.s} ${euiTheme.size.base};
48+
padding: ${euiTheme.size.base};
4949
display: flex;
5050
flex-direction: column;
5151
gap: ${euiTheme.size.s};

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { css } from '@emotion/react';
99
import type { EuiThemeComputed } from '@elastic/eui';
1010

11-
export const headerHeight = 88;
11+
export const headerHeight = 64;
1212

1313
const maxConversationWidthStyles = css`
1414
max-width: 800px;

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_header/more_actions_button.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
EuiButtonIcon,
1111
EuiPopover,
1212
EuiContextMenuPanel,
13-
EuiSpacer,
1413
EuiToolTip,
1514
} from '@elastic/eui';
1615
import { i18n } from '@kbn/i18n';
@@ -289,7 +288,7 @@ export const MoreActionsButton: React.FC<MoreActionsButtonProps> = ({ onCloseSid
289288
const buttonProps = {
290289
iconType: 'boxesVertical' as const,
291290
color: 'text' as const,
292-
size: 'm' as const,
291+
size: 's' as const,
293292
'aria-label': fullscreenLabels.actionsAriaLabel,
294293
onClick: togglePopover,
295294
'data-test-subj': 'agentBuilderMoreActionsButton',
@@ -306,12 +305,11 @@ export const MoreActionsButton: React.FC<MoreActionsButtonProps> = ({ onCloseSid
306305
button={<EuiButtonIcon {...buttonProps} />}
307306
isOpen={isPopoverOpen}
308307
closePopover={closePopover}
309-
panelPaddingSize="xs"
310-
anchorPosition="downCenter"
308+
panelPaddingSize="none"
309+
anchorPosition="downRight"
311310
aria-label={fullscreenLabels.actionsAriaLabel}
312311
>
313312
<EuiContextMenuPanel items={menuItems} />
314-
<EuiSpacer size="s" />
315313
</EuiPopover>
316314
</>
317315
);

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_input/input_actions/connector_selector/connector_selector.tsx

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import type { EuiSelectableOption } from '@elastic/eui';
99
import {
1010
EuiBadge,
11-
EuiButtonEmpty,
11+
EuiButton,
1212
EuiFlexGroup,
1313
EuiFlexItem,
1414
EuiPopover,
@@ -142,28 +142,36 @@ const manageConnectorsAriaLabel = i18n.translate(
142142
const ConnectorListFooter: React.FC = () => {
143143
const { manageConnectorsUrl } = useNavigation();
144144
const { write: hasWritePrivilege } = useUiPrivileges();
145+
const manageButtonProps = {
146+
size: 's' as const,
147+
iconType: 'gear',
148+
color: 'text' as const,
149+
'aria-label': manageConnectorsAriaLabel,
150+
...getEbtProps({
151+
element: AGENT_BUILDER_UI_EBT.element.pageContent,
152+
action: AGENT_BUILDER_UI_EBT.action.conversation.MANAGE_CONNECTORS,
153+
detail: 'connector',
154+
}),
155+
};
145156
return (
146157
<EuiPopoverFooter paddingSize="s">
147158
<EuiFlexGroup responsive={false} justifyContent="spaceBetween" gutterSize="s">
148159
<EuiFlexItem>
149-
<EuiButtonEmpty
150-
size="s"
151-
iconType="gear"
152-
color="text"
153-
aria-label={manageConnectorsAriaLabel}
154-
href={manageConnectorsUrl}
155-
disabled={!hasWritePrivilege}
156-
{...getEbtProps({
157-
element: AGENT_BUILDER_UI_EBT.element.pageContent,
158-
action: AGENT_BUILDER_UI_EBT.action.conversation.MANAGE_CONNECTORS,
159-
detail: 'connector',
160-
})}
161-
>
162-
<FormattedMessage
163-
id="xpack.agentBuilder.conversationInput.agentSelector.manageAgents"
164-
defaultMessage="Manage"
165-
/>
166-
</EuiButtonEmpty>
160+
{hasWritePrivilege ? (
161+
<EuiButton {...manageButtonProps} href={manageConnectorsUrl}>
162+
<FormattedMessage
163+
id="xpack.agentBuilder.conversationInput.agentSelector.manageAgents"
164+
defaultMessage="Manage"
165+
/>
166+
</EuiButton>
167+
) : (
168+
<EuiButton {...manageButtonProps} disabled>
169+
<FormattedMessage
170+
id="xpack.agentBuilder.conversationInput.agentSelector.manageAgents"
171+
defaultMessage="Manage"
172+
/>
173+
</EuiButton>
174+
)}
167175
</EuiFlexItem>
168176
</EuiFlexGroup>
169177
</EuiPopoverFooter>
@@ -344,7 +352,7 @@ export const ConnectorSelector: React.FC<{}> = () => {
344352
isOpen={isPopoverOpen}
345353
closePopover={closePopover}
346354
panelPaddingSize="none"
347-
anchorPosition="upCenter"
355+
anchorPosition="upLeft"
348356
>
349357
<EuiSelectable
350358
id={connectorSelectId}

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_input/input_actions/input_popover_button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const InputPopoverButton: React.FC<
4747
<EuiButtonEmpty
4848
css={[truncateStyles, open && openStyles]}
4949
color="text"
50+
size="xs"
5051
iconSide="left"
5152
flush="both"
5253
iconType={iconType}

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_input/message_editor/message_editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const MessageEditor: React.FC<MessageEditorProps> = ({
143143
}
144144
`;
145145
const fontStyles = css`
146-
${useEuiFontSize('m')}
146+
${useEuiFontSize('s')}
147147
`;
148148
const commandBadgeStyles = css`
149149
[${COMMAND_BADGE_ATTRIBUTE}] {

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_rounds/round_events/round_events.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export const RoundEvents: React.FC<RoundEventsProps> = ({
3939
const displayItems = groupSteps(steps);
4040

4141
return (
42-
<EuiFlexGroup direction="column" gutterSize="s" data-test-subj="agentBuilderThinkingPanel">
42+
<EuiFlexGroup direction="column" data-test-subj="agentBuilderThinkingPanel">
4343
<EuiFlexItem grow={false}>
44-
<EuiFlexGroup direction="column" gutterSize="s">
44+
<EuiFlexGroup gutterSize="l" direction="column">
4545
{displayItems.map((item) => {
4646
if (item.kind === 'group') {
4747
return (
@@ -67,7 +67,7 @@ export const RoundEvents: React.FC<RoundEventsProps> = ({
6767
);
6868
})}
6969
</EuiFlexGroup>
70-
<EuiSpacer size="xs" />
70+
<EuiSpacer size="s" />
7171
</EuiFlexItem>
7272
</EuiFlexGroup>
7373
);

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_rounds/round_events/step_layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const StepLayout: React.FC<StepLayoutProps> = ({
5555
<div>
5656
<EuiFlexGroup
5757
direction="row"
58-
gutterSize="s"
58+
gutterSize="xs"
5959
alignItems="center"
6060
responsive={false}
6161
css={rowStyles}
@@ -84,7 +84,7 @@ export const StepLayout: React.FC<StepLayoutProps> = ({
8484
{isClickable && isExpandable && (
8585
<EuiFlexItem grow={false}>
8686
<EuiIcon
87-
type={isExpanded ? 'arrowUp' : 'arrowDown'}
87+
type={isExpanded ? 'chevronSingleDown' : 'chevronSingleRight'}
8888
color={euiTheme.colors.textDisabled}
8989
size="s"
9090
aria-hidden={true}

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_rounds/round_events/steps/tool_call_group.test.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const toolStep = (id: string, toolId: string, results: ToolResult[] = []) =>
3232
createToolCallStep({ tool_call_id: id, tool_id: toolId, params: {}, results });
3333

3434
describe('ToolCallGroup', () => {
35-
it('shows "N tools ran." once every step in the group has a result', () => {
35+
it('shows "N tools ran" once every step in the group has a result', () => {
3636
renderWithProviders(
3737
<ToolCallGroup
3838
steps={[
@@ -42,7 +42,7 @@ describe('ToolCallGroup', () => {
4242
]}
4343
/>
4444
);
45-
expect(screen.getByText('3 tools ran.')).toBeInTheDocument();
45+
expect(screen.getByText('3 tools ran')).toBeInTheDocument();
4646
});
4747

4848
it('shows "N tools running…" while at least one step is still in progress', () => {
@@ -64,15 +64,16 @@ describe('ToolCallGroup', () => {
6464
]}
6565
/>
6666
);
67-
await user.click(screen.getByText('2 tools ran.'));
67+
await user.click(screen.getByText('2 tools ran'));
6868
const childStatuses = screen
6969
.getAllByRole('status')
70-
.filter((el) => el.textContent !== '2 tools ran.');
70+
.filter((el) => el.textContent !== '2 tools ran');
7171
expect(childStatuses.map((el) => el.querySelector('.euiBadge')?.textContent)).toEqual([
7272
'tool: search',
7373
'tool: read',
7474
]);
75-
expect(childStatuses.every((el) => el.textContent?.includes('ran.'))).toBe(true);
75+
// textContent concatenates badge + suffix without a space (e.g. "tool: searchran")
76+
expect(childStatuses.every((el) => /ran$/.test(el.textContent ?? ''))).toBe(true);
7677

7778
await user.click(screen.getAllByRole('button')[1]);
7879
expect(screen.getByRole('dialog')).toBeInTheDocument();

x-pack/platform/plugins/shared/agent_builder/public/application/components/conversations/conversation_rounds/round_events/steps/tool_call_group.tsx

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
*/
77

88
import React, { useState } from 'react';
9-
import { EuiFlexGroup, EuiFlexItem, EuiText, useEuiTheme } from '@elastic/eui';
10-
import { css } from '@emotion/react';
9+
import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
1110
import { FormattedMessage } from '@kbn/i18n-react';
1211
import { AGENT_BUILDER_UI_EBT } from '@kbn/agent-builder-common';
1312
import { isErrorResult } from '@kbn/agent-builder-common/tools/tool_result';
@@ -20,7 +19,6 @@ interface ToolCallGroupProps {
2019
}
2120

2221
export const ToolCallGroup: React.FC<ToolCallGroupProps> = ({ steps }) => {
23-
const { euiTheme } = useEuiTheme();
2422
const [isExpanded, setIsExpanded] = useState(false);
2523
const onToggle = () => setIsExpanded((v) => !v);
2624

@@ -33,7 +31,7 @@ export const ToolCallGroup: React.FC<ToolCallGroupProps> = ({ steps }) => {
3331
{allRan ? (
3432
<FormattedMessage
3533
id="xpack.agentBuilder.roundEvents.toolCallGroup.ran"
36-
defaultMessage="{count, plural, one {# tool ran.} other {# tools ran.}}"
34+
defaultMessage="{count, plural, one {# tool ran} other {# tools ran}}"
3735
values={{ count: steps.length }}
3836
/>
3937
) : (
@@ -47,26 +45,20 @@ export const ToolCallGroup: React.FC<ToolCallGroupProps> = ({ steps }) => {
4745
</EuiText>
4846
);
4947

50-
const expansionStyles = css`
51-
padding-left: ${euiTheme.size.s};
52-
`;
53-
5448
return (
5549
<div data-test-subj="agentBuilderToolCallGroup">
5650
<StepLayout
5751
label={label}
5852
onClick={onToggle}
5953
isExpanded={isExpanded}
6054
expansion={
61-
<div css={expansionStyles}>
62-
<EuiFlexGroup direction="column" gutterSize="s">
63-
{steps.map((step) => (
64-
<EuiFlexItem grow={false} key={step.tool_call_id}>
65-
<ToolCallStep step={step} />
66-
</EuiFlexItem>
67-
))}
68-
</EuiFlexGroup>
69-
</div>
55+
<EuiFlexGroup direction="column" gutterSize="s">
56+
{steps.map((step) => (
57+
<EuiFlexItem grow={false} key={step.tool_call_id}>
58+
<ToolCallStep step={step} />
59+
</EuiFlexItem>
60+
))}
61+
</EuiFlexGroup>
7062
}
7163
ebtAction={AGENT_BUILDER_UI_EBT.action.conversation.EXPAND_TOOL_CALL_GROUP}
7264
/>

0 commit comments

Comments
 (0)