Skip to content

Commit 878c469

Browse files
authored
🤖 Improve loading workspace UI (#312)
Loading workspace state now uses the same centered, styled EmptyState component as 'No Messages Yet' for visual consistency. Fixed EmptyState to properly center by adding `flex: 1` so it fills the ViewContainer. _Generated with `cmux`_
1 parent d0dc0c1 commit 878c469

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/components/AIView.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,6 @@ const TerminalIconButton = styled.button`
9494
}
9595
`;
9696

97-
const LoadingIndicator = styled.div`
98-
display: flex;
99-
align-items: center;
100-
justify-content: center;
101-
height: 100%;
102-
color: #888;
103-
font-size: 14px;
104-
`;
105-
10697
const OutputContainer = styled.div`
10798
flex: 1;
10899
position: relative;
@@ -119,6 +110,7 @@ const OutputContent = styled.div`
119110
`;
120111

121112
const EmptyState = styled.div`
113+
flex: 1;
122114
display: flex;
123115
flex-direction: column;
124116
align-items: center;
@@ -370,11 +362,9 @@ const AIViewInner: React.FC<AIViewProps> = ({
370362
if (!workspaceState) {
371363
return (
372364
<ViewContainer className={className}>
373-
<ChatArea ref={chatAreaRef}>
374-
<OutputContainer>
375-
<LoadingIndicator>Loading workspace...</LoadingIndicator>
376-
</OutputContainer>
377-
</ChatArea>
365+
<EmptyState>
366+
<h3>Loading workspace...</h3>
367+
</EmptyState>
378368
</ViewContainer>
379369
);
380370
}

0 commit comments

Comments
 (0)