From b3e8d8e8b4dc1f59e475b8bed595c3c331fea00f Mon Sep 17 00:00:00 2001 From: Bill Leoutsakos Date: Fri, 18 Sep 2026 12:17:33 -0700 Subject: [PATCH 1/2] refactor(emcn): share filled stop icon across chat controls --- .../app/(interfaces)/chat/components/input/input.tsx | 10 ++-------- .../home/components/composer/composer.tsx | 10 ++-------- .../components/send-button/send-button.tsx | 11 +++-------- packages/emcn/src/icons/index.ts | 1 + packages/emcn/src/icons/stop-filled.tsx | 12 ++++++++++++ 5 files changed, 20 insertions(+), 24 deletions(-) create mode 100644 packages/emcn/src/icons/stop-filled.tsx diff --git a/apps/sim/app/(interfaces)/chat/components/input/input.tsx b/apps/sim/app/(interfaces)/chat/components/input/input.tsx index 4cb83962390..0698fbfda16 100644 --- a/apps/sim/app/(interfaces)/chat/components/input/input.tsx +++ b/apps/sim/app/(interfaces)/chat/components/input/input.tsx @@ -3,7 +3,7 @@ import type React from 'react' import { useLayoutEffect, useRef, useState } from 'react' import { Badge, Button, cn, Tooltip } from '@sim/emcn' -import { ArrowUp, Paperclip, X } from '@sim/emcn/icons' +import { ArrowUp, Paperclip, StopFilled, X } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { CHAT_ACCEPT_ATTRIBUTE } from '@/lib/uploads/utils/validation' @@ -258,13 +258,7 @@ export const ChatInput: React.FC<{ className='size-[28px] rounded-full p-0' aria-label='Stop generation' > - - - + ) : ( ) : ( ) } diff --git a/packages/emcn/src/icons/index.ts b/packages/emcn/src/icons/index.ts index c1b843309ca..2afc237ccba 100644 --- a/packages/emcn/src/icons/index.ts +++ b/packages/emcn/src/icons/index.ts @@ -144,6 +144,7 @@ export { Split } from './split' export { Sprout } from './sprout' export { Square } from './square' export { SquareArrowUpRight } from './square-arrow-up-right' +export { StopFilled } from './stop-filled' export { Strikethrough } from './strikethrough' export { Sun } from './sun' export { Table } from './table' diff --git a/packages/emcn/src/icons/stop-filled.tsx b/packages/emcn/src/icons/stop-filled.tsx new file mode 100644 index 00000000000..c946f3122c2 --- /dev/null +++ b/packages/emcn/src/icons/stop-filled.tsx @@ -0,0 +1,12 @@ +import type { SVGProps } from 'react' + +/** + * Filled stop icon. Callers provide the size and fill through SVG props. + */ +export function StopFilled(props: SVGProps) { + return ( + + + + ) +} From 09670d4cd34344ed500a80793328ee9b854d58a5 Mon Sep 17 00:00:00 2001 From: Bill Leoutsakos Date: Fri, 18 Sep 2026 12:27:20 -0700 Subject: [PATCH 2/2] test(desktop): wait for terminal writes to finish --- apps/desktop/src/main/terminal/selection.test.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/main/terminal/selection.test.ts b/apps/desktop/src/main/terminal/selection.test.ts index a791350d845..1c9b4a2ce7a 100644 --- a/apps/desktop/src/main/terminal/selection.test.ts +++ b/apps/desktop/src/main/terminal/selection.test.ts @@ -1,4 +1,3 @@ -import { sleep } from '@sim/utils/helpers' import { Terminal } from '@xterm/headless' import { describe, expect, it } from 'vitest' import { findSelectedRow } from '@/main/terminal/session' @@ -7,14 +6,14 @@ const REVERSE = '\u001b[7m' const RESET = '\u001b[0m' /** - * Writes to a real headless emulator and lets it settle, so these exercise the - * same buffer the agent reads rather than a hand-built fake. xterm parses - * asynchronously, hence the flush. + * Writes to a real headless emulator and waits for the queued writes to finish, + * so these exercise the same buffer the agent reads. The trailing empty write's + * callback fires after xterm has parsed every preceding chunk. */ async function screen(write: (term: Terminal) => void, rows = 8): Promise { const term = new Terminal({ cols: 40, rows, allowProposedApi: true }) write(term) - await sleep(30) + await new Promise((resolve) => term.write('', resolve)) return term }