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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user