tilt-dev / tilt

Define your dev environment as code. For microservice apps on Kubernetes.
https://tilt.dev/
Apache License 2.0
7.41k stars 289 forks source link

Log pane scrolls to top when truncating #6381

Open jnystad opened 1 month ago

jnystad commented 1 month ago

Expected Behavior

Scroll (line) position is preserved (if possible), even when truncating logs.

Current Behavior

When LogStore triggers ensureMaxLength, and the log size is larger than max allowed, the LogUpdateAction.truncate is invoked, causing a resetRender in OverviewLogPane. This also resets the scroll position to start of logs when browsing the logs.

Steps to Reproduce

  1. Have a log pane open for something producing a lot of logs
  2. Scroll somewhere in the log stream (other than end and start)
  3. Wait until max log size is reached

Context

tilt doctor Output

$ tilt doctor
Tilt: v0.33.14, built 2024-05-15
System: linux-amd64
...

About Your Use Case

This makes log inspecting in tilt dashboard quite frustrating, and somewhat useless for containers with high log output.

Might be the cause of or related to #6096