Files
playwriter/extension/src/types.ts
Tommy D. Rossi 178387ec97 Persistent WS connection and auto-create initial tab
- Connect WS at extension startup via maintainConnection() loop
- Auto-retry every 5 seconds silently (no connecting badge)
- Never disconnect WS based on tab count
- Rename ConnectionState 'disconnected' to 'idle', remove global 'connecting'
- Fix race condition with tabGroupQueue for syncTabGroup/disconnectEverything/onTabUpdated
- Add auto-create initial tab when Playwright connects (PLAYWRITER_AUTO_ENABLE env var)
- Add test for auto-create feature
2026-01-01 01:14:16 +01:00

19 lines
458 B
TypeScript

export type ConnectionState = 'idle' | 'connected' | 'extension-replaced'
export type TabState = 'connecting' | 'connected' | 'error'
export interface TabInfo {
sessionId?: string
targetId?: string
state: TabState
errorText?: string
pinnedCount?: number
attachOrder?: number
}
export interface ExtensionState {
tabs: Map<number, TabInfo>
connectionState: ConnectionState
currentTabId: number | undefined
errorText: string | undefined
}