fix(terminal): loading state, focus handling, debug logging
- Initialize loading=true in useTerminalSessions to prevent auto-create from firing before initial load completes - Remove hasAutoCreated ref from TerminalPage (no longer needed) - Add focus() to TerminalRef, call on tab switch - Add term.focus() after term.open() in TerminalComponent - Add console logging for WebSocket send/receive to debug no-i/o - Revert backend _read_loop retry logic to original break-on-error
This commit is contained in:
@@ -25,7 +25,7 @@ export function useTerminalSessions(
|
||||
): UseTerminalSessionsResult {
|
||||
const [sessions, setSessions] = useState<TerminalSession[]>([]);
|
||||
const [activeSessionId, setActiveSessionId] = useState<string | null>(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const loadSessions = useCallback(async () => {
|
||||
|
||||
Reference in New Issue
Block a user