Skip to content

Log viewer retains only the newest 1000 lines — early cf push output is unrecoverable in the UI #5537

Description

@nabramovitz

Current behavior

The shared LogViewerComponent behaves as a proper circular buffer: it retains the newest maxLogLines = 1000 rendered lines (src/frontend/packages/core/src/shared/components/log-viewer/log-viewer.component.ts:89), evicting the oldest DOM node as new output arrives (binElement() removes firstChild, ~lines 362-370; hold-at-cap behavior is covered by log-viewer.component.spec.ts:86-101). Collection never stops — long streams display live output indefinitely.

Both the app Log Stream tab and the Deploy Application (cf push) step 3 panel render through this component, so both inherit the 1000-line rolling window. The backends are pure uncapped relays in both paths (src/jetstream/plugins/cloudfoundry/cf_websocket_streams.go tail/firehose handlers; src/jetstream/plugins/cfapppush/deploy.go SocketWriter.Write), so the truncation is purely client-side rendering.

Problem

1000 lines is a small window and it is not configurable. For a cf push, the earliest output (staging/buildpack detection, the first error of a failed staging) frequently scrolls out of the retained window before the push finishes, and there is no way to get it back in the UI even though the backend streamed every line.

Proposed direction (for discussion)

  • Make the retention window configurable and/or raise the default for the deploy panel.
  • And/or keep the full received text in a lightweight string buffer behind a "download full log" affordance, independent of the 1000-line DOM window (the DOM cap exists for render performance and can stay).

Found while verifying that the log paths behave as circular buffers — they do; this issue is about the window size and the unrecoverable early lines, not the ring semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions