Skip to content

Commit aa78fa6

Browse files
committed
fix: dark-mode surfaces for compose preview and expanded job rows
`bgcolor: "grey.50"` resolves to a fixed light hex (#FAFAFA) regardless of palette mode, so in dark mode you got near-invisible light text on a still-light surface. Switch the docker-compose YAML preview block and the expanded admin job-detail row to a callback that picks `grey.900` in dark mode and keeps `grey.50` in light. AppLogViewer.tsx and JobDetail.tsx intentionally render terminal-style output and stay on dark `grey.900` regardless — those don't need to change.
1 parent 797f4d0 commit aa78fa6

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

apps/web/src/components/admin/activity/JobList.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,17 @@ function JobRow({ job }: { job: AdminJob }) {
108108
</TableCell>
109109
</TableRow>
110110
<TableRow>
111-
<TableCell colSpan={5} sx={{ py: 0, px: 2, bgcolor: "grey.50" }}>
111+
<TableCell
112+
colSpan={5}
113+
sx={{
114+
py: 0,
115+
px: 2,
116+
// grey.50 is fixed light regardless of mode — pick the
117+
// surface tint per palette mode so the expanded row stays
118+
// legible in dark mode.
119+
bgcolor: (theme) => (theme.palette.mode === "dark" ? "grey.900" : "grey.50"),
120+
}}
121+
>
112122
<Collapse in={expanded} unmountOnExit>
113123
<Box py={1.5}>
114124
<JobDetail jobId={job.id} />

apps/web/src/components/admin/services/ComposePreview.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,16 @@ export function ComposePreview() {
9595
</Stack>
9696
<Paper
9797
variant="outlined"
98-
sx={{ p: 2, maxHeight: "70vh", overflow: "auto", bgcolor: "grey.50" }}
98+
sx={{
99+
p: 2,
100+
maxHeight: "70vh",
101+
overflow: "auto",
102+
// grey.50 is a fixed light color regardless of palette mode, so it
103+
// produced near-invisible light-on-light text in dark mode. Pick
104+
// the surface based on the active mode so contrast stays correct.
105+
bgcolor: (theme) => (theme.palette.mode === "dark" ? "grey.900" : "grey.50"),
106+
color: "text.primary",
107+
}}
99108
>
100109
<pre
101110
style={{

0 commit comments

Comments
 (0)