Skip to content

Enable loading profiles without a circuit profile present#6618

Merged
Karakatiza666 merged 1 commit into
mainfrom
issue6558
Jul 13, 2026
Merged

Enable loading profiles without a circuit profile present#6618
Karakatiza666 merged 1 commit into
mainfrom
issue6558

Conversation

@Karakatiza666

@Karakatiza666 Karakatiza666 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Testing: manually tested behavior when switching between profiles with and without circuit profiles while on different tabs

image

Fix #6558

@mihaibudiu

Copy link
Copy Markdown
Contributor

Ideally the top window should be "minimized" since it's empty.

// Without a diagram the graph pane holds only its header and a short placeholder, so it should
// not reserve a large empty area above the SQL and analysis panels.
const graphPaneDefaultSize = $derived(hasProfile ? 55 : 15)
const graphPaneMinSize = $derived(hasProfile ? 20 : 8)

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.

what are these units?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Percentages of available height the panels span

{#if !sqlPanelFullHeight}
<PaneGroup direction="vertical" class="!overflow-visible h-full">
<Pane defaultSize={55} minSize={20} class="!overflow-visible">
<Pane defaultSize={graphPaneDefaultSize} minSize={graphPaneMinSize} class="!overflow-visible">

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.

still looks large in the picture

@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.

Nice work threading the optional-profile case through the viewer. The selectProfiles extraction plus its three new tests (no-circuit-profile kept, unrecognised files dropped, oldest-first sort) pin down the behavior cleanly, and gating ProfilerDiagram + the search input + the Top-nodes tab on hasProfile avoids any undefined access in the render path. Pane sizing switch (55/20 vs 15/8) via $derived reads well.

A few observations, none blocking:

  1. Unrelated formatting churn in Actions.svelte and status.spec.ts. Both files are pure line-wrap reformats that have nothing to do with optional circuit profiles. In a linear history this makes the "why did this line change?" archaeology harder later. Prefer a separate style/formatting commit next time (or drop from this PR).

  2. Removal of currentTab = 'Metrics' on node click (SupportBundleViewerLayout.svelte, around the onNodeClicked handler). Previously, inspecting a node auto-switched the analysis tab to Metrics; that side effect is now gone. Intentional? It's not mentioned in the PR description, and it changes UX for the has-profile path — orthogonal to the stated goal. Worth a line in the commit body if intentional, or restoration if not.

  3. $effect rewrite dropping the if (!diagram) return guard is fine because diagram?.showGlobalMetrics(true) is null-safe, but the effect now also resets tooltipData and lastNodeData on every profile change — a subtle behavior change beyond "make diagram optional". Fine, just worth calling out in the commit message.

  4. Commit message is a single-line subject for a change that touches nontrivial reactive behavior. Subject is descriptive so I won't block, but a short body explaining why the tooltip/lastNode reset was added and why the Metrics-tab auto-switch was removed would earn its place in main's linear history.

Approving — the core change is small, well-tested, and the manual test coverage across tabs is called out. Consider the notes above before the merge (especially #2).

@Karakatiza666

Karakatiza666 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

I adjusted the layout so that there is no space wasted at all

image

@Karakatiza666
Karakatiza666 added this pull request to the merge queue Jul 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 13, 2026
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
@Karakatiza666
Karakatiza666 enabled auto-merge July 13, 2026 16:51
@Karakatiza666
Karakatiza666 added this pull request to the merge queue Jul 13, 2026
Merged via the queue into main with commit 9e60cdd Jul 13, 2026
1 check passed
@Karakatiza666
Karakatiza666 deleted the issue6558 branch July 13, 2026 18:22
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.

[profiler] The profiler shouldn't refuse to open bundles without a circuit profile

3 participants