Skip to content

Commit 7c2d158

Browse files
Merge pull request #40 from bitloops/fix-missing-actor
Fix missing actor on session page
2 parents 4225046 + 17d050c commit 7c2d158

5 files changed

Lines changed: 69 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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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: {
13+
id: 'user-1',
14+
name: 'Jane Doe',
15+
email: 'jane@example.com',
16+
source: null,
17+
},
18+
agent_type: 'claude-code',
19+
model: null,
20+
first_prompt: 'Fix the sessions table',
21+
started_at: '2025-02-14T10:00:00.000Z',
22+
ended_at: null,
23+
last_event_at: null,
24+
turn_count: 2,
25+
checkpoint_count: 1,
26+
token_usage: null,
27+
file_paths: [],
28+
tool_uses: [],
29+
linked_checkpoints: [],
30+
latest_commit_author: null,
31+
...overrides,
32+
}
33+
}
34+
35+
describe('SessionsTable', () => {
36+
it('renders the actor column as Author', () => {
37+
render(<SessionsTable data={[makeSessionRow()]} />)
38+
expect(
39+
screen.getByRole('columnheader', { name: 'Author' }),
40+
).toBeInTheDocument()
41+
expect(
42+
screen.queryByRole('columnheader', { name: 'Actor' }),
43+
).not.toBeInTheDocument()
44+
})
45+
46+
it('renders actor name in the Author column', () => {
47+
render(<SessionsTable data={[makeSessionRow()]} />)
48+
expect(screen.getByText('Jane Doe')).toBeInTheDocument()
49+
})
50+
51+
it('renders empty state when data is empty', () => {
52+
render(<SessionsTable data={[]} />)
53+
expect(
54+
screen.getByText('No sessions for current filters.'),
55+
).toBeInTheDocument()
56+
})
57+
})

‎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)