ui: fix log lines rendering vertically when stage prefix is present
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:
@@ -794,17 +794,15 @@ body.bare main { max-width: none; }
|
||||
opacity: .5;
|
||||
}
|
||||
.log-line {
|
||||
display: grid;
|
||||
grid-template-columns: 24px 48px 56px 72px auto;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 8px;
|
||||
padding: 2px 10px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
.log-line:target { background: rgba(60,130,246,.12); border-left-color: var(--accent); }
|
||||
.log-line .log-anchor {
|
||||
flex: 0 0 18px;
|
||||
color: var(--text-dim);
|
||||
opacity: 0;
|
||||
font-weight: 700;
|
||||
@@ -812,11 +810,11 @@ body.bare main { max-width: none; }
|
||||
text-align: center;
|
||||
}
|
||||
.log-line:hover .log-anchor { opacity: 1; }
|
||||
.log-line .ln { 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 .log-ts { color: var(--text-dim); opacity: .75; }
|
||||
.log-line .log-stage { color: var(--text-dim); opacity: .75; margin-right: 4px; }
|
||||
.log-line .log-text { color: var(--text); white-space: pre-wrap; word-break: break-word; }
|
||||
.log-line .ln { flex: 0 0 40px; color: var(--text-dim); opacity: .6; text-align: right; user-select: none; }
|
||||
.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 { flex: 0 0 64px; color: var(--text-dim); opacity: .75; }
|
||||
.log-line .log-stage { flex: 0 0 auto; color: var(--text-dim); opacity: .75; }
|
||||
.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 .lvl { color: var(--warn); }
|
||||
.log-line.log-error .log-text { color: var(--danger); }
|
||||
|
||||
Reference in New Issue
Block a user