Fix frontend UX: debounce saves, Zustand selectors, init race, dialog
- 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>
This commit is contained in:
@@ -33,8 +33,7 @@ export default function DockerSettings() {
|
||||
const handleSourceChange = async (source: ImageSource) => {
|
||||
if (!appSettings) return;
|
||||
await saveSettings({ ...appSettings, image_source: source });
|
||||
// Re-check image existence after changing source
|
||||
setTimeout(() => checkImage(), 100);
|
||||
await checkImage();
|
||||
};
|
||||
|
||||
const handleCustomChange = async (value: string) => {
|
||||
|
||||
Reference in New Issue
Block a user