mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(frontend): open session details from the header
Pressing the session title opens a details sheet with server, project, branch and directory and inline rename. Linked-server sessions show a server icon and their branch, child sessions show a parent session pill, a banner marks paused live updates while the stream reconnects, and the header context indicator is removed now that usage lives on the model pill.
This commit is contained in:
1 parent
52162d5c4a
commit
d99fcc268e
20 files changed
+732
-418
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { ReconnectingBanner } from './ReconnectingBanner'
|
||||
|
||||
describe('ReconnectingBanner', () => {
|
||||
it('stays hidden before the stream has connected', () => {
|
||||
render(<ReconnectingBanner connected={false} />)
|
||||
|
||||
expect(screen.queryByRole('status')).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('stays hidden while the stream is connected', () => {
|
||||
render(<ReconnectingBanner connected />)
|
||||
|
||||
expect(screen.queryByRole('status')).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('reports a dropped stream once it connected', () => {
|
||||
const { rerender } = render(<ReconnectingBanner connected />)
|
||||
|
||||
rerender(<ReconnectingBanner connected={false} />)
|
||||
|
||||
const banner = screen.getByRole('status')
|
||||
expect(banner).toHaveTextContent('Reconnecting… live updates paused')
|
||||
expect(banner).toHaveAttribute('aria-live', 'polite')
|
||||
})
|
||||
|
||||
it('hides again when the stream reconnects', () => {
|
||||
const { rerender } = render(<ReconnectingBanner connected />)
|
||||
|
||||
rerender(<ReconnectingBanner connected={false} />)
|
||||
rerender(<ReconnectingBanner connected />)
|
||||
|
||||
expect(screen.queryByRole('status')).not.toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user