+
@@ -219,16 +203,16 @@ const StaticWidth = (props: BoxProps) => {
// These are more or less copied from
// site/src/components/Resources/ResourceCard.tsx
-const useStyles = makeStyles((theme) => ({
- root: {
+const styles = {
+ root: (theme) => ({
padding: theme.spacing(2.5, 4),
borderTop: `1px solid ${theme.palette.divider}`,
background: theme.palette.background.paper,
overflowX: "auto",
scrollPadding: theme.spacing(0, 4),
- },
+ }),
- metadata: {
+ metadata: (theme) => ({
fontSize: 12,
lineHeight: "normal",
display: "flex",
@@ -240,15 +224,15 @@ const useStyles = makeStyles((theme) => ({
"&:last-child": {
paddingRight: theme.spacing(4),
},
- },
+ }),
- metadataLabel: {
+ metadataLabel: (theme) => ({
color: theme.palette.text.secondary,
textOverflow: "ellipsis",
overflow: "hidden",
whiteSpace: "nowrap",
fontWeight: 500,
- },
+ }),
metadataValue: {
textOverflow: "ellipsis",
@@ -258,29 +242,29 @@ const useStyles = makeStyles((theme) => ({
fontSize: 14,
},
- metadataValueSuccess: {
+ metadataValueSuccess: (theme) => ({
color: theme.palette.success.light,
- },
+ }),
- metadataValueError: {
+ metadataValueError: (theme) => ({
color: theme.palette.error.main,
- },
+ }),
- metadataStale: {
+ metadataStale: (theme) => ({
color: theme.palette.text.disabled,
cursor: "pointer",
- },
+ }),
- skeleton: {
+ skeleton: (theme) => ({
marginTop: theme.spacing(0.5),
- },
+ }),
- inlineCommand: {
+ inlineCommand: (theme) => ({
fontFamily: MONOSPACE_FONT_FAMILY,
display: "inline-block",
fontWeight: 600,
margin: 0,
borderRadius: 4,
color: theme.palette.text.primary,
- },
-}));
+ }),
+} satisfies Record
>;
diff --git a/site/src/components/Resources/AgentRow.tsx b/site/src/components/Resources/AgentRow.tsx
index d77160b5cc07b..8808be86c1508 100644
--- a/site/src/components/Resources/AgentRow.tsx
+++ b/site/src/components/Resources/AgentRow.tsx
@@ -1,9 +1,9 @@
import Collapse from "@mui/material/Collapse";
import Skeleton from "@mui/material/Skeleton";
import Tooltip from "@mui/material/Tooltip";
-import { makeStyles } from "@mui/styles";
+import { type Interpolation, type Theme } from "@emotion/react";
import * as API from "api/api";
-import {
+import type {
Workspace,
WorkspaceAgent,
WorkspaceAgentLogSource,
@@ -30,7 +30,6 @@ import {
import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList as List, ListOnScrollProps } from "react-window";
import { colors } from "theme/colors";
-import { combineClasses } from "utils/combineClasses";
import { Stack } from "../Stack/Stack";
import { AgentLatency } from "./AgentLatency";
import { AgentMetadata } from "./AgentMetadata";
@@ -75,7 +74,6 @@ export const AgentRow: FC = ({
sshPrefix,
storybookLogs,
}) => {
- const styles = useStyles();
const hasAppsToDisplay = !hideVSCodeDesktopButton || agent.apps.length > 0;
const shouldDisplayApps =
showApps &&
@@ -159,28 +157,26 @@ export const AgentRow: FC = ({
key={agent.id}
direction="column"
spacing={0}
- className={combineClasses([
+ css={[
styles.agentRow,
styles[`agentRow-${agent.status}`],
styles[`agentRow-lifecycle-${agent.lifecycle_state}`],
- ])}
+ ]}
>
-
-
-
+
+
+
-
{agent.name}
+
{agent.name}
{agent.status === "connected" && (
<>
-
- {agent.operating_system}
-
+ {agent.operating_system}
= ({
{agent.status === "connected" && (
-
+
{shouldDisplayApps && (
<>
{(agent.display_apps.includes("vscode") ||
@@ -258,18 +254,18 @@ export const AgentRow: FC
= ({
)}
{agent.status === "connecting" && (
-
+
)}
@@ -278,7 +274,7 @@ export const AgentRow: FC
= ({
{hasStartupFeatures && (
-
+
{({ width }) => (
@@ -289,7 +285,7 @@ export const AgentRow: FC = ({
itemCount={startupLogs.length}
itemSize={logLineHeight}
width={width}
- className={styles.startupLogs}
+ css={styles.startupLogs}
onScroll={handleLogScroll}
>
{({ index, style }) => {
@@ -323,7 +319,7 @@ export const AgentRow: FC = ({
alt=""
width={16}
height={16}
- style={{
+ css={{
marginRight: 8,
}}
/>
@@ -331,7 +327,7 @@ export const AgentRow: FC = ({
} else {
icon = (
= ({
) {
icon = (
= ({
}}
>
= ({
/>
{nextChangesSource && (
= ({
-
+
{showLogs ? (
) : (