fix: download graph logs

This commit is contained in:
hjlarry 2026-04-10 13:41:58 +08:00
parent 10193179cf
commit f45c09ba69
2 changed files with 5 additions and 8 deletions

View File

@ -113,14 +113,6 @@ const Header = () => {
{!isCurrentWorkspaceDatasetOperator && <ToolsNav className={navClassName} />}
</div>
<div className="flex min-w-0 flex-1 items-center justify-end pr-3 pl-2 min-[1280px]:pl-3">
<button
type="button"
data-testid="workflow-import-log-download"
className="top-1/2 left-full ml-1 h-3 w-3 -translate-y-1/2 opacity-0"
aria-hidden="true"
tabIndex={-1}
onClick={handleDownloadGraphImportLog}
/>
<EnvNav />
<div className="mr-2">
<PluginsNav />

View File

@ -118,6 +118,7 @@ export class CollaborationManager {
private reactFlowStore: ReactFlowStore | null = null
private isLeader = false
private leaderId: string | null = null
private onlineUsers: OnlineUser[] = []
private cursors: Record<string, CursorPosition> = {}
private nodePanelPresence: NodePanelPresenceMap = {}
private activeConnections = new Set<string>()
@ -557,6 +558,7 @@ export class CollaborationManager {
this.currentAppId = null
this.reactFlowStore = null
this.cursors = {}
this.onlineUsers = []
this.nodePanelPresence = {}
this.isUndoRedoInProgress = false
this.rejoinInProgress = false
@ -1345,6 +1347,7 @@ export class CollaborationManager {
if (data.leader && typeof data.leader === 'string')
this.leaderId = data.leader
this.onlineUsers = data.users
this.eventEmitter.emit('onlineUsers', data.users)
this.eventEmitter.emit('cursors', { ...this.cursors })
}
@ -1383,10 +1386,12 @@ export class CollaborationManager {
socket.on('disconnect', (reason) => {
this.cursors = {}
this.onlineUsers = []
this.isLeader = false
this.leaderId = null
this.pendingInitialSync = false
this.eventEmitter.emit('stateChange', { isConnected: false, disconnectReason: reason })
this.eventEmitter.emit('onlineUsers', [])
this.eventEmitter.emit('cursors', {})
})