Skip to content

Commit 8181c9f

Browse files
refactor(site): make cosmetic changes on agent logs (#11601)
1 parent 68e5a51 commit 8181c9f

File tree

2 files changed

+39
-18
lines changed

2 files changed

+39
-18
lines changed

site/src/components/Resources/AgentRow.tsx

+19-15
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,22 @@ export const AgentRow: FC<AgentRowProps> = ({
318318
<img
319319
src={logSource.icon}
320320
alt=""
321-
width={16}
322-
height={16}
321+
width={14}
322+
height={14}
323323
css={{
324324
marginRight: 8,
325+
flexShrink: 0,
325326
}}
326327
/>
327328
);
328329
} else {
329330
icon = (
330331
<div
331332
css={{
332-
width: 16,
333-
height: 16,
333+
width: 14,
334+
height: 14,
334335
marginRight: 8,
336+
flexShrink: 0,
335337
background: determineScriptDisplayColor(
336338
logSource.display_name,
337339
),
@@ -361,34 +363,36 @@ export const AgentRow: FC<AgentRowProps> = ({
361363
icon = (
362364
<div
363365
css={{
364-
minWidth: 16,
365-
width: 16,
366-
height: 16,
366+
width: 14,
367+
height: 14,
367368
marginRight: 8,
368369
display: "flex",
369370
justifyContent: "center",
370371
position: "relative",
372+
flexShrink: 0,
371373
}}
372374
>
373375
<div
374-
css={{
376+
className="dashed-line"
377+
css={(theme) => ({
375378
height: nextChangesSource ? "50%" : "100%",
376-
width: 4,
377-
background: "hsl(222, 31%, 25%)",
379+
width: 2,
380+
background: theme.experimental.l1.outline,
378381
borderRadius: 2,
379-
}}
382+
})}
380383
/>
381384
{nextChangesSource && (
382385
<div
383-
css={{
384-
height: 4,
386+
className="dashed-line"
387+
css={(theme) => ({
388+
height: 2,
385389
width: "50%",
386390
top: "calc(50% - 2px)",
387391
left: "calc(50% - 1px)",
388-
background: "hsl(222, 31%, 25%)",
392+
background: theme.experimental.l1.outline,
389393
borderRadius: 2,
390394
position: "absolute",
391-
}}
395+
})}
392396
/>
393397
)}
394398
</div>

site/src/components/WorkspaceBuildLogs/Logs.tsx

+20-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const styles = {
121121
wordBreak: "break-all",
122122
display: "flex",
123123
alignItems: "center",
124-
fontSize: 14,
124+
fontSize: 13,
125125
color: theme.palette.text.primary,
126126
fontFamily: MONOSPACE_FONT_FAMILY,
127127
height: "auto",
@@ -131,14 +131,29 @@ const styles = {
131131

132132
"&.error": {
133133
backgroundColor: theme.experimental.roles.error.background,
134+
color: theme.experimental.roles.error.text,
135+
136+
"& .dashed-line": {
137+
backgroundColor: theme.experimental.roles.error.outline,
138+
},
134139
},
135140

136141
"&.debug": {
137142
backgroundColor: theme.experimental.roles.info.background,
143+
color: theme.experimental.roles.info.text,
144+
145+
"& .dashed-line": {
146+
backgroundColor: theme.experimental.roles.info.outline,
147+
},
138148
},
139149

140150
"&.warn": {
141151
backgroundColor: theme.experimental.roles.warning.background,
152+
color: theme.experimental.roles.warning.text,
153+
154+
"& .dashed-line": {
155+
backgroundColor: theme.experimental.roles.warning.outline,
156+
},
142157
},
143158
}),
144159
space: {
@@ -153,8 +168,10 @@ const styles = {
153168
display: "inline-block",
154169
color: theme.palette.text.secondary,
155170
}),
156-
number: {
171+
number: (theme) => ({
157172
width: 32,
158173
textAlign: "right",
159-
},
174+
flexShrink: 0,
175+
color: theme.palette.text.disabled,
176+
}),
160177
} satisfies Record<string, Interpolation<Theme>>;

0 commit comments

Comments
 (0)