fix: Scope loading spinner to diff pane only, keep sidebar always mounted

This commit is contained in:
Lukas May
2026-03-05 11:12:51 +01:00
parent 41cbc2c76c
commit 69d2543995

View File

@@ -234,17 +234,16 @@ export function ReviewTab({ initiativeId }: ReviewTabProps) {
preview={previewState} preview={previewState}
/> />
{/* Main content area */} {/* Main content area — sidebar always rendered to preserve state */}
<div className="grid grid-cols-1 lg:grid-cols-[1fr_260px]">
{/* Left: Diff */}
<div className="min-w-0 p-4">
{isDiffLoading ? ( {isDiffLoading ? (
<div className="flex h-64 items-center justify-center text-muted-foreground gap-2"> <div className="flex h-64 items-center justify-center text-muted-foreground gap-2">
<Loader2 className="h-4 w-4 animate-spin" /> <Loader2 className="h-4 w-4 animate-spin" />
Loading diff... Loading diff...
</div> </div>
) : ( ) : files.length === 0 ? (
<div className="grid grid-cols-1 lg:grid-cols-[1fr_260px]">
{/* Left: Diff */}
<div className="min-w-0 p-4">
{files.length === 0 ? (
<div className="flex h-32 items-center justify-center text-muted-foreground text-sm"> <div className="flex h-32 items-center justify-center text-muted-foreground text-sm">
{selectedCommit {selectedCommit
? "No changes in this commit" ? "No changes in this commit"
@@ -276,7 +275,6 @@ export function ReviewTab({ initiativeId }: ReviewTabProps) {
</div> </div>
</div> </div>
</div> </div>
)}
</div> </div>
); );
} }