- Debounce project config saves: use local state + save-on-blur instead of firing IPC requests on every keystroke in text inputs - Add Zustand selectors to all store consumers to prevent full-store re-renders on any state change - Fix initialization race: chain checkImage after checkDocker resolves - Fix DockerSettings setTimeout race: await checkImage after save - Add console.error logging to all 11 empty catch blocks in ProjectCard - Add keyboard support to AddProjectDialog: Escape to close, click-outside-to-close, form submit on Enter, auto-focus Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
844 B
TypeScript
26 lines
844 B
TypeScript
import { useShallow } from "zustand/react/shallow";
|
|
import { useAppState } from "../../store/appState";
|
|
|
|
export default function StatusBar() {
|
|
const { projects, sessions } = useAppState(
|
|
useShallow(s => ({ projects: s.projects, sessions: s.sessions }))
|
|
);
|
|
const running = projects.filter((p) => p.status === "running").length;
|
|
|
|
return (
|
|
<div className="flex items-center h-6 px-4 bg-[var(--bg-tertiary)] border border-[var(--border-color)] rounded-lg text-xs text-[var(--text-secondary)]">
|
|
<span>
|
|
{projects.length} project{projects.length !== 1 ? "s" : ""}
|
|
</span>
|
|
<span className="mx-2">|</span>
|
|
<span>
|
|
{running} running
|
|
</span>
|
|
<span className="mx-2">|</span>
|
|
<span>
|
|
{sessions.length} terminal{sessions.length !== 1 ? "s" : ""}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|