fix(quality): resolve reliability findings on dev

The Sonar quality gate rated new code D. Preserve focus and keyboard interaction through native controls and shared dialog behavior. Replace ambiguous regex scans with bounded parsing and make numeric coercion and initialization explicit.
This commit is contained in:
Maurice
2026-12-01 21:06:05 +01:00
parent 0d6a432967
commit e539860530
127 changed files with 548 additions and 338 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { stripTrailingSlashes } from '@trek/shared';
import { detectAuthGate, type AuthGate } from './authGate';
import { DEMO_SERVER_URL } from './links';
@@ -59,7 +60,7 @@ function normalize(raw: string): string | null {
return null;
}
if ((parsed.protocol !== 'https:' && parsed.protocol !== 'http:') || !parsed.hostname) return null;
return parsed.origin + parsed.pathname.replace(/\/+$/, '');
return parsed.origin + stripTrailingSlashes(parsed.pathname);
}
/**