Fix/tinyplaceui (#4621)

This commit is contained in:
Steven Enamakel
2026-07-06 18:30:13 -07:00
committed by GitHub
parent 16f7bee42f
commit cba85e9492
4 changed files with 24 additions and 25 deletions
+12 -12
View File
@@ -205,7 +205,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -216,7 +216,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -2093,7 +2093,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.2",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -2496,7 +2496,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -4136,7 +4136,7 @@ dependencies = [
"portable-atomic",
"portable-atomic-util",
"serde_core",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -5030,7 +5030,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -7314,7 +7314,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -7373,7 +7373,7 @@ dependencies = [
"security-framework 3.7.0",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -8145,7 +8145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -8999,7 +8999,7 @@ dependencies = [
"getrandom 0.4.2",
"once_cell",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -9806,7 +9806,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
dependencies = [
"memoffset",
"tempfile",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@@ -10633,7 +10633,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.48.0",
]
[[package]]
@@ -22,7 +22,9 @@ const chat = (over: Partial<ChatWindow>): ChatWindow =>
describe('ChatListButton', () => {
it('renders unread count + active badge for an active unread session', () => {
render(<ChatListButton chat={chat({ unread: 4, active: true })} selected onSelect={() => {}} />);
render(
<ChatListButton chat={chat({ unread: 4, active: true })} selected onSelect={() => {}} />
);
expect(screen.getByText('4')).toBeInTheDocument();
expect(screen.getByText('tinyplaceOrchestration.active')).toBeInTheDocument();
});
@@ -42,7 +44,9 @@ describe('ChatListButton', () => {
it('shows the subconscious badge and fires onSelect', () => {
const onSelect = vi.fn();
render(<ChatListButton chat={chat({ kind: 'subconscious' })} selected={false} onSelect={onSelect} />);
render(
<ChatListButton chat={chat({ kind: 'subconscious' })} selected={false} onSelect={onSelect} />
);
expect(screen.getByText('tinyplaceOrchestration.subconsciousBadge')).toBeInTheDocument();
fireEvent.click(screen.getByTestId('tinyplace-chat-sess-1'));
expect(onSelect).toHaveBeenCalled();
@@ -2,9 +2,7 @@ import { fireEvent, render, screen, within } from '@testing-library/react';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { ChatWindow } from '../../lib/orchestration/useOrchestrationChats';
import OrchestrationFocusPane, {
type OrchestrationFocusPaneProps,
} from './OrchestrationFocusPane';
import OrchestrationFocusPane, { type OrchestrationFocusPaneProps } from './OrchestrationFocusPane';
vi.mock('../../lib/i18n/I18nContext', () => ({ useT: () => ({ t: (k: string) => k }) }));
@@ -51,7 +49,9 @@ describe('OrchestrationFocusPane', () => {
});
it('renders the payment-required state', () => {
render(<OrchestrationFocusPane {...props({ sessionsState: { status: 'payment_required' } })} />);
render(
<OrchestrationFocusPane {...props({ sessionsState: { status: 'payment_required' } })} />
);
expect(screen.getByText('tinyplaceOrchestration.paymentRequired')).toBeInTheDocument();
});
@@ -109,9 +109,7 @@ describe('OrchestrationFocusPane', () => {
});
it('surfaces a composer send error when composing', () => {
render(
<OrchestrationFocusPane {...props({ canCompose: true, masterError: 'send failed' })} />
);
render(<OrchestrationFocusPane {...props({ canCompose: true, masterError: 'send failed' })} />);
expect(screen.getByTestId('tinyplace-master-composer-input')).toBeInTheDocument();
expect(screen.getByText(/send failed/)).toBeInTheDocument();
});
@@ -3,10 +3,7 @@
* contact-address resolution, and derived badge keys. Extracted so the tab
* container and its presentational siblings share one implementation.
*/
import type {
ContactRequestsResponse,
ContactView,
} from '../../lib/agentworld/invokeApiClient';
import type { ContactRequestsResponse, ContactView } from '../../lib/agentworld/invokeApiClient';
import type { ChatWindow } from '../../lib/orchestration/useOrchestrationChats';
export function formatTime(timestamp: string | null): string {