File tree 1 file changed +12
-7
lines changed
site/src/pages/WorkspacesPage
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -641,14 +641,19 @@ const WorkspaceApps: FC<WorkspaceAppsProps> = ({ workspace }) => {
641
641
const { data : apiKeyRes } = useQuery ( apiKey ( ) ) ;
642
642
const token = apiKeyRes ?. key ;
643
643
644
- const resource = workspace . latest_build . resources
644
+ /**
645
+ * Coder is pretty flexible and allows an enormous variety of use cases, such
646
+ * as having multiple resources with many agents, but they are not common. The
647
+ * most common scenario is to have one single compute resource with one single
648
+ * agent containing all the apps. Lets test this getting the apps for the
649
+ * first resource, and first agent - they are sorted to return the compute
650
+ * resource first - and see what customers and ourselves, using dogfood, think
651
+ * about that.
652
+ */
653
+ const agent = workspace . latest_build . resources
645
654
. filter ( ( r ) => ! r . hide )
646
- . at ( 0 ) ;
647
- if ( ! resource ) {
648
- return null ;
649
- }
650
-
651
- const agent = resource . agents ?. at ( 0 ) ;
655
+ . at ( 0 )
656
+ ?. agents ?. at ( 0 ) ;
652
657
if ( ! agent ) {
653
658
return null ;
654
659
}
You can’t perform that action at this time.
0 commit comments