fix(hub): resize the 3D canvas with its box and repair five stale e2e
The 3D graph took its size once from the box, so a later scrollbar cut it at 390; a ResizeObserver now follows the box and is disconnected on dispose. The e2e follow78d4e4a(match swipe's ids method shadowed the case's request counter, now card_ids),af3555e(three reveal buttons),94bf0b4(legend toggle in the Home tile head),a4f7017(the runner needs SHELL for its login shell) and50363b1(rules live in their own Controls tab). 🎯 Fix: 85 % 💥 Break: 4 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 82 🚦 Gate: ⛔ fix 85 % < 90 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d6e8b4a923
commit
ccc80f17c1
6 files changed
+23
-15
No files matched your search
@@ -11,7 +11,7 @@
|
||||
const DEPTH_GAP = 90;
|
||||
const TIME_DEPTH = 640;
|
||||
const TOP = {operator: 6, chair: 4, session: 2.5};
|
||||
const g3 = {lib: null, three: null, THREE: null, graph: null, host: null, tab: "", sig: "", planes: [], colors: null, failed: "", picked: null, fit: false, badges: new Map(), faces: new Set(), textures: new Map(), pulse: 0};
|
||||
const g3 = {lib: null, three: null, THREE: null, graph: null, sizer: null, host: null, tab: "", sig: "", planes: [], colors: null, failed: "", picked: null, fit: false, badges: new Map(), faces: new Set(), textures: new Map(), pulse: 0};
|
||||
|
||||
const layoutsOf = (tab) => (tab === "tasks" ? LAYOUTS.filter(([id]) => id !== "spawn") : LAYOUTS);
|
||||
const layoutOf = (tab) => (layoutsOf(tab).some(([id]) => id === space.views.graph.axis) ? space.views.graph.axis : "none");
|
||||
@@ -398,6 +398,8 @@
|
||||
if (!g3.graph) {
|
||||
try {
|
||||
g3.graph = Graph({controlType: "orbit"})(box);
|
||||
g3.sizer = new ResizeObserver(() => g3.graph && g3.graph.width(box.clientWidth).height(box.clientHeight));
|
||||
g3.sizer.observe(box);
|
||||
} catch (error) {
|
||||
host.replaceChildren(emptyState("3D unavailable", `This browser offers no WebGL: ${error.message || error}`));
|
||||
g3.host = null;
|
||||
@@ -438,6 +440,10 @@
|
||||
g3.graph._destructor();
|
||||
}
|
||||
}
|
||||
if (g3.sizer) {
|
||||
g3.sizer.disconnect();
|
||||
g3.sizer = null;
|
||||
}
|
||||
window.cancelAnimationFrame(g3.pulse);
|
||||
g3.pulse = 0;
|
||||
g3.graph = null;
|
||||
|
||||
Reference in new issue
Block a user