feat(ui-workspace): support manual flat-list ordering
This commit is contained in:
@@ -57,6 +57,21 @@ function fireDrag(row: HTMLElement, kind: 'dragOver' | 'drop', clientY: number):
|
||||
}
|
||||
|
||||
describe('workspace browser rows', () => {
|
||||
it('omits only an empty leading status slot in the hierarchy-free flat list', () => {
|
||||
const idle: SessionNode = {
|
||||
id: sid('flat'), title: 'Flat Session', blank: false, running: false,
|
||||
runningSubagentCount: 0, completed: false, updatedAt: 0,
|
||||
}
|
||||
const view = render(<SessionNodeItem node={idle} currentId={undefined} now={0} onOpen={vi.fn()}
|
||||
onRename={vi.fn()} onFork={vi.fn()} onArchive={vi.fn()} flat t={t} />)
|
||||
const title = screen.getByText('Flat Session')
|
||||
expect(title.previousElementSibling).toBeNull()
|
||||
|
||||
view.rerender(<SessionNodeItem node={{ ...idle, running: true }} currentId={undefined} now={0}
|
||||
onOpen={vi.fn()} onRename={vi.fn()} onFork={vi.fn()} onArchive={vi.fn()} flat t={t} />)
|
||||
expect(screen.getByText('Flat Session').previousElementSibling?.querySelector('[data-state="ongoing"]')).toBeTruthy()
|
||||
})
|
||||
|
||||
it('renders a selected content-search row and opens only its session', () => {
|
||||
const onOpen = vi.fn()
|
||||
const result: SearchResultNode = {
|
||||
|
||||
Reference in New Issue
Block a user