Skip to content

Commit e59add3

Browse files
Fix missing actor on session page
1 parent 4225046 commit e59add3

5 files changed

Lines changed: 64 additions & 2 deletions

File tree

‎bundle_versions.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"versions": [
3+
{
4+
"version": "0.0.17",
5+
"min_required_cli_version": "0.0.29",
6+
"max_required_cli_version": "latest",
7+
"download_url": "https://github.com/bitloops/local-dashboard/releases/download/v0.0.17/bundle.tar.zst",
8+
"checksum_url": "https://github.com/bitloops/local-dashboard/releases/download/v0.0.17/bundle.tar.zst.sha256"
9+
},
310
{
411
"version": "0.0.16",
512
"min_required_cli_version": "0.0.27",

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "local-dashboard",
3-
"version": "0.0.16",
3+
"version": "0.0.17",
44
"license": "Apache-2.0",
55
"type": "module",
66
"scripts": {

‎src/features/dashboard/components/sessions-columns.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const sessionColumns: ColumnDef<SessionRow>[] = [
2525
},
2626
{
2727
id: 'actor',
28-
header: 'Actor',
28+
header: 'Author',
2929
cell: ({ row }) => {
3030
const a = row.original.actor
3131
const label = a?.name ?? a?.email ?? a?.id ?? '—'
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { describe, expect, it } from 'vitest'
2+
import { render, screen } from '@testing-library/react'
3+
import { SessionsTable } from './sessions-table'
4+
import type { DashboardInteractionSessionDto } from '../api-types'
5+
6+
function makeSessionRow(
7+
overrides: Partial<DashboardInteractionSessionDto> = {},
8+
): DashboardInteractionSessionDto {
9+
return {
10+
session_id: 'sess-1',
11+
branch: 'main',
12+
actor: { id: 'user-1', name: 'Jane Doe', email: 'jane@example.com' },
13+
agent_type: 'claude-code',
14+
model: null,
15+
first_prompt: 'Fix the sessions table',
16+
started_at: '2025-02-14T10:00:00.000Z',
17+
ended_at: null,
18+
last_event_at: null,
19+
turn_count: 2,
20+
checkpoint_count: 1,
21+
token_usage: null,
22+
file_paths: [],
23+
tool_uses: [],
24+
linked_checkpoints: [],
25+
latest_commit_author: null,
26+
...overrides,
27+
}
28+
}
29+
30+
describe('SessionsTable', () => {
31+
it('renders the actor column as Author', () => {
32+
render(<SessionsTable data={[makeSessionRow()]} />)
33+
expect(
34+
screen.getByRole('columnheader', { name: 'Author' }),
35+
).toBeInTheDocument()
36+
expect(
37+
screen.queryByRole('columnheader', { name: 'Actor' }),
38+
).not.toBeInTheDocument()
39+
})
40+
41+
it('renders actor name in the Author column', () => {
42+
render(<SessionsTable data={[makeSessionRow()]} />)
43+
expect(screen.getByText('Jane Doe')).toBeInTheDocument()
44+
})
45+
46+
it('renders empty state when data is empty', () => {
47+
render(<SessionsTable data={[]} />)
48+
expect(
49+
screen.getByText('No sessions for current filters.'),
50+
).toBeInTheDocument()
51+
})
52+
})

‎tests/integration/dashboard.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ describe('Dashboard integration', () => {
124124
screen.getByRole('heading', { name: 'Dashboard' }),
125125
).toBeInTheDocument()
126126
expect(screen.getByText('Recent Sessions')).toBeInTheDocument()
127+
expect(
128+
screen.getByRole('columnheader', { name: 'Author' }),
129+
).toBeInTheDocument()
127130
expect(
128131
screen.getByText(sessionSample.first_prompt ?? ''),
129132
).toBeInTheDocument()

0 commit comments

Comments
 (0)