You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REVIEW.md §5.8 tüm bileşen prop'larının ayrı bir interface XProps ile tanımlanmasını zorunlu kılar (lint yakalamaz, elle denetlenir). Inline { children: React.ReactNode } yerine adlandırılmış interface kullanılmalı.
export function MaintenanceGate({ children }: { children: React.ReactNode }) {
Öneri: Üstüne interface MaintenanceGateProps { children: React.ReactNode } ekleyip imzayı MaintenanceGate({ children }: MaintenanceGateProps) yap.
3. BrandLogo <img> yerine Next.js <Image> kullanmalı
REVIEW.md §5.1 <img> yerine Next.js <Image> kullanımını zorunlu kılar. Logo her header/sidebar/drawer render'ında göründüğünden format optimizasyonu (WebP/AVIF), otomatik lazy-load ve LCP etkisi var. res.cloudinary.com zaten next.config.tsremotePatterns'ında tanımlı, <Image> doğrudan çalışır.
Response.json() TypeScript'te any döner; doğrudan as PublicSettingsResponse cast etmek tip güvenliğini ortadan kaldırır ve REVIEW.md §5.8 as cast yasağını tetikler. Önce unknown alınıp narrowing uygulanmalı.
const json = (await res.json()) as PublicSettingsResponse;
Öneri:const json: unknown = await res.json(); — sonra typeof/in guard ile site_name alanına eriş.
5. onSave async handler'da try-catch yok — unhandled rejection
onSave, Promise.all ile birden fazla mutateAsync çağırıyor; herhangi biri reject ederse Promise.all reddedilir, setDraft({}) çalışmaz ve onClick handler unhandledrejection üretir (Error Boundary yakalamaz). REVIEW.md §5.5 submit handler'ın düzgün hata yönetimine sahip olmasını zorunlu kılar.
PR #23 i18n interpolation bloğuna defaultVariables: { appName } eklemişti; bu PR onu kaldırıyor. Ancak home.json hâlâ {{appName}} interpolasyonu kullanıyor. useBranding() veri gelene kadar siteName"" kaldığından /settings/public yanıt vermeden başlık "Find your people at " şeklinde boş render olur.
PR #23 (commit 8f7fc8e): "improve type definitions and enhance security with environment variables" — defaultVariables: { appName: env.NEXT_PUBLIC_APP_NAME }
Öneri:useBranding() hook'una FALLBACK_SITE_NAME sabiti ekleyip siteName boşken bunu döndür.
7. Dil etiketleri (Türkçe/English) hardcode edilmiş
default_locale Select'indeki Türkçe/English etiketleri kullanıcıya görünen sabit string. REVIEW.md §3.8/§5.7 hardcoded user-facing string'i yasak sayar; ayrıca UI İngilizce iken İngilizce beklenir.
Önceki review'daki 6 geçerli bulgu local'de giderildi:
BrandLogo — ham <img> yerine next/image<Image fill> kullanılıyor (test güncellendi).
MaintenanceGate — inline prop tipi interface MaintenanceGateProps ile adlandırıldı.
site-name.ts — as PublicSettingsResponse cast'i kaldırıldı; unknown üzerinden tip-güvenli narrowing.
SystemSettingsContent.onSave — try/catch eklendi; hata durumunda draft korunuyor (unhandled rejection yok).
useBranding — site_name yüklenene kadar FALLBACK_SITE_NAME = "App" döndürüyor; {{appName}} artık boş render olmuyor.
SystemSettingsForm — dil etiketleri t("locales.tr"|"locales.en") ile i18n'e taşındı (her iki dilde anahtarlar mevcut).
Not — ../AdminForbidden import'u (1. bulgu) bilinçli olarak değiştirilmedi. Bu, admin/(protected)/ route group'unun yerleşik konvansiyonu: admins, broadcasts, activities, files, support, users dahil tüm dosyalar shared bileşenleri (AdminForbidden, PermissionGate) tek seviyeli ../ ile import ediyor. False positive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.