feat(web): show timestamps in conversation outline (#1111)

This commit is contained in:
Ananovo
2026-07-27 19:52:33 +08:00
committed by GitHub
parent 5e8515c1a5
commit b28088bfe3
6 changed files with 94 additions and 13 deletions
@@ -69,6 +69,16 @@ describe('ConversationOutlinePanel', () => {
expect(onSelect).toHaveBeenCalledWith(outlineItems[0])
})
it('shows each message time instead of a redundant user label', () => {
const { container } = renderPanel()
const timestamps = container.querySelectorAll('time')
expect(timestamps).toHaveLength(outlineItems.length)
expect(timestamps[0]).toHaveAttribute('dateTime', new Date(outlineItems[0].createdAt).toISOString())
expect(timestamps[0]).toHaveAttribute('title')
expect(screen.queryByText('User')).not.toBeInTheDocument()
})
it('shows load earlier when older messages exist', () => {
const onLoadMore = vi.fn()
renderPanel({ hasMoreMessages: true, onLoadMore })