Files
orca/tests/tools/omp-transcript-rendered/fixture.tsx
T
A. S.andNeil f150deb226 feat(native-chat): show the full date and time when hovering a message timestamp (#32051)
Message timestamps render time-only; the full localized date and time was
only exposed via aria-label. Wrap the <time> element in the shared Tooltip so
hover and keyboard focus reveal the same full label, without adding a
duplicate aria-describedby announcement. Transcript render tests now go
through a TooltipProvider harness, matching App's production provider.

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-10-27 23:52:16 -07:00

44 lines
1.6 KiB
TypeScript

import React from 'react'
import { createRoot } from 'react-dom/client'
import { TooltipProvider } from '@/components/ui/tooltip'
import { NativeChatMessageList } from '../../../src/renderer/src/components/native-chat/NativeChatMessageList'
import type { NativeChatMessage } from '../../../src/shared/native-chat-types'
import './fixture.css'
declare const __TRANSCRIPT_PROOF__: {
transcripts: { kind: string; phase: string; sessionId: string; messages: NativeChatMessage[] }[]
}
const index = Number(new URLSearchParams(location.search).get('index') ?? '0')
const transcript = __TRANSCRIPT_PROOF__.transcripts[index]
if (!transcript) {
throw new Error('Missing transcript reader output')
}
const root = document.getElementById('root')
if (!root) {
throw new Error('Missing fixture root')
}
createRoot(root).render(
<TooltipProvider delayDuration={400}>
<main className="flex h-screen flex-col bg-background text-foreground">
<header className="border-b border-border px-4 py-3 text-sm">OMP · Native chat</header>
<div className="flex min-h-0 flex-1 flex-col">
<NativeChatMessageList
session={{
agent: 'omp',
sessionId: transcript.sessionId,
status: 'ready',
messages: transcript.messages,
hasMore: false,
loadingEarlier: false,
olderHistoryGeneration: 0,
loadEarlier: () => Promise.resolve('exhausted' as const),
readPhase: 'ready'
}}
isWorking={false}
expandSignal={false}
/>
</div>
</main>
</TooltipProvider>
)