@@ -24,7 +24,7 @@ import { AIViewPreview } from "./AIViewPreview";
2424
2525// HoverPreviewRenderer isolates preview mount logic to avoid re-render storms and keeps
2626// the ProjectSidebar lean. It renders a Tooltip portal whose contents are the AIViewPreview.
27- const HoverPreviewRenderer : React . FC < {
27+ const _HoverPreviewRenderer : React . FC < {
2828 workspaceId : string ;
2929 projectName : string ;
3030 branch : string ;
@@ -43,7 +43,6 @@ const HoverPreviewRenderer: React.FC<{
4343 </ Tooltip >
4444 ) ;
4545} ;
46-
4746// Styled Components
4847const SidebarContent = styled . div `
4948 display: flex;
@@ -998,7 +997,6 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
998997 const displayName = getWorkspaceDisplayName ( workspace . path ) ;
999998 const workspaceState = getWorkspaceState ( workspaceId ) ;
1000999 const isStreaming = workspaceState . canInterrupt ;
1001- // const streamingModel = workspaceState.currentModel; // Unused
10021000 const isUnread = unreadStatus . get ( workspaceId ) ?? false ;
10031001 const isEditing = editingWorkspaceId === workspaceId ;
10041002 const isSelected =
@@ -1043,26 +1041,19 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
10431041 data-workspace-path = { workspace . path }
10441042 data-workspace-id = { workspaceId }
10451043 >
1044+ { /* Hover preview tooltip (does not steal hover) */ }
10461045 < Tooltip className = "tooltip" align = "right" width = "wide" >
1047- { /* Lazy import to avoid bundle growth in main path */ }
1048- { /* We avoid dynamic imports per repo rules; component is small */ }
1049- { /* Render compact AIViewPreview inside tooltip for hover glance */ }
1050- { /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ }
1051- { /* @ts -ignore - imported at top-level */ }
1052- { ( ( ) => {
1053- // Inline require to avoid circulars; still static import at file top not allowed per size?
1054- // We already created component at src/components/AIViewPreview.tsx
1055- // Importing statically:
1056- return null ;
1057- } ) ( ) }
1046+ < AIViewPreview { ...previewProps } />
10581047 </ Tooltip >
10591048 < TooltipWrapper inline >
10601049 < WorkspaceRemoveBtn
10611050 onClick = { ( e ) => {
10621051 e . stopPropagation ( ) ;
1063- void handleRemoveWorkspace ( workspaceId , e . currentTarget ) ;
1052+ void handleRemoveWorkspace (
1053+ workspaceId ,
1054+ e . currentTarget
1055+ ) ;
10641056 } }
1065- aria-label = { `Remove workspace ${ displayName } ` }
10661057 data-workspace-id = { workspaceId }
10671058 >
10681059 ×
@@ -1111,8 +1102,6 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
11111102 }
11121103 />
11131104 </ WorkspaceItem >
1114- { /* Hover preview portal */ }
1115- < HoverPreviewRenderer { ...previewProps } />
11161105 </ TooltipWrapper >
11171106 { renameError && editingWorkspaceId === workspaceId && (
11181107 < WorkspaceErrorContainer > { renameError } </ WorkspaceErrorContainer >
@@ -1121,6 +1110,11 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
11211110 ) ;
11221111 }
11231112 ) }
1113+ </ WorkspacesContainer >
1114+ ) }
1115+ </ ProjectGroup >
1116+ ) ;
1117+ } )
11241118 ) }
11251119 </ ProjectsList >
11261120 </ >
0 commit comments