Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: review round 1 — focus-camera control restore + agent/jump consistency (#2593)

Adam Eivy76853f483ca5
diff --git a/client/src/components/city/CityFocusCamera.jsx b/client/src/components/city/CityFocusCamera.jsx
index d2a6567fae..f4a54850e8 100644
--- a/client/src/components/city/CityFocusCamera.jsx
+++ b/client/src/components/city/CityFocusCamera.jsx
@@ -50,6 +50,10 @@ export default function CityFocusCamera({ focusedAppId, positions, orbitRef, act
if (key !== currentKeyRef.current) {
currentKeyRef.current = key;
+ // Only capture the controls' "real" enabled state when NO fly is in progress. Retargeting
+ // mid-fly (rapid building/minimap clicks, or Close before the fly settles) would otherwise
+ // capture the already-disabled value and restore `false` forever.
+ const wasSettled = animRef.current === null;
const startTarget = controls?.target ? controls.target.clone() : deriveLookAt(camera);
let endPos;
@@ -74,7 +78,7 @@ export default function CityFocusCamera({ focusedAppId, positions, orbitRef, act
};
// Take over from OrbitControls for the duration of the fly, remembering its prior state.
if (controls) {
- controlsWasEnabledRef.current = controls.enabled;
+ if (wasSettled) controlsWasEnabledRef.current = controls.enabled;
controls.enabled = false;
}
}
diff --git a/client/src/components/city/CityFocusPanel.jsx b/client/src/components/city/CityFocusPanel.jsx
index 2025233417..1bc47ca134 100644
--- a/client/src/components/city/CityFocusPanel.jsx
+++ b/client/src/components/city/CityFocusPanel.jsx
@@ -44,7 +44,7 @@ export default function CityFocusPanel({ app, notFound = false, agents = [], onC
const activeAgents = useMemo(
() => (Array.isArray(agents) ? agents : []).filter(
- (a) => a && (a.status === 'running' || a.state === 'coding' || a.state === 'thinking' || a.state === 'investigating' || a.status === 'failed' || a.error)
+ (a) => a && (a.status === 'running' || a.state === 'coding' || a.state === 'thinking' || a.state === 'investigating' || a.status === 'failed' || a.state === 'error' || a.error)
),
[agents]
);
diff --git a/client/src/components/city/CityFocusPanel.test.jsx b/client/src/components/city/CityFocusPanel.test.jsx
index 95409b1d9b..e42f010826 100644
--- a/client/src/components/city/CityFocusPanel.test.jsx
+++ b/client/src/components/city/CityFocusPanel.test.jsx
@@ -29,9 +29,12 @@ describe('CityFocusPanel', () => {
const agents = [
{ agentId: 'a1', status: 'running', task: 'Refactor module' },
{ agentId: 'a2', status: 'completed', task: 'Old done task' },
+ { agentId: 'a3', state: 'error', task: 'Broke the build' },
];
render(<CityFocusPanel app={app} agents={agents} />);
expect(screen.getByText('Refactor module')).toBeTruthy();
+ // A failed agent whose only signal is state:'error' is still surfaced.
+ expect(screen.getByText('Broke the build')).toBeTruthy();
// A completed (non-active) agent is filtered out.
expect(screen.queryByText('Old done task')).toBeNull();
});
diff --git a/client/src/pages/CyberCity.jsx b/client/src/pages/CyberCity.jsx
index 99928716e6..2fb0d6fb77 100644
--- a/client/src/pages/CyberCity.jsx
+++ b/client/src/pages/CyberCity.jsx
@@ -316,8 +316,11 @@ function CyberCityInner() {
const handleJumpToFirst = useCallback(() => {
const first = filterResult.matches[0];
- if (first?.id) navigate(`/city/apps/${first.id}`);
- }, [filterResult.matches, navigate]);
+ if (!first?.id) return;
+ // Mirror handleBuildingClick: focus in-place from the overview, open the app page in exploration.
+ if (settings?.explorationMode) navigate(`/apps/${first.id}`);
+ else navigate(`/city/apps/${first.id}`);
+ }, [filterResult.matches, navigate, settings?.explorationMode]);
// Close focus → back to the plain overview. Open app → the existing app detail page (explicit).
const handleCloseFocus = useCallback(() => navigate('/city'), [navigate]);