Skip to content

Commit 159da3f

Browse files
author
GCWing
committed
fix(web): align overflow test contracts
1 parent 7804f3c commit 159da3f

14 files changed

Lines changed: 26 additions & 6 deletions

src/web-ui/src/app/components/AgentCompanionDesktopPet/AgentCompanionDesktopPetStyles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('AgentCompanionDesktopPet styles', () => {
8080
const overlay = extractBlock(stylesheet, '&__overlay');
8181
const menuItem = extractBlock(stylesheet, '&__menu-item');
8282

83-
expect(source).toContain('import { Menu, MenuItem, ScrollArea } from \'@openbitfun/ui\'');
83+
expect(source).toContain('import { OverflowText, Menu, MenuItem, ScrollArea } from \'@openbitfun/ui\'');
8484
expect(source).not.toContain('triggerClassName');
8585
expect(overlay).not.toMatch(/\b(?:color|background|border|box-shadow|backdrop-filter)\s*:/);
8686
expect(menuItem).toBe('');

src/web-ui/src/app/components/NavPanel/sections/sessions/SessionStatusIndicator.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { memo } from 'react';
22
import { Icon, Tooltip } from '@openbitfun/ui';
3-
import { CircleAlert, CircleCheck, CirclePause, CircleStop, Clock3, CloudOff, Hand, Loader2, MessageCircleQuestion } from 'lucide-react';
3+
import { CircleAlert, CircleCheck, CirclePause, CircleStop, CloudOff, Hand, Loader2, MessageCircleQuestion } from 'lucide-react';
44
import { useI18n } from '@/infrastructure/i18n';
55
import { useSessionNavStatus } from '@/flow_chat/hooks/useSessionNavStatus';
66
import './SessionStatusIndicator.scss';
@@ -13,7 +13,7 @@ const presentation = {
1313
unread: { glyph: CircleCheck, tone: 'success', label: 'nav.sessions.status.unread' },
1414
paused: { glyph: CirclePause, tone: 'secondary', label: 'nav.sessions.status.paused' },
1515
stopped: { glyph: CircleStop, tone: 'secondary', label: 'shared:statuses.cancelled' },
16-
queued: { glyph: Clock3, tone: 'secondary', label: 'nav.sessions.status.queued' },
16+
queued: { name: 'clock', tone: 'secondary', label: 'nav.sessions.status.queued' },
1717
syncing: { glyph: CloudOff, tone: 'secondary', label: 'nav.sessions.status.syncing' },
1818
} as const;
1919

@@ -40,7 +40,14 @@ export const SessionStatusIndicator = memo(function SessionStatusIndicator({ ses
4040
aria-label={label}
4141
tabIndex={0}
4242
>
43-
<Icon glyph={appearance.glyph} size="xs" tone={appearance.tone} aria-hidden="true" />
43+
<Icon
44+
{...('glyph' in appearance
45+
? { glyph: appearance.glyph }
46+
: { name: appearance.name })}
47+
size="xs"
48+
tone={appearance.tone}
49+
aria-hidden="true"
50+
/>
4451
</span>
4552
</Tooltip>
4653
) : null}

src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceSessionBatchModal.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ vi.mock('@openbitfun/ui', () => {
2222
return {
2323
Dialog: Box, DialogBody: Box, DialogHeader: Box, DialogHeading: Box,
2424
DialogTitle: Box, DialogDescription: Box, DialogFooter: Box, ScrollArea: Box,
25-
DialogClose: () => null, Icon: () => null, Spinner: () => null,
25+
DialogClose: () => null, Icon: () => null, Spinner: () => null, OverflowText: Box,
2626
Button: ({ children, onClick, disabled }: React.ComponentProps<'button'>) => (
2727
<button onClick={onClick} disabled={disabled}>{children}</button>
2828
),

src/web-ui/src/features/market-account/MarketAccountControls.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ vi.mock('@/shared/notification-system', () => ({
4848
vi.mock('@openbitfun/ui', () => ({
4949
Avatar: ({ src, alt }: any) => <img src={src} alt={alt} />,
5050
Icon: ({ name, ...props }: { name: string } & React.HTMLAttributes<HTMLSpanElement>) => <span data-icon={name} {...props} />,
51+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
5152
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
5253
Menu: ({ children, ...props }: any) => <div role="menu" {...props}>{children}</div>,
5354
MenuItem: ({ children, leading, ...props }: any) => (

src/web-ui/src/features/ssh-remote/SSHConnectionDialog.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ vi.mock('./SSHAuthPromptDialog', () => ({
5454
vi.mock('@openbitfun/ui', () => ({
5555
Alert: () => null,
5656
Icon: ({ name, ...props }: { name: string } & React.HTMLAttributes<HTMLSpanElement>) => <span data-icon={name} {...props} />,
57+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
5758
Dialog: ({
5859
open,
5960
children,

src/web-ui/src/flow_chat/components/PendingQueuePanel.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ vi.mock('react-i18next', () => ({
2323

2424
vi.mock('@openbitfun/ui', () => ({
2525
Icon: ({ name }: { name: string }) => <span data-openbitfun-component="icon" data-openbitfun-name={name} />,
26+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
2627
IconButton: ({ icon, loading: _loading, size: _size, variant: _variant, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
2728
icon?: ReactNode;
2829
loading?: boolean;

src/web-ui/src/flow_chat/components/modern/FlowChatTurnRail.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ vi.mock('react-i18next', () => ({
2424

2525
vi.mock('@openbitfun/ui', () => ({
2626
Icon: ({ name }: { name: string }) => <span data-testid={`icon-${name}`} />,
27+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
2728
Tooltip: ({
2829
children,
2930
content,

src/web-ui/src/flow_chat/components/modern/RuntimeStatusSlot.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { useRuntimeStatusStore } from '../../store/runtimeStatusStore';
88

99
vi.mock('@openbitfun/ui', () => ({
1010
Spinner: () => <span data-testid="dot-matrix" />,
11+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
1112
}));
1213

1314
vi.mock('react-i18next', () => ({

src/web-ui/src/flow_chat/components/modern/SessionFileModificationsBar.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ vi.mock('react-i18next', () => ({
4141

4242
vi.mock('@openbitfun/ui', () => ({
4343
Icon: ({ name }: { name: string }) => <span data-openbitfun-component="icon" data-openbitfun-name={name} />,
44+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
4445
Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,
4546
}));
4647

src/web-ui/src/flow_chat/components/modern/TurnFailureNoticeItem.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ vi.mock('@/infrastructure/i18n', () => ({
2929

3030
vi.mock('@openbitfun/ui', () => ({
3131
Icon: ({ name }: { name: string }) => <span data-openbitfun-component="icon" data-openbitfun-name={name} />,
32+
OverflowText: ({ children, behavior: _behavior, marqueeActive: _marqueeActive, ...props }: any) => <span {...props}>{children}</span>,
3233
Tooltip: ({ content, children }: { content: string; children: React.ReactElement }) => (
3334
<span data-tooltip={content}>{children}</span>
3435
),

0 commit comments

Comments
 (0)