Enable loading profiles without a circuit profile present#6618
Conversation
|
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) |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
still looks large in the picture
mythical-fred
left a comment
There was a problem hiding this comment.
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:
-
Unrelated formatting churn in
Actions.svelteandstatus.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). -
Removal of
currentTab = 'Metrics'on node click (SupportBundleViewerLayout.svelte, around theonNodeClickedhandler). 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. -
$effectrewrite dropping theif (!diagram) returnguard is fine becausediagram?.showGlobalMetrics(true)is null-safe, but the effect now also resetstooltipDataandlastNodeDataon every profile change — a subtle behavior change beyond "make diagram optional". Fine, just worth calling out in the commit message. -
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).
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>

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