Hive
fix(server): runner log spacing
GitHub issue · Closed
What changed
- Tightened the runner job log layout by removing flex gaps between rendered log rows and applying explicit line-height inheritance to log cells.
- Rendered log messages inline in the HEEx template so
white-space: pre-wrappreserves only real log whitespace, not template indentation/newlines. - Added a LiveView hook that pins the log viewport to the newest line on initial load and preserves scroll position when older logs are prepended.
Why
The logs tab was showing excessive vertical space between individual log lines, and the initial view could land at the top of the loaded tail with the older-logs affordance in view. That made CI logs harder to scan and did not match the expected terminal-like behavior.
Root cause
The visible row spacing had two contributors: CSS gaps between log rows, and HEEx formatting inside the message <span>. Because log messages use white-space: pre-wrap, template newlines and indentation around the rendered message were preserved as real whitespace. The initial scroll behavior also relied on the browser’s default scroll position rather than explicitly pinning the log viewport to the tail.
Impact
Runner job logs now render as compact single-line rows, retain intentional log indentation, and open scrolled to the most recent line. Loading older logs keeps the user’s current position stable instead of jumping.
Validation
mix format lib/tuist_web/live/runner_job_live.html.heexgit diff --checkmix test test/tuist_web/live/runner_job_live_test.exs(16 tests, 0 failures)- Verified in the in-app browser against the local smoke log page: log rows measured at 17.4px high and the viewport settled at the bottom (
distanceFromBottom: 0).