auto-claude: subtask-1-1 - Add useEffect hook to reset expandedTerminalId when projectPath changes (#1240)
Fix terminal expansion state persisting across project switches. When user expands a terminal in Project A and then navigates to Project B, the expandedTerminalId would reference a non-existent terminal causing blank display. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,11 @@ export function TerminalGrid({ projectPath, onNewTaskClick, isActive = false }:
|
||||
// Expanded terminal state - when set, this terminal takes up the full grid space
|
||||
const [expandedTerminalId, setExpandedTerminalId] = useState<string | null>(null);
|
||||
|
||||
// Reset expanded terminal when project changes
|
||||
useEffect(() => {
|
||||
setExpandedTerminalId(null);
|
||||
}, [projectPath]);
|
||||
|
||||
// Fetch available session dates when project changes
|
||||
useEffect(() => {
|
||||
if (!projectPath) {
|
||||
|
||||
Reference in New Issue
Block a user