ui: fix log lines rendering vertically when stage prefix is present
CI / Lint + build + test (push) Successful in 1m39s
Release / release (push) Has been cancelled

The .log-line grid was templated with 5 columns (anchor/ln/lvl/ts/text),
but renderLogSSE inserts an optional log-stage span, making 6 children.
The 6th child wrapped to row 2 column 1 (24px wide), which forced the
message text to break one character per line. Flexbox with min-width:0
on the text span scales cleanly with or without the stage element.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 19:20:51 -04:00
parent f79fe0f0db
commit 5c6bfa5ffa
+7 -9
View File
@@ -794,17 +794,15 @@ body.bare main { max-width: none; }
opacity: .5; opacity: .5;
} }
.log-line { .log-line {
display: grid; display: flex;
grid-template-columns: 24px 48px 56px 72px auto;
align-items: baseline; align-items: baseline;
gap: 8px; gap: 8px;
padding: 2px 10px; padding: 2px 10px;
white-space: pre-wrap;
word-break: break-word;
border-left: 3px solid transparent; border-left: 3px solid transparent;
} }
.log-line:target { background: rgba(60,130,246,.12); border-left-color: var(--accent); } .log-line:target { background: rgba(60,130,246,.12); border-left-color: var(--accent); }
.log-line .log-anchor { .log-line .log-anchor {
flex: 0 0 18px;
color: var(--text-dim); color: var(--text-dim);
opacity: 0; opacity: 0;
font-weight: 700; font-weight: 700;
@@ -812,11 +810,11 @@ body.bare main { max-width: none; }
text-align: center; text-align: center;
} }
.log-line:hover .log-anchor { opacity: 1; } .log-line:hover .log-anchor { opacity: 1; }
.log-line .ln { color: var(--text-dim); opacity: .6; text-align: right; user-select: none; } .log-line .ln { flex: 0 0 40px; color: var(--text-dim); opacity: .6; text-align: right; user-select: none; }
.log-line .lvl { color: var(--text-dim); text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .5px; } .log-line .lvl { flex: 0 0 44px; color: var(--text-dim); text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .5px; }
.log-line .log-ts { color: var(--text-dim); opacity: .75; } .log-line .log-ts { flex: 0 0 64px; color: var(--text-dim); opacity: .75; }
.log-line .log-stage { color: var(--text-dim); opacity: .75; margin-right: 4px; } .log-line .log-stage { flex: 0 0 auto; color: var(--text-dim); opacity: .75; }
.log-line .log-text { color: var(--text); white-space: pre-wrap; word-break: break-word; } .log-line .log-text { flex: 1 1 auto; min-width: 0; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.log-line.log-warn .log-text { color: var(--warn); } .log-line.log-warn .log-text { color: var(--warn); }
.log-line.log-warn .lvl { color: var(--warn); } .log-line.log-warn .lvl { color: var(--warn); }
.log-line.log-error .log-text { color: var(--danger); } .log-line.log-error .log-text { color: var(--danger); }