diff --git a/ordinis-admin-ui/src/auth/RequireAuth.tsx b/ordinis-admin-ui/src/auth/RequireAuth.tsx
index a62c76f..7f22b99 100644
--- a/ordinis-admin-ui/src/auth/RequireAuth.tsx
+++ b/ordinis-admin-ui/src/auth/RequireAuth.tsx
@@ -67,18 +67,17 @@ export function RequireAuth({ children }: { children: ReactNode }) {
)
}
- // Loading — initial OIDC bootstrap (silent SSO check). Показываем нейтральный
- // spinner, чтобы избежать flash of unauthenticated UI если silent SSO успеет
- // вернуть active session.
- if (auth.isLoading) {
- return (
-
- )
- }
+ // ВАЖНО: НЕ блокируем UI пока {@code auth.isLoading=true}. Initial OIDC
+ // bootstrap может зависать на 10-20 сек если Keycloak silent SSO iframe
+ // блокируется X-Frame-Options или сеть медленная. Anonymous user в это
+ // время видит только spinner и может подумать что сайт сломан.
+ // Решение: рендерим children immediately. AuthBadge в top bar сам
+ // показывает loading state своим маленьким индикатором, а PUBLIC данные
+ // (которые backend отдаёт без auth) грузятся параллельно с silent SSO.
+ // Если silent SSO succeed позже — useAuth() обновит scope, кнопки
+ // create/edit активируются автоматически (canMutate реактивен).
- // Anonymous OR authenticated — рендерим children всегда. UI в дочерних
+ // Anonymous OR authenticated OR loading — рендерим children всегда. UI в
// компонентах сам адаптируется (через useAuth().isAuthenticated):
// hide mutation buttons, show «Войти» CTA, тонировать blocked actions.
return <>{children}>