Commit 8ef7958
authored
fix: Improve timestamp alignment in build logs (#437)
### Problem
Each build-log row shows a relative elapsed time (e.g. 3.6s) followed by
the absolute time (e.g. 04:50:49.96 PM). The elapsed time has a variable
width, which caused two visible bugs:
1. Truncation — once elapsed time hit two digits (10.2s), the extra
character pushed the row past the fixed-width column and the absolute
time got clipped to ….
2. Misalignment — the variable-width elapsed time shifted the absolute
time to a different horizontal position on every row, so timestamps
didn't line up vertically and were hard to scan.
On top of that, the elapsed value itself jumped around:
formatDurationCompact emitted unpadded fields (2m 8s vs 2m 27s), so the
seconds column wandered between single- and double-digit widths.
### Solution
Gave the timestamp a stable, fixed-width layout so the whole column
lines up vertically and is easy to scan top-to-bottom. The elapsed time
and the absolute time now each occupy a fixed column, durations are
zero-padded so digits don't shift between rows, and the full timestamp
always fits without truncation.
<img width="290" height="441" alt="1"
src="https://github.com/user-attachments/assets/15dc06ad-fa68-41b8-892b-eb64564cabbf"
/>
<img width="287" height="310" alt="2"
src="https://github.com/user-attachments/assets/c63b26cb-3ae0-4789-ae0d-7053f00083a2"
/>1 parent 58abb98 commit 8ef7958
3 files changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
| 353 | + | |
| 354 | + | |
352 | 355 | | |
353 | 356 | | |
354 | 357 | | |
355 | | - | |
| 358 | + | |
356 | 359 | | |
357 | 360 | | |
358 | 361 | | |
359 | | - | |
| 362 | + | |
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
| |||
0 commit comments