@culpritsql/plan-viewer 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@culpritsql/plan-viewer",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Interactive React execution plan diagram, structural plan diff, and deadlock cycle graph components for SQL Server, PostgreSQL, MySQL, MariaDB, YugabyteDB, and SQLite.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -185,23 +185,31 @@ export function PlanDiffViewer({ a, b, diff, nameA, nameB, queryA, queryB, defau
185
185
  const nodeA = pickA != null ? nodesOf(a).find((n) => n.id === pickA) ?? null : null;
186
186
  const nodeB = pickB != null ? nodesOf(b).find((n) => n.id === pickB) ?? null : null;
187
187
  const v = verdict(diff);
188
- return (_jsxs("div", { className: `culprit-pv pv-diff cmp ${className ?? ""}`, "data-theme": theme && theme !== "system" ? theme : undefined, children: [_jsxs("div", { className: "compare-pickers", children: [toolbarStart ?? (_jsxs("div", { className: "pv-meta", children: [_jsx("span", { className: "side-badge", children: "A" }), " ", _jsx("b", { children: names[0] }), _jsx("span", { className: "muted", children: "vs" }), _jsx("span", { className: "side-badge", children: "B" }), " ", _jsx("b", { children: names[1] })] })), _jsx("span", { className: "spacer" }), _jsxs("span", { className: "seg", role: "group", "aria-label": t("ui.plan_compare.plan_view"), children: [_jsx("button", { type: "button", className: look === "diagram" ? "on" : "", onClick: () => setLook("diagram"), children: t("ui.plan_compare.diagram") }), _jsx("button", { type: "button", className: look === "tree" ? "on" : "", onClick: () => setLook("tree"), children: t("ui.plan_compare.tree") })] }), look === "diagram" && (_jsxs("button", { type: "button", className: `btn ghost cmp-sync ${sync ? "on" : ""}`, "aria-pressed": sync, title: sync ? t("ui.plan_compare.sync_on") : t("ui.plan_compare.sync_off"), onClick: () => setSync(!sync), children: [sync ? _jsx(Link2, { size: 13 }) : _jsx(Unlink2, { size: 13 }), " ", t("ui.plan_compare.sync")] })), toolbarActions] }), _jsxs("section", { className: "cmp-verdict", "aria-live": "polite", children: [_jsxs("p", { className: "cmp-lead", children: [_jsx("span", { className: `cmp-pill ${v.tone}`, children: v.text }), diff.headlines[0]] }), diff.headlines.length > 1 && (_jsx("ul", { className: "cmp-more", children: diff.headlines.slice(1).map((h, i) => (_jsx("li", { children: h }, i))) })), _jsxs("div", { className: "cmp-figures", children: [_jsx(Figure, { label: t("ui.plan_compare.figure.cost", { plan: names[0] }), value: diff.cost_a == null ? t("ui.plan_compare.unavailable") : formatCost(diff.cost_a) }), _jsx(Figure, { label: t("ui.plan_compare.figure.cost", { plan: names[1] }), value: diff.cost_b == null ? t("ui.plan_compare.unavailable") : formatCost(diff.cost_b), tone: v.tone }), diff.time_a_ms != null && diff.time_b_ms != null && (_jsxs(_Fragment, { children: [_jsx(Figure, { label: t("ui.plan_compare.figure.time", { plan: names[0] }), value: duration(diff.time_a_ms) }), _jsx(Figure, { label: t("ui.plan_compare.figure.time", { plan: names[1] }), value: duration(diff.time_b_ms), tone: v.tone })] })), _jsx(Figure, { label: t("ui.plan_compare.figure.operators"), value: `${nodesOf(a).length} → ${nodesOf(b).length}` }), _jsx(Figure, { label: t("ui.plan_compare.figure.regions"), value: String(diff.regions.length) })] })] }), _jsxs("section", { className: "cmp-panel", children: [_jsxs("div", { className: "cmp-tabs", role: "tablist", "aria-label": t("ui.plan_compare.details"), onKeyDown: tabListKeys, children: [_jsx(TabButton, { id: "changes", tab: tab, onPick: setTab, label: t("ui.plan_compare.tab.changes"), count: diff.changes.length }), _jsx(TabButton, { id: "why", tab: tab, onPick: setTab, label: t("ui.plan_compare.tab.why"), count: diff.scenarios.length }), _jsx(TabButton, { id: "props", tab: tab, onPick: setTab, label: t("ui.plan_compare.tab.props") })] }), _jsxs("div", { className: "cmp-body", role: "tabpanel", children: [tab === "changes" &&
188
+ return (_jsxs("div", { className: `culprit-pv pv-diff cmp ${className ?? ""}`, "data-theme": theme && theme !== "system" ? theme : undefined, children: [(toolbarStart || toolbarActions || names[0] || names[1]) && (_jsxs("div", { className: "compare-pickers", children: [toolbarStart ?? (_jsxs("div", { className: "pv-meta", children: [_jsx("span", { className: "side-badge", children: "A" }), " ", _jsx("b", { children: names[0] }), _jsx("span", { className: "muted", children: "vs" }), _jsx("span", { className: "side-badge", children: "B" }), " ", _jsx("b", { children: names[1] })] })), toolbarActions && (_jsxs(_Fragment, { children: [_jsx("span", { className: "spacer" }), toolbarActions] }))] })), _jsxs("section", { className: "cmp-verdict", "aria-live": "polite", children: [_jsxs("p", { className: "cmp-lead", children: [_jsx("span", { className: `cmp-pill ${v.tone}`, children: v.text }), diff.headlines[0]] }), diff.headlines.length > 1 && (_jsx("ul", { className: "cmp-more", children: diff.headlines.slice(1).map((h, i) => (_jsx("li", { children: h }, i))) })), _jsxs("div", { className: "cmp-figures", children: [_jsx(Figure, { label: t("ui.plan_compare.figure.cost", { plan: names[0] }), value: diff.cost_a == null ? t("ui.plan_compare.unavailable") : formatCost(diff.cost_a) }), _jsx(Figure, { label: t("ui.plan_compare.figure.cost", { plan: names[1] }), value: diff.cost_b == null ? t("ui.plan_compare.unavailable") : formatCost(diff.cost_b), tone: v.tone }), diff.time_a_ms != null && diff.time_b_ms != null && (_jsxs(_Fragment, { children: [_jsx(Figure, { label: t("ui.plan_compare.figure.time", { plan: names[0] }), value: duration(diff.time_a_ms) }), _jsx(Figure, { label: t("ui.plan_compare.figure.time", { plan: names[1] }), value: duration(diff.time_b_ms), tone: v.tone })] })), _jsx(Figure, { label: t("ui.plan_compare.figure.operators"), value: `${nodesOf(a).length} → ${nodesOf(b).length}` }), _jsx(Figure, { label: t("ui.plan_compare.figure.regions"), value: String(diff.regions.length) })] })] }), _jsxs("section", { className: "cmp-panel", children: [_jsxs("div", { className: "cmp-tabs", role: "tablist", "aria-label": t("ui.plan_compare.details"), onKeyDown: tabListKeys, children: [_jsx(TabButton, { id: "changes", tab: tab, onPick: setTab, label: t("ui.plan_compare.tab.changes"), count: diff.changes.length }), _jsx(TabButton, { id: "why", tab: tab, onPick: setTab, label: t("ui.plan_compare.tab.why"), count: diff.scenarios.length }), _jsx(TabButton, { id: "props", tab: tab, onPick: setTab, label: t("ui.plan_compare.tab.props") })] }), _jsxs("div", { className: "cmp-body", role: "tabpanel", children: [tab === "changes" &&
189
189
  (diff.changes.length === 0 ? (_jsxs("div", { className: "cmp-empty", children: [_jsx(CircleCheck, { size: 18 }), _jsxs("div", { children: [_jsx("b", { children: diff.same_shape ? t("ui.plan_compare.same_steps") : t("ui.plan_compare.minor_steps") }), _jsx("div", { className: "muted", children: t("ui.plan_compare.same_steps_detail") })] })] })) : (_jsx("ul", { className: "cmp-changes", children: diff.changes.map((c, i) => (_jsx("li", { children: _jsxs("button", { type: "button", className: `cmp-change ${active === i ? "on" : ""}`, onClick: () => pickChange(i), children: [_jsx("span", { className: `cmp-tag ${CHANGE_TONE[c.kind]}`, children: changeLabel(c.kind) }), _jsxs("span", { className: "cmp-change-text", children: [_jsx("span", { className: "cmp-title", children: c.title }), c.detail && _jsx("span", { className: "cmp-detail", children: c.detail })] })] }) }, i))) }))), tab === "why" &&
190
190
  (diff.scenarios.length === 0 ? (_jsxs("div", { className: "cmp-empty", children: [_jsx(CircleCheck, { size: 18 }), _jsxs("div", { children: [_jsx("b", { children: t("ui.plan_compare.same_conditions") }), _jsx("div", { className: "muted", children: t("ui.plan_compare.same_conditions_detail") })] })] })) : (_jsx("ul", { className: "cmp-scenarios", children: diff.scenarios.map((s, i) => (_jsxs("li", { className: "cmp-scenario", children: [_jsx("span", { className: "cmp-scenario-icon", "aria-hidden": true, children: SCENARIO_ICON[s.kind] }), _jsxs("div", { children: [_jsx("div", { className: "cmp-scenario-kind", children: scenarioLabel(s.kind) }), _jsx("div", { className: "cmp-title", children: s.title }), s.detail && _jsx("div", { className: "cmp-detail wrap", children: s.detail }), (s.a != null || s.b != null) && (_jsx("button", { type: "button", className: "link", onClick: () => {
191
191
  setPickA(s.a ?? (s.b != null ? view.bToA.get(s.b) ?? null : null));
192
192
  setPickB(s.b ?? (s.a != null ? view.aToB.get(s.a) ?? null : null));
193
193
  setTab("props");
194
- }, children: t("ui.plan_compare.show_step") }))] })] }, i))) }))), tab === "props" && _jsx(PropsCompare, { a: nodeA, b: nodeB, planA: a, planB: b, names: names })] })] }), _jsxs("div", { className: "cmp-legend", "aria-hidden": true, children: [_jsxs("span", { className: "cmp-key", children: [_jsx("i", { className: "tint" }), " ", t("ui.plan_compare.legend.same")] }), _jsxs("span", { className: "cmp-key", children: [_jsx("i", { className: "changed" }), " ", t("ui.plan_compare.legend.changed")] }), _jsxs("span", { className: "cmp-key", children: [_jsx("i", { className: "only" }), " ", t("ui.plan_compare.legend.only")] })] }), _jsxs("div", { className: "compare-sides", children: [_jsx(Side, { label: "A", name: names[0], plan: a, innerRef: sideA, children: look === "diagram" ? (_jsx(PlanDiagram, { plan: a, query: queryA, marks: view.marksA, tints: view.tintsA, selectedId: pickA, initialZoom: 0.8, zoom: sync ? zoom : undefined, onZoomChange: setZoom, showProps: false, onSelect: (id) => {
194
+ }, children: t("ui.plan_compare.show_step") }))] })] }, i))) }))), tab === "props" && _jsx(PropsCompare, { a: nodeA, b: nodeB, planA: a, planB: b, names: names })] })] }), _jsxs("div", { className: "cmp-canvas-bar", children: [_jsxs("div", { className: "cmp-canvas-controls", children: [_jsxs("span", { className: "seg", role: "group", "aria-label": t("ui.plan_compare.plan_view"), children: [_jsx("button", { type: "button", className: look === "diagram" ? "on" : "", onClick: () => setLook("diagram"), children: t("ui.plan_compare.diagram") }), _jsx("button", { type: "button", className: look === "tree" ? "on" : "", onClick: () => setLook("tree"), children: t("ui.plan_compare.tree") })] }), look === "diagram" && (_jsxs("button", { type: "button", className: `btn ghost cmp-sync ${sync ? "on" : ""}`, "aria-pressed": sync, title: sync ? t("ui.plan_compare.sync_on") : t("ui.plan_compare.sync_off"), onClick: () => setSync(!sync), children: [sync ? _jsx(Link2, { size: 13 }) : _jsx(Unlink2, { size: 13 }), " ", t("ui.plan_compare.sync")] }))] }), look === "diagram" && (_jsxs("div", { className: "cmp-legend", "aria-hidden": true, children: [_jsxs("span", { className: "cmp-key", children: [_jsx("i", { className: "tint" }), " ", t("ui.plan_compare.legend.same")] }), _jsxs("span", { className: "cmp-key", children: [_jsx("i", { className: "changed" }), " ", t("ui.plan_compare.legend.changed")] }), _jsxs("span", { className: "cmp-key", children: [_jsx("i", { className: "only" }), " ", t("ui.plan_compare.legend.only")] })] }))] }), _jsxs("div", { className: "compare-sides", children: [_jsx(Side, { label: "A", name: names[0], plan: a, innerRef: sideA, children: look === "diagram" ? (_jsx(PlanDiagram, { plan: a, query: queryA, marks: view.marksA, tints: view.tintsA, selectedId: pickA, initialZoom: 0.8, zoom: sync ? zoom : undefined, onZoomChange: setZoom, showProps: false, onSelect: (id) => {
195
195
  setActive(null);
196
196
  setPickA(id);
197
197
  setPickB(view.aToB.get(id) ?? null);
198
198
  setTab("props");
199
- } })) : (_jsx(PlanView, { plan: a, query: queryA, selectedId: pickA })) }), _jsx(Side, { label: "B", name: names[1], plan: b, innerRef: sideB, children: look === "diagram" ? (_jsx(PlanDiagram, { plan: b, query: queryB, marks: view.marksB, tints: view.tintsB, selectedId: pickB, initialZoom: 0.8, zoom: sync ? zoom : undefined, onZoomChange: setZoom, showProps: false, onSelect: (id) => {
199
+ } })) : (_jsx(PlanView, { plan: a, query: queryA, selectedId: pickA, onSelect: (id) => {
200
+ setActive(null);
201
+ setPickA(id);
202
+ setPickB(view.aToB.get(id) ?? null);
203
+ } })) }), _jsx(Side, { label: "B", name: names[1], plan: b, innerRef: sideB, children: look === "diagram" ? (_jsx(PlanDiagram, { plan: b, query: queryB, marks: view.marksB, tints: view.tintsB, selectedId: pickB, initialZoom: 0.8, zoom: sync ? zoom : undefined, onZoomChange: setZoom, showProps: false, onSelect: (id) => {
200
204
  setActive(null);
201
205
  setPickB(id);
202
206
  setPickA(view.bToA.get(id) ?? null);
203
207
  setTab("props");
204
- } })) : (_jsx(PlanView, { plan: b, query: queryB, selectedId: pickB })) })] })] }));
208
+ } })) : (_jsx(PlanView, { plan: b, query: queryB, selectedId: pickB, onSelect: (id) => {
209
+ setActive(null);
210
+ setPickB(id);
211
+ setPickA(view.bToA.get(id) ?? null);
212
+ } })) })] })] }));
205
213
  }
206
214
  function TabButton({ id, tab, onPick, label, count: n }) {
207
215
  return (_jsxs("button", { type: "button", role: "tab", "aria-selected": tab === id, tabIndex: tab === id ? 0 : -1, className: `cmp-tab ${tab === id ? "on" : ""}`, onClick: () => onPick(id), children: [label, n != null && _jsx("span", { className: "cmp-count", children: n })] }));
@@ -12,10 +12,11 @@ export declare function LookToggle({ look, onChange, hasRaw, }: {
12
12
  * A plan with everything Culprit knows about it: the insights first (what's wrong, how to fix it), then the plan in the
13
13
  * chosen view. Picking an insight selects its operator in whichever view is showing, and back.
14
14
  */
15
- export declare function PlanSurface({ plan, query, focus, look, badge, }: {
15
+ export declare function PlanSurface({ plan, query, focus, look, onLookChange, badge, }: {
16
16
  plan: Plan;
17
17
  query?: QueryStat | null;
18
18
  focus?: number | null;
19
19
  look: PlanLook;
20
+ onLookChange?: (look: PlanLook) => void;
20
21
  badge?: string;
21
22
  }): import("react").JSX.Element;
@@ -39,9 +39,9 @@ export function LookToggle({ look, onChange, hasRaw = true, }) {
39
39
  * A plan with everything Culprit knows about it: the insights first (what's wrong, how to fix it), then the plan in the
40
40
  * chosen view. Picking an insight selects its operator in whichever view is showing, and back.
41
41
  */
42
- export function PlanSurface({ plan, query, focus, look, badge, }) {
42
+ export function PlanSurface({ plan, query, focus, look, onLookChange, badge, }) {
43
43
  const [selected, setSelected] = useState(null);
44
- return (_jsxs("div", { className: "culprit-pv plan-surface", children: [plan.facts.constants_redacted && _jsx("p", { className: "notice", children: t("ui.plan_surface.redacted") }), !plan.insights?.note && plan.kind === "generic" && (_jsx(PlanAssessmentNotes, { note: [t("ui.plan_surface.generic"), t(genericPlanContextKey(plan.engine)), t("ui.plan_surface.generic_history")].filter(Boolean).join(" ") })), _jsx(PlanInsights, { plan: plan, selectedNode: selected, onSelectNode: setSelected }), _jsx(DocdbWork, { metrics: plan.facts.docdb, basis: "execution" }), _jsx(PlanTypeSchema, { plan: plan }), look === "diagram" && _jsx(PlanDiagram, { plan: plan, query: query, focus: focus, selectedId: selected, onSelect: setSelected, badge: badge }), look === "tree" && _jsx(PlanView, { plan: plan, query: query, focus: focus, selectedId: selected, onSelect: setSelected }), look === "operations" && _jsx(OperationsPanel, { plan: plan, query: query, focus: focus, selected: selected ?? focus ?? null, onSelect: setSelected }), look === "objects" && _jsx(ObjectsPanel, { plan: plan, query: query, focus: focus, selected: selected ?? focus ?? null, onSelect: setSelected }), look === "raw" && _jsx(PlanRaw, { plan: plan })] }));
44
+ return (_jsxs("div", { className: "culprit-pv plan-surface", children: [plan.facts.constants_redacted && _jsx("p", { className: "notice", children: t("ui.plan_surface.redacted") }), !plan.insights?.note && plan.kind === "generic" && (_jsx(PlanAssessmentNotes, { note: [t("ui.plan_surface.generic"), t(genericPlanContextKey(plan.engine)), t("ui.plan_surface.generic_history")].filter(Boolean).join(" ") })), _jsx(PlanInsights, { plan: plan, selectedNode: selected, onSelectNode: setSelected }), _jsx(DocdbWork, { metrics: plan.facts.docdb, basis: "execution" }), _jsx(PlanTypeSchema, { plan: plan }), onLookChange && (_jsx("div", { className: "pv-canvas-bar", children: _jsx(LookToggle, { look: look, onChange: onLookChange, hasRaw: Boolean(plan.raw) }) })), look === "diagram" && _jsx(PlanDiagram, { plan: plan, query: query, focus: focus, selectedId: selected, onSelect: setSelected, badge: badge }), look === "tree" && _jsx(PlanView, { plan: plan, query: query, focus: focus, selectedId: selected, onSelect: setSelected }), look === "operations" && _jsx(OperationsPanel, { plan: plan, query: query, focus: focus, selected: selected ?? focus ?? null, onSelect: setSelected }), look === "objects" && _jsx(ObjectsPanel, { plan: plan, query: query, focus: focus, selected: selected ?? focus ?? null, onSelect: setSelected }), look === "raw" && _jsx(PlanRaw, { plan: plan })] }));
45
45
  }
46
46
  function OperationsPanel({ plan, query, focus, selected, onSelect, }) {
47
47
  const shares = useMemo(() => planShares(plan, query), [plan, query]);
package/pkg/PlanView.js CHANGED
@@ -145,10 +145,10 @@ export function PlanView({ plan, query, focus, compact, selectedId, onSelect, sh
145
145
  e.preventDefault();
146
146
  toggle(node.id);
147
147
  }
148
- }, children: [_jsxs("span", { className: "label", children: [_jsx("span", { className: "indent", style: { width: Math.min(depth, 12) * 12 } }), _jsx("span", { className: "twisty", "aria-hidden": true, onClick: (e) => {
148
+ }, children: [_jsxs("span", { className: "label", children: [_jsx("span", { className: "indent", style: { "--depth": Math.min(depth, 12) } }), _jsx("span", { className: "twisty", "aria-hidden": true, onClick: (e) => {
149
149
  e.stopPropagation();
150
150
  toggle(node.id);
151
- }, children: node.children.length > 0 ? expanded.has(node.id) ? _jsx(ChevronDown, { size: 14 }) : _jsx(ChevronRight, { size: 14 }) : null }), _jsxs("span", { className: "lines", children: [_jsxs("span", { className: "line1", children: [_jsx("span", { className: "op-icon", children: _jsx(OpIcon, { node: node, size: 13 }) }), node.id === hottest?.id && (share ?? 0) >= 0.05 && _jsx(Flame, { size: 13, color: "var(--heat-4)", className: "flame" }), _jsx("span", { className: "opname", children: node.op }), flagged.get(node.id)?.[0] && (_jsx("span", { className: `tree-flag ${flagged.get(node.id)[0].severity}`, title: flagged.get(node.id).map((i) => i.title).join("\n"), children: flagged.get(node.id).length })), node.object && (_jsxs("span", { className: "obj", children: [node.object, node.index ? ` · ${node.index}` : ""] }))] }), (node.warnings.length > 0 || node.predicate || node.seek_predicate) && (_jsxs("span", { className: "line2", children: [node.warnings.map((w) => (_jsx("span", { className: "warn-chip", children: warningLabel(w) }, w))), (node.seek_predicate || node.predicate) && (_jsx("span", { className: "pred", children: node.seek_predicate ? predicateLabel("seek", node.seek_predicate) : predicateLabel("filter", node.predicate ?? "") }))] }))] })] }), _jsx("span", { className: "rows", children: node.act_rows != null ? (_jsxs(_Fragment, { children: [rowsText(estRowsForRuns(plan, node)), " ", _jsx("span", { className: "arrow", children: "\u2192" }), " ", rowsText(node.act_rows), mis != null && (_jsx("span", { className: "mis", children: mis < 0 ? t("ui.plan_view.over", { times: count(Math.abs(mis)) }) : t("ui.plan_view.under", { times: count(Math.abs(mis)) }) }))] })) : (weighed && rowsText(estRows(plan, node))) }), _jsx("span", { className: "cost", children: weighed &&
151
+ }, children: node.children.length > 0 ? expanded.has(node.id) ? _jsx(ChevronDown, { size: 14 }) : _jsx(ChevronRight, { size: 14 }) : null }), _jsxs("span", { className: "lines", children: [_jsxs("span", { className: "line1", children: [_jsx("span", { className: "op-icon", children: _jsx(OpIcon, { node: node, size: 13 }) }), node.id === hottest?.id && (share ?? 0) >= 0.05 && _jsx(Flame, { size: 13, color: "var(--heat-4)", className: "flame" }), _jsx("span", { className: "opname", title: node.op, children: node.op }), flagged.get(node.id)?.[0] && (_jsx("span", { className: `tree-flag ${flagged.get(node.id)[0].severity}`, title: flagged.get(node.id).map((i) => i.title).join("\n"), children: flagged.get(node.id).length })), node.object && (_jsxs("span", { className: "obj", title: node.index ? `${node.object} · ${node.index}` : node.object, children: [node.object, node.index ? ` · ${node.index}` : ""] }))] }), (node.warnings.length > 0 || node.predicate || node.seek_predicate) && (_jsxs("span", { className: "line2", children: [node.warnings.map((w) => (_jsx("span", { className: "warn-chip", children: warningLabel(w) }, w))), (node.seek_predicate || node.predicate) && (_jsx("span", { className: "pred", children: node.seek_predicate ? predicateLabel("seek", node.seek_predicate) : predicateLabel("filter", node.predicate ?? "") }))] }))] })] }), _jsx("span", { className: "rows", children: node.act_rows != null ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "rows-pair", children: [rowsText(estRowsForRuns(plan, node)), " ", _jsx("span", { className: "arrow", children: "\u2192" }), " ", rowsText(node.act_rows)] }), mis != null && (_jsx("span", { className: "mis", children: mis < 0 ? t("ui.plan_view.over", { times: count(Math.abs(mis)) }) : t("ui.plan_view.under", { times: count(Math.abs(mis)) }) }))] })) : (weighed && rowsText(estRows(plan, node))) }), _jsx("span", { className: "cost", children: weighed &&
152
152
  (share != null ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "num", children: percent(share) }), _jsx("span", { className: "heat", children: _jsx("span", { style: { width: `${Math.max(2, Math.min(100, share * 100))}%`, background: heatVar(share) } }) })] })) : (_jsx("span", { className: "num muted", title: reason(node) ?? undefined, children: "-" }))) })] }, node.id));
153
153
  }) }), weighed && note && _jsx("div", { className: "muted", style: { fontSize: 12, padding: "6px 10px" }, children: note }), selectedNode && showProps && (_jsx(NodeDetails, { plan: plan, estimates: weighed, actual: plan.kind === "actual", node: selectedNode, share: shareOf(selectedNode), subtreeShare: shares.statedSubtree.get(selectedNode.id) ?? null, noShare: shares.basis === "cost" ? reason(selectedNode) : null, insights: flagged.get(selectedNode.id) }))] }));
154
154
  }
package/pkg/PlanViewer.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { planEngineName, planKindLabel } from "./host.js";
4
- import { LookToggle, PlanSurface } from "./PlanSurface.js";
4
+ import { PlanSurface } from "./PlanSurface.js";
5
5
  import { Sql } from "./Sql.js";
6
6
  /**
7
7
  * Drop-in execution plan viewer: bottleneck insights, measured-run summary, cost/time strip,
@@ -15,5 +15,5 @@ export function PlanViewer({ plan, query, focus, look: controlledLook, defaultLo
15
15
  setInternalLook(next);
16
16
  onLookChange?.(next);
17
17
  };
18
- return (_jsxs("div", { className: `culprit-pv pv-root ${className ?? ""}`, "data-theme": theme && theme !== "system" ? theme : undefined, children: [showToolbar && (_jsxs("div", { className: "pv-toolbar", children: [_jsxs("div", { className: "pv-meta", children: [title && _jsx("strong", { className: "pv-title", children: title }), _jsx("span", { className: "tag", children: planEngineName(plan) }), _jsx("span", { className: "muted", children: planKindLabel(plan) })] }), _jsx("span", { className: "spacer" }), _jsx(LookToggle, { look: look, onChange: handleLookChange, hasRaw: Boolean(plan.raw) }), toolbarActions] })), showStatement && plan.statement && (_jsx("div", { className: `plans-sql ${sqlOpen ? "open" : ""}`, onClick: () => setSqlOpen((v) => !v), title: sqlOpen ? "Click to collapse SQL" : "Click to expand SQL", children: _jsx(Sql, { text: plan.statement }) })), _jsx(PlanSurface, { plan: plan, query: query, focus: focus, look: look })] }));
18
+ return (_jsxs("div", { className: `culprit-pv pv-root ${className ?? ""}`, "data-theme": theme && theme !== "system" ? theme : undefined, children: [showToolbar && (_jsxs("div", { className: "pv-toolbar", children: [_jsxs("div", { className: "pv-meta", children: [title && _jsx("strong", { className: "pv-title", children: title }), _jsx("span", { className: "tag", children: planEngineName(plan) }), _jsx("span", { className: "muted", children: planKindLabel(plan) })] }), toolbarActions && (_jsxs(_Fragment, { children: [_jsx("span", { className: "spacer" }), toolbarActions] }))] })), showStatement && plan.statement && (_jsx("div", { className: `plans-sql ${sqlOpen ? "open" : ""}`, onClick: () => setSqlOpen((v) => !v), title: sqlOpen ? "Click to collapse SQL" : "Click to expand SQL", children: _jsx(Sql, { text: plan.statement }) })), _jsx(PlanSurface, { plan: plan, query: query, focus: focus, look: look, onLookChange: showToolbar ? handleLookChange : undefined })] }));
19
19
  }
@@ -2832,7 +2832,7 @@ DEALINGS IN THE SOFTWARE.
2832
2832
 
2833
2833
  ----------------------------------------------------------------------------------------------------
2834
2834
  MIT License
2835
- Used by: cookie 0.18.2
2835
+ Used by: cookie 0.18.3
2836
2836
 
2837
2837
  Copyright (c) 2017 Sergio Benitez
2838
2838
  Copyright (c) 2014 Alex Crichton
@@ -8,7 +8,7 @@
8
8
  "embedded_catalog": {
9
9
  "language": "en",
10
10
  "message_count": 432,
11
- "source_en_sha256": "6001e5746f0ee4f3fdd3f41d5aa1ac02f230f5d626635094b5130ae60ef1c0f8",
11
+ "source_en_sha256": "808d69f8b87b5f3f74fbf5074f91e21462bad19438d1bb58a785c1b490813639",
12
12
  "engines_sha256": "248786d554da4879147ab3aabb6ca4cbeb33f113cc1554afd5a43a5371aa7844"
13
13
  },
14
14
  "models": [
@@ -44,8 +44,8 @@
44
44
  },
45
45
  {
46
46
  "name": "CollectionTarget",
47
- "source_sha256": "6455ac83e7cdf121ab4736b99db8a4cecc2f90c8d02a85357c5562b763e6fc74",
48
- "package_sha256": "7cd0d5997416f67361bffa0ac52d0efdbeb9f02bbbeaff01acd809e907e676ab"
47
+ "source_sha256": "3eb165bc2b0022238c79bf7c1699f455fddd6f776b28b0ee880583ea952cbc5e",
48
+ "package_sha256": "3658c40df8f47f9fed380dc36a1aae77e89e9d2c9138f09d4a4e750e0f549c58"
49
49
  },
50
50
  {
51
51
  "name": "CompilationMemory",
@@ -57,6 +57,11 @@
57
57
  "source_sha256": "1a9e71f35fe9bf884c70ee89e3ea0328a00bdf23d6dda30f600e59289904a918",
58
58
  "package_sha256": "83bb4a6a7199abe4b95f4ef5b733e4aa3349437b71421db2c8deb488fc83062f"
59
59
  },
60
+ {
61
+ "name": "ConfiguredConnectionIdentity",
62
+ "source_sha256": "9f80714258513488cbe64c2b89d7a208fe039024bff3d356330a952b31a8d83a",
63
+ "package_sha256": "3a2b6e58f0f7753c1350abd7ad9cf2d1e9653f2e8d0ff5af7de0c9824c1eb53f"
64
+ },
60
65
  {
61
66
  "name": "Connect",
62
67
  "source_sha256": "1eaf8bd56f38fd48276e8f242a0f4ea0844f90b8cfd9aed2f07da112be1e0750",
@@ -808,10 +813,10 @@
808
813
  "sha256": "75afa10691a6ec75b72be47b341a15b87086556464a1245b9fcce7dd15d384f3"
809
814
  },
810
815
  "PlanDiffViewer.js": {
811
- "bytes": 23311,
812
- "gzip_bytes": 5650,
813
- "brotli_bytes": 4999,
814
- "sha256": "0501ebea2e554d223b1fd388aa2ffb4de3a92c2d43519dfe9d5d436bf080fc0f"
816
+ "bytes": 24004,
817
+ "gzip_bytes": 5725,
818
+ "brotli_bytes": 5065,
819
+ "sha256": "beeb10800e59e948bb8bd34d56592a8848788134a9a7660e6e2de7cca5c752a0"
815
820
  },
816
821
  "PlanInsights.js": {
817
822
  "bytes": 8846,
@@ -838,10 +843,10 @@
838
843
  "sha256": "cdee9bf08c8f788f300cb7b9b9552d6b9e985f32df4bd751ae23d5be4fb0bc03"
839
844
  },
840
845
  "PlanSurface.js": {
841
- "bytes": 7327,
842
- "gzip_bytes": 1953,
843
- "brotli_bytes": 1712,
844
- "sha256": "6d61fcc80fd3337f8d634d11f6eefdbf7091c2286ace4cc078a6df94624e1f1a"
846
+ "bytes": 7499,
847
+ "gzip_bytes": 2003,
848
+ "brotli_bytes": 1765,
849
+ "sha256": "11819463093bef50073ed7facdcce187fd2ef75039c4c92937dbeadfd6e02562"
845
850
  },
846
851
  "PlanTypeSchema.js": {
847
852
  "bytes": 7847,
@@ -850,16 +855,16 @@
850
855
  "sha256": "756b631695ceefc37e429dd4f010eefd36fb11157ba9f5e15bc1274f3067cd14"
851
856
  },
852
857
  "PlanView.js": {
853
- "bytes": 12964,
854
- "gzip_bytes": 3610,
855
- "brotli_bytes": 3230,
856
- "sha256": "79e80742c920cd476883a991f3c079324da45f9ff5e51b9a6f58804344624db3"
858
+ "bytes": 13103,
859
+ "gzip_bytes": 3641,
860
+ "brotli_bytes": 3255,
861
+ "sha256": "ef27bd3bdffaf8ef49daec10fc23263af901f76913301e3cdf5e6885e60c9392"
857
862
  },
858
863
  "PlanViewer.js": {
859
- "bytes": 1871,
860
- "gzip_bytes": 804,
861
- "brotli_bytes": 692,
862
- "sha256": "70f9ad291b83c7be9111e7fee1caab62647dec3da61fccc1cd96eecb49e307be"
864
+ "bytes": 1905,
865
+ "gzip_bytes": 797,
866
+ "brotli_bytes": 679,
867
+ "sha256": "bf133eebfb3ff5b634d5db3b97335d08b9956ee07348fd9d77b49b9f8355dc05"
863
868
  },
864
869
  "Prose.js": {
865
870
  "bytes": 405,
@@ -892,10 +897,10 @@
892
897
  "sha256": "dd328e831ec1f8326be582cdfe1922b8e34016f9e09fc6e140393cd557115622"
893
898
  },
894
899
  "styles.css": {
895
- "bytes": 65332,
896
- "gzip_bytes": 10472,
897
- "brotli_bytes": 9110,
898
- "sha256": "eadedef8ecffa91a69ce1c7c2dd01176bd675954e1ced1aebf146d26b4503738"
900
+ "bytes": 68954,
901
+ "gzip_bytes": 11116,
902
+ "brotli_bytes": 9622,
903
+ "sha256": "d4024466037b864c2c0bc4d5b7f6b81a5f2131a0f16175bce05b9faf7908fcf0"
899
904
  },
900
905
  "types.js": {
901
906
  "bytes": 11,
@@ -1,5 +1,6 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ConfiguredConnectionIdentity } from "./ConfiguredConnectionIdentity.js";
2
3
  import type { DatabaseIdentity } from "./DatabaseIdentity.js";
3
4
  import type { SharedResourceIdentity } from "./SharedResourceIdentity.js";
4
5
 
5
- export type CollectionTarget = { "scope": "database", "identity": DatabaseIdentity } | { "scope": "shared", "identity": SharedResourceIdentity };
6
+ export type CollectionTarget = { "scope": "database", "identity": DatabaseIdentity } | { "scope": "shared", "identity": SharedResourceIdentity } | { "scope": "configured-connection", "identity": ConfiguredConnectionIdentity };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Engine } from "./Engine.js";
3
+
4
+ /**
5
+ * Frozen saved metadata only. This target establishes no database, replica, session or native member identity.
6
+ */
7
+ export type ConfiguredConnectionIdentity = { id: string, route_revision: string, name: string, engine: Engine, };
package/pkg/styles.css CHANGED
@@ -347,9 +347,35 @@
347
347
 
348
348
  .culprit-pv.pv-root,
349
349
  .culprit-pv.pv-diff {
350
+ container: pv-shell / inline-size;
350
351
  display: flex;
351
352
  flex-direction: column;
352
353
  gap: 12px;
354
+ padding: var(--pv-pad, 14px 16px 18px);
355
+ }
356
+
357
+ @container pv-shell (max-width: 520px) {
358
+ .culprit-pv.pv-root,
359
+ .culprit-pv.pv-diff {
360
+ padding: var(--pv-pad, 10px 12px 14px);
361
+ gap: 10px;
362
+ }
363
+ }
364
+
365
+ @media (max-width: 560px) {
366
+ .culprit-pv.pv-root,
367
+ .culprit-pv.pv-diff {
368
+ padding: var(--pv-pad, 10px 12px 14px);
369
+ gap: 10px;
370
+ }
371
+ }
372
+
373
+ .culprit-pv .pv-canvas-bar {
374
+ display: flex;
375
+ align-items: center;
376
+ justify-content: space-between;
377
+ flex-wrap: wrap;
378
+ gap: 8px 14px;
353
379
  }
354
380
 
355
381
  .culprit-pv .pv-toolbar {
@@ -571,6 +597,9 @@
571
597
 
572
598
  .culprit-pv .seg {
573
599
  display: inline-flex;
600
+ flex-wrap: wrap;
601
+ gap: 2px;
602
+ max-width: 100%;
574
603
  padding: 2px;
575
604
  border-radius: 7px;
576
605
  background: var(--sunken);
@@ -1226,10 +1255,13 @@
1226
1255
 
1227
1256
  .culprit-pv.plan,
1228
1257
  .culprit-pv .plan {
1258
+ container: plan-box / inline-size;
1229
1259
  border: 1px solid var(--border);
1230
1260
  border-radius: var(--radius);
1231
1261
  overflow: hidden;
1232
1262
  background: var(--surface);
1263
+ --plan-cols: minmax(0, 1fr) 164px 86px;
1264
+ --indent-step: 12px;
1233
1265
  }
1234
1266
 
1235
1267
  .culprit-pv .plan-head {
@@ -1257,7 +1289,7 @@
1257
1289
  .culprit-pv .plan-cols,
1258
1290
  .culprit-pv .pnode {
1259
1291
  display: grid;
1260
- grid-template-columns: 1fr 120px 92px;
1292
+ grid-template-columns: var(--plan-cols);
1261
1293
  align-items: center;
1262
1294
  gap: 10px;
1263
1295
  padding: 0 12px;
@@ -1271,6 +1303,13 @@
1271
1303
  font-weight: 600;
1272
1304
  }
1273
1305
 
1306
+ .culprit-pv .plan-cols span {
1307
+ min-width: 0;
1308
+ overflow: hidden;
1309
+ text-overflow: ellipsis;
1310
+ white-space: nowrap;
1311
+ }
1312
+
1274
1313
  .culprit-pv .plan-cols span:not(:first-child) {
1275
1314
  text-align: end;
1276
1315
  }
@@ -1278,8 +1317,8 @@
1278
1317
  .culprit-pv .pnode {
1279
1318
  align-items: start;
1280
1319
  min-height: 30px;
1281
- padding-top: 4px;
1282
- padding-bottom: 4px;
1320
+ padding-top: 5px;
1321
+ padding-bottom: 5px;
1283
1322
  width: 100%;
1284
1323
  text-align: start;
1285
1324
  border-inline-start: 2px solid transparent;
@@ -1301,6 +1340,7 @@
1301
1340
  display: flex;
1302
1341
  align-items: flex-start;
1303
1342
  min-width: 0;
1343
+ overflow: hidden;
1304
1344
  }
1305
1345
 
1306
1346
  .culprit-pv .pnode .lines {
@@ -1322,6 +1362,7 @@
1322
1362
  .culprit-pv .pnode .op-icon {
1323
1363
  display: inline-grid;
1324
1364
  place-items: center;
1365
+ flex-shrink: 0;
1325
1366
  color: var(--text-3);
1326
1367
  margin-inline-end: 2px;
1327
1368
  }
@@ -1343,6 +1384,7 @@
1343
1384
  .culprit-pv .pnode .indent {
1344
1385
  display: inline-block;
1345
1386
  flex-shrink: 0;
1387
+ width: calc(var(--depth, 0) * var(--indent-step, 12px));
1346
1388
  }
1347
1389
 
1348
1390
  .culprit-pv .pnode .twisty {
@@ -1358,11 +1400,15 @@
1358
1400
  .culprit-pv .pnode .opname {
1359
1401
  font-weight: 600;
1360
1402
  white-space: nowrap;
1361
- flex-shrink: 0;
1403
+ overflow: hidden;
1404
+ text-overflow: ellipsis;
1405
+ min-width: 0;
1406
+ flex-shrink: 1;
1362
1407
  }
1363
1408
 
1364
1409
  .culprit-pv .pnode .obj {
1365
- min-width: 48px;
1410
+ min-width: 0;
1411
+ flex-shrink: 4;
1366
1412
  color: var(--text-2);
1367
1413
  white-space: nowrap;
1368
1414
  overflow: hidden;
@@ -1373,12 +1419,26 @@
1373
1419
 
1374
1420
  .culprit-pv .pnode .rows,
1375
1421
  .culprit-pv .pnode .cost {
1422
+ min-width: 0;
1423
+ overflow: hidden;
1376
1424
  text-align: end;
1377
1425
  font-variant-numeric: tabular-nums;
1378
1426
  font-size: var(--fs-meta);
1379
1427
  white-space: nowrap;
1380
1428
  }
1381
1429
 
1430
+ .culprit-pv .pnode .rows {
1431
+ display: flex;
1432
+ align-items: center;
1433
+ justify-content: flex-end;
1434
+ flex-wrap: wrap;
1435
+ gap: 2px 4px;
1436
+ }
1437
+
1438
+ .culprit-pv .pnode .rows-pair {
1439
+ white-space: nowrap;
1440
+ }
1441
+
1382
1442
  .culprit-pv .pnode .rows .arrow {
1383
1443
  color: var(--text-3);
1384
1444
  }
@@ -1391,6 +1451,7 @@
1391
1451
  }
1392
1452
 
1393
1453
  .culprit-pv .tree-flag {
1454
+ flex-shrink: 0;
1394
1455
  display: inline-grid;
1395
1456
  place-items: center;
1396
1457
  min-width: 16px;
@@ -1414,6 +1475,7 @@
1414
1475
  .culprit-pv .heat {
1415
1476
  width: 38px;
1416
1477
  height: 6px;
1478
+ flex-shrink: 0;
1417
1479
  border-radius: 3px;
1418
1480
  background: var(--sunken);
1419
1481
  overflow: hidden;
@@ -1441,6 +1503,7 @@
1441
1503
  }
1442
1504
 
1443
1505
  .culprit-pv .mis {
1506
+ flex-shrink: 0;
1444
1507
  display: inline-flex;
1445
1508
  align-items: center;
1446
1509
  height: 17px;
@@ -1450,7 +1513,67 @@
1450
1513
  font-weight: 600;
1451
1514
  background: var(--high-bg);
1452
1515
  color: var(--high-text);
1453
- margin-inline-start: 4px;
1516
+ }
1517
+
1518
+ @container plan-box (max-width: 560px) {
1519
+ .culprit-pv.plan,
1520
+ .culprit-pv .plan {
1521
+ --plan-cols: minmax(0, 1fr) 132px 72px;
1522
+ --indent-step: 9px;
1523
+ }
1524
+
1525
+ .culprit-pv .plan-cols,
1526
+ .culprit-pv .pnode {
1527
+ gap: 8px;
1528
+ padding-inline: 10px;
1529
+ }
1530
+
1531
+ .culprit-pv .heat {
1532
+ width: 24px;
1533
+ }
1534
+
1535
+ .culprit-pv .plan-head .plan-search {
1536
+ flex: 1 1 168px;
1537
+ max-width: none;
1538
+ min-width: 140px;
1539
+ }
1540
+ }
1541
+
1542
+ @container plan-box (max-width: 440px) {
1543
+ .culprit-pv .plan-cols {
1544
+ display: none;
1545
+ }
1546
+
1547
+ .culprit-pv .pnode {
1548
+ grid-template-columns: minmax(0, 1fr) auto;
1549
+ grid-template-areas:
1550
+ "label cost"
1551
+ "rows rows";
1552
+ row-gap: 3px;
1553
+ padding: 6px 10px;
1554
+ }
1555
+
1556
+ .culprit-pv .pnode .label {
1557
+ grid-area: label;
1558
+ }
1559
+
1560
+ .culprit-pv .pnode .cost {
1561
+ grid-area: cost;
1562
+ align-self: start;
1563
+ }
1564
+
1565
+ .culprit-pv .pnode .rows {
1566
+ grid-area: rows;
1567
+ justify-content: flex-start;
1568
+ text-align: start;
1569
+ padding-inline-start: calc(var(--depth, 0) * var(--indent-step, 9px) + 18px);
1570
+ font-size: var(--fs-ui-sm);
1571
+ color: var(--text-2);
1572
+ }
1573
+
1574
+ .culprit-pv .pnode .rows:empty {
1575
+ display: none;
1576
+ }
1454
1577
  }
1455
1578
 
1456
1579
  .culprit-pv .cost-strip {
@@ -2338,6 +2461,11 @@
2338
2461
  gap: 8px;
2339
2462
  }
2340
2463
 
2464
+ .culprit-pv .compare-pickers .pv-meta {
2465
+ flex-wrap: wrap;
2466
+ row-gap: 4px;
2467
+ }
2468
+
2341
2469
  .culprit-pv .cmp-sync.on {
2342
2470
  color: var(--link);
2343
2471
  }
@@ -2720,6 +2848,22 @@
2720
2848
  margin: 4px 16px;
2721
2849
  }
2722
2850
 
2851
+ .culprit-pv .cmp-canvas-bar {
2852
+ display: flex;
2853
+ align-items: center;
2854
+ justify-content: space-between;
2855
+ flex-wrap: wrap;
2856
+ gap: 8px 18px;
2857
+ padding-top: 2px;
2858
+ }
2859
+
2860
+ .culprit-pv .cmp-canvas-controls {
2861
+ display: inline-flex;
2862
+ align-items: center;
2863
+ flex-wrap: wrap;
2864
+ gap: 8px;
2865
+ }
2866
+
2723
2867
  .culprit-pv .cmp-legend {
2724
2868
  display: flex;
2725
2869
  flex-wrap: wrap;
@@ -2748,11 +2892,42 @@
2748
2892
 
2749
2893
  .culprit-pv .compare-sides {
2750
2894
  display: grid;
2751
- grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
2895
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
2752
2896
  gap: 12px;
2753
2897
  align-items: start;
2754
2898
  }
2755
2899
 
2900
+ @container pv-shell (max-width: 560px) {
2901
+ .culprit-pv .cmp-verdict {
2902
+ padding: 12px 14px;
2903
+ }
2904
+
2905
+ .culprit-pv .cmp-change {
2906
+ grid-template-columns: minmax(0, 1fr);
2907
+ gap: 4px;
2908
+ padding: 8px 12px;
2909
+ }
2910
+
2911
+ .culprit-pv .cmp-prop {
2912
+ grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
2913
+ row-gap: 2px;
2914
+ padding: 6px 12px;
2915
+ }
2916
+
2917
+ .culprit-pv .cmp-prop-label {
2918
+ grid-column: 1 / -1;
2919
+ font-size: var(--fs-micro);
2920
+ }
2921
+
2922
+ .culprit-pv .cmp-prop.head > span:first-child {
2923
+ display: none;
2924
+ }
2925
+
2926
+ .culprit-pv .ins-body {
2927
+ padding: 0 12px 12px 14px;
2928
+ }
2929
+ }
2930
+
2756
2931
  .culprit-pv .compare-side {
2757
2932
  display: flex;
2758
2933
  flex-direction: column;
@@ -2777,13 +2952,26 @@
2777
2952
  /* ───────── deadlocks (DeadlockViewer & DeadlockGraph) ───────── */
2778
2953
 
2779
2954
  .culprit-pv.dl-detail {
2955
+ container: pv-deadlock / inline-size;
2780
2956
  min-width: 0;
2781
- padding: 18px 22px 26px;
2957
+ padding: var(--pv-pad, 18px 22px 26px);
2782
2958
  border: 1px solid var(--border);
2783
2959
  border-radius: var(--radius);
2784
2960
  background: var(--bg);
2785
2961
  }
2786
2962
 
2963
+ @container pv-deadlock (max-width: 520px) {
2964
+ .culprit-pv.dl-detail {
2965
+ padding: var(--pv-pad, 14px 14px 18px);
2966
+ }
2967
+ }
2968
+
2969
+ @media (max-width: 560px) {
2970
+ .culprit-pv.dl-detail {
2971
+ padding: var(--pv-pad, 14px 14px 18px);
2972
+ }
2973
+ }
2974
+
2787
2975
  .culprit-pv .dl-detail-meta {
2788
2976
  display: flex;
2789
2977
  align-items: center;
@@ -2819,6 +3007,7 @@
2819
3007
  padding: 12px 14px 8px;
2820
3008
  border: 1px solid var(--border);
2821
3009
  border-radius: 10px;
3010
+ overflow-x: auto;
2822
3011
  background-color: var(--sunken);
2823
3012
  background-image: radial-gradient(color-mix(in srgb, var(--text-3) 22%, transparent) 1px, transparent 1px);
2824
3013
  background-size: 16px 16px;
@@ -2828,6 +3017,7 @@
2828
3017
  .culprit-pv .dl-graph svg {
2829
3018
  display: block;
2830
3019
  width: 100%;
3020
+ min-width: 480px;
2831
3021
  max-width: 720px;
2832
3022
  height: auto;
2833
3023
  max-height: 380px;
@@ -3048,7 +3238,7 @@
3048
3238
 
3049
3239
  .culprit-pv .dl-procs {
3050
3240
  display: grid;
3051
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
3241
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
3052
3242
  gap: 10px;
3053
3243
  }
3054
3244