Skip to content

The agent that grows with you

test(tui): lint the round-13 client regression tests

Teknium134c8139cb60
diff --git a/ui-tui/src/__tests__/canonicalMultipartResumeRows.test.ts b/ui-tui/src/__tests__/canonicalMultipartResumeRows.test.ts
index 9e6ef29640f..8a60f2fbb48 100644
--- a/ui-tui/src/__tests__/canonicalMultipartResumeRows.test.ts
+++ b/ui-tui/src/__tests__/canonicalMultipartResumeRows.test.ts
@@ -7,8 +7,10 @@ import { toTranscriptMessages } from '../domain/messages.js'
// that user turn; `content` stays on the row for /undo targeting.
it('a multipart user row survives the canonical resume projection', () => {
const content = [{ type: 'text', text: 'what is in this picture?' }, { type: 'image_url', image_url: { url: 'data:image/png;base64,AA' } }]
+
const snapshot = canonicalResult('session.resume', { session_id: 's', stored_session_id: 's', authority_epoch: 1, execution_generation: 0,
messages: [{ role: 'user', content }, { role: 'assistant', content: 'a cat' }], info: {} })
+
expect(snapshot.messages[0].content).toEqual(content)
const rows = toTranscriptMessages(snapshot.messages)
expect(rows.map(row => [row.role, row.text])).toEqual([['user', 'what is in this picture?\n[image]'], ['assistant', 'a cat']])
diff --git a/ui-tui/src/__tests__/inkOfflinePollRedial.test.ts b/ui-tui/src/__tests__/inkOfflinePollRedial.test.ts
index 8bd77100eca..93e299e5e1a 100644
--- a/ui-tui/src/__tests__/inkOfflinePollRedial.test.ts
+++ b/ui-tui/src/__tests__/inkOfflinePollRedial.test.ts
@@ -18,10 +18,12 @@ afterEach(() => { for (const unmount of mounted.splice(0)) { unmount() } vi.useR
it('an offline session stops the refresh poll and reports the lost connection once', async () => {
vi.useFakeTimers()
resetUiState()
+
const gw = Object.assign(new EventEmitter(), {
attached: true, isCanonical: true, drain: () => {}, getLogTail: () => '', kill: () => {}, recordLog: () => {},
request: vi.fn((_method: string) => new Promise(() => {}))
})
+
let app!: ReturnType<typeof useMainApp>
function Harness() {
diff --git a/ui-tui/src/__tests__/inkRemoteReceiptHome.test.tsx b/ui-tui/src/__tests__/inkRemoteReceiptHome.test.tsx
index bc042c6f16e..b53cc9bd4e3 100644
--- a/ui-tui/src/__tests__/inkRemoteReceiptHome.test.tsx
+++ b/ui-tui/src/__tests__/inkRemoteReceiptHome.test.tsx
@@ -9,11 +9,10 @@ import React from 'react'
import { expect, it, vi } from 'vitest'
import { createGatewayEventHandler } from '../app/createGatewayEventHandler.js'
-import { captureDestination } from '../app/submissionDestination.js'
import { turnController } from '../app/turnController.js'
import { $uiState, patchUiState, resetUiState } from '../app/uiStore.js'
import { useSubmission } from '../app/useSubmission.js'
-import { canonicalEvent, canonicalResult } from '../canonicalGateway.js'
+import { canonicalEvent } from '../canonicalGateway.js'
import { useQueue } from '../hooks/useQueue.js'
import { t } from '../i18n/runtime.js'
@@ -33,6 +32,7 @@ function mount(receiptHome: string, receiptSession = 'stored-owner', busyInputMo
resetUiState()
vi.stubEnv('HERMES_TUI_GATEWAY_URL', 'ws://remote.test/api/ws')
+
const info = { model: 'test', skills: {}, tools: {}, profile_name: 'default', profile_id: '/srv/remote-owner/.hermes',
stored_session_id: 'stored-owner', execution_epoch: '1', execution_generation: 1, running: true }