Skip to content

Live app logs jump back to the bottom every few seconds while you are reading older lines #242

Closed

Description

@nixfred

What happens

LogsSheet in web/src/AppSheet.tsx refetches logs every 5 s (refetchInterval: 5000) and runs:

useEffect(() => {
	if (el) el.scrollTop = el.scrollHeight
}, [el, logs.data])

logs.data is a new string whenever the app has written anything since the last poll, so the effect forces the view to the end each time. Anyone who scrolls up to read an earlier error is pulled back to the bottom within five seconds on a busy app, and the text they were reading moves out of view.

How to reproduce

Found by reading the code; I did not run it in a browser. Open Logs for an app that writes output continuously, scroll up a few screens and wait. The view jumps to the end at the next refresh. Expected: it only follows the end when the view was already at the bottom.

Suggested fix

Before updating, check whether the element was scrolled to (or near) the bottom, and only then set scrollTop.

Environment

Omarchy Server main (0786ba9, 0.9.50), Node 26.

Activity

  1. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #526, #342, #525, #524, #527, #133, #102, #777, #129, #239, #243, #236, #233, #232, #142, and #443 share the app store with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thanks @nixfred. Live logs stay where you are reading them unless you are already at the bottom. This ships in #876.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions