fix: browser testing issues and missing UI tools

- Fix WebSocket URL to use ws:// for http development environments
- Make createLayer idempotent to prevent race-condition 500 under React StrictMode
- Add URL-based routing for /register so register page actually shows register form
- Add missing tool buttons to LeftSidebar: polygon, chair, extend, fillet
- Add Playwright browser test suite for exhaustive UI testing
- Update .gitignore for Playwright artifacts

Unit tests: backend 254/254, frontend 380/380
This commit is contained in:
2026-07-27 01:17:18 +02:00
parent 8f4ca1581c
commit c86b5e7031
10 changed files with 551 additions and 2 deletions
+4 -1
View File
@@ -1778,7 +1778,10 @@ const CADEditor: React.FC<CADEditorProps> = ({ projectId, token, onNavigateBack
// ─── App Wrapper (Auth Gate) ───────────────────────────
const App: React.FC = () => {
const { user, token } = useAuth();
const [authView, setAuthView] = useState<'login' | 'register'>('login');
const [authView, setAuthView] = useState<'login' | 'register'>(() => {
// URL-based routing: /register shows register form, otherwise login
return window.location.pathname === '/register' ? 'register' : 'login';
});
const [openedProjectId, setOpenedProjectId] = useState<string | null>(null);
// Not authenticated → show Login or Register