= depthLimit) {
collapsedIds.add(comboIdFor(id));
}
@@ -928,17 +918,6 @@ Graph Console
exportGraphPng();
}
}
- }, {
- key: "tooltip",
- type: "tooltip",
- getContent: function (_evt, items) {
- return Promise.resolve(items.map(function (it) {
- const d = it.data || {};
- return "
" + escapeHtml(d.table || "") + " "
- + escapeHtml(d.label || "") + "
"
- + escapeHtml(String(it.id)) + "
";
- }).join(""));
- }
}]
};
if (layoutCfg) opts.layout = layoutCfg;
@@ -1091,22 +1070,19 @@ Graph Console
})
.then(function (data) {
// Session-fieldset size line stays live even through skipped
- // repaints (unlike the status line under the canvas). The MiB
- // figure is a resident-size estimate fitted to the measurements
- // in graph_sizes.md: ≈1.1 MiB session floor + ≈5.4 KiB per node
- // (full-schema projection); hover shows per-table counts.
+ // repaints (unlike the status line under the canvas); hover
+ // shows per-table counts.
const sizeEl = document.getElementById("graph-size");
if (sizeEl) {
- const mib = 1.1 + data.nodes.length * 5.4 / 1024;
sizeEl.textContent = data.nodes.length + " nodes, "
- + data.edges.length + " edges (≈" + mib.toFixed(1) + " MiB)";
+ + data.edges.length + " edges";
const counts = {};
data.nodes.forEach(function (n) {
counts[n.table] = (counts[n.table] || 0) + 1;
});
sizeEl.title = Object.keys(counts).sort().map(function (t) {
return t + "=" + counts[t];
- }).join(", ") + " — MiB ≈ 1.1 + 5.4 KiB × nodes (measured fit)";
+ }).join(", ");
}
// Skip the repaint when the display projection is unchanged: a
// change burst that only touches non-projected attrs (e.g. moving
@@ -1174,8 +1150,9 @@ Graph Console
} else {
const columns = result.columns || [];
let hidden = 0;
- html += '
';
+ // Two-column flow; JSON-like values fold behind the same
+ // disclosure triangle the file tree uses.
+ html += '';
columns.forEach(function (col, i) {
const val = rows[0][i];
// Ladybug's value->clj fallback renders SQL nulls as "NULL".
@@ -1183,11 +1160,21 @@ Graph Console
hidden += 1;
return;
}
- html += "
" + escapeHtml(col.replace(/^n\./, ""))
- + " | " + escapeHtml(String(val))
- + " |
";
+ const key = escapeHtml(col.replace(/^n\./, ""));
+ const sval = String(val);
+ // Fold structured values ({…}) and walls of text (long arrays
+ // like migrations) behind a disclosure triangle.
+ if (sval.indexOf("{") !== -1 || sval.length > 120) {
+ html += '
'
+ + '' + key + '
'
+ + ''
+ + escapeHtml(sval) + "
";
+ } else {
+ html += '
' + key
+ + ': ' + escapeHtml(sval) + "
";
+ }
});
- html += "
";
+ html += "
";
if (hidden) {
html += '