Skip to content

Commit bbbc2ab

Browse files
committed
fix(brain): drop click-spotlight — selection feedback via halo + panel only
Spotlighting on click moved camera by the same delta as the orbit target, holding camera→target distance constant. Visually that meant clicks on satellites in front of the camera looked like zoom-in; clicks on satellites behind looked like zoom-out — same code path, opposite direction depending on which side of origin the satellite lived on. There is no symmetric click-camera that "feels right" on a free orbit — either the camera moves and feels arbitrary, or it stays put. Going with stays-put. The selected node is already obvious from the white body + 1.4× halo + the detail panel; the eye doesn't need a camera move to find it. Camera.spotlight() / returnToOrigin() remain in the API for future use but are no longer called from click or from real firing events. Tests: 167 passed.
1 parent c9a9bc0 commit bbbc2ab

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

desktop/cortex-control-center/src/brain-v2/index.jsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ export function BrainV2({ api = null, cortexBase = "http://127.0.0.1:7437", auth
106106
core,
107107
pulseCoreHalo: () => pulseCoreHalo(core),
108108
onTickerEntry: pushTickerEntry,
109-
onSpotlight: (slot) => {
110-
if (slot) {
111-
cameraHandle.pauseAutoRotate();
112-
cameraHandle.spotlight(slot);
113-
}
109+
onSpotlight: () => {
110+
// Camera spotlight on real firing events disabled — repeated triggers
111+
// were producing inconsistent zoom direction depending on which side
112+
// of origin the firing satellite lived on. Selection feedback comes
113+
// from the satellite halo pulse + detail panel only.
114114
},
115115
});
116116
dispatcherRef.current = dispatcher;
@@ -275,24 +275,18 @@ export function BrainV2({ api = null, cortexBase = "http://127.0.0.1:7437", auth
275275
satellitesRef.current.setSelected(null);
276276
setSelectedSlot(null);
277277
selectedSlotRef.current = null;
278-
cameraHandleRef.current?.returnToOrigin?.();
279278
return;
280279
}
281280
satellitesRef.current.setSelected(slot.id);
282281
setSelectedSlot(slot);
283282
selectedSlotRef.current = slot;
284-
if (cameraHandleRef.current) {
285-
cameraHandleRef.current.pauseAutoRotate();
286-
cameraHandleRef.current.spotlight(slot);
287-
}
288283
}
289284

290285
function handleContextMenu(e) {
291286
e.preventDefault();
292287
satellitesRef.current?.setSelected(null);
293288
setSelectedSlot(null);
294289
selectedSlotRef.current = null;
295-
cameraHandleRef.current?.returnToOrigin?.();
296290
}
297291

298292
return (

desktop/cortex-control-center/src/brain-visualizer.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ describe("Brain v2 interaction (P6)", () => {
242242
expect(v2Index).toContain("now - lastStatsAtRef.current >= 1000");
243243
});
244244

245-
it("BrainV2 wires hover + camera spotlight + click-pin + right-click deselect", () => {
245+
it("BrainV2 wires hover + click-pin + right-click deselect (no click camera move)", () => {
246246
expect(v2Index).toContain("createHover");
247247
expect(v2Index).toContain("createCamera");
248248
expect(v2Index).toContain("hoveredSlotRef");
249249
expect(v2Index).toContain("selectedSlotRef");
250-
expect(v2Index).toContain("cameraHandleRef.current.spotlight(slot)");
250+
expect(v2Index).not.toContain("cameraHandleRef.current.spotlight(slot)");
251251
expect(v2Index).toContain("e.preventDefault()");
252252
expect(v2Index).toContain("onContextMenu={handleContextMenu}");
253253
});

0 commit comments

Comments
 (0)