Skip to content

[web-console] Show a rendering progress bar over the ELK layout pass#6461

Merged
Karakatiza666 merged 1 commit into
mainfrom
issue-rendering-progress
Jun 13, 2026
Merged

[web-console] Show a rendering progress bar over the ELK layout pass#6461
Karakatiza666 merged 1 commit into
mainfrom
issue-rendering-progress

Conversation

@Karakatiza666

@Karakatiza666 Karakatiza666 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

When a profile zip is downloaded fro a pipeline in the profiler layout, the download progress bar is displayed, but after it is downloaded there is synchronous step of computing the diagram layout, which had no progress indication. THis PR fixes this - uses the same progress bar to indicate the layout is loading. There is no text that describes what's happening.

Testing: manual, added unit test

@Karakatiza666 Karakatiza666 requested a review from mihaibudiu June 13, 2026 00:18
// contract — the callback is optional, is invoked with a boolean, and pairs `true`
// (layout starts) with `false` (layout finishes).

describe('ProfilerCallbacks.onRenderingChange contract', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how useful this test is. The real question is whether this works properly with cytograph's background layout engine.

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean callback wiring with good edge-case handling (try/catch on synchronous throw, dispose() cleanup for in-flight layouts). Indeterminate bar is honest UX given ELK has no incremental progress signal. Test covers the contract nicely.

When a profile loads, the download progress bar masks the bundle fetch but the
subsequent ELK layout — which dominates first-render wall time on large
profiles — runs silently with no feedback. Reuse the same `Progress` strip used
for the download to surface the layout window; factor the bar into a snippet so
the two uses (download / render) share their entire markup.

Adds a new `onRenderingChange(rendering: boolean)` lifecycle callback to
`ProfilerCallbacks`, fired by `CytographRendering.initiateLayout` (true) and
`layoutComplete` (false). `SupportBundleViewerLayout` forwards it, and the
profile-viewer page drives an indeterminate progress bar from it (ELK has no
progress signal, so the bar shows movement without a percent).

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
@Karakatiza666 Karakatiza666 added this pull request to the merge queue Jun 13, 2026
@Karakatiza666 Karakatiza666 removed this pull request from the merge queue due to a manual request Jun 13, 2026
@Karakatiza666 Karakatiza666 added this pull request to the merge queue Jun 13, 2026
@Karakatiza666 Karakatiza666 force-pushed the issue-rendering-progress branch from 762498e to 00ddf0b Compare June 13, 2026 01:40
Merged via the queue into main with commit da73d90 Jun 13, 2026
@Karakatiza666 Karakatiza666 deleted the issue-rendering-progress branch June 13, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants