From 938863425bf8ad6c17e43b3da128f92cf6d6ab63 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 21 Feb 2026 09:26:44 +0900
Subject: fix(frontend): prevent layout shift in feed sidebar during loading

Show "All feeds" button immediately and load individual feeds
asynchronously via internal Suspense boundary, avoiding the
spinner-to-content shift that occurred with the outer Suspense wrapper.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 frontend/src/pages/UnreadArticles.tsx | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

(limited to 'frontend/src/pages/UnreadArticles.tsx')

diff --git a/frontend/src/pages/UnreadArticles.tsx b/frontend/src/pages/UnreadArticles.tsx
index 32d1190..e4754a3 100644
--- a/frontend/src/pages/UnreadArticles.tsx
+++ b/frontend/src/pages/UnreadArticles.tsx
@@ -1,5 +1,5 @@
 import { useAtomValue, useSetAtom } from "jotai";
-import { Suspense, useEffect } from "react";
+import { useEffect } from "react";
 import { useSearch } from "wouter";
 import {
 	articleFeedFilterAtom,
@@ -7,9 +7,7 @@ import {
 	articleViewAtom,
 } from "../atoms";
 import { ArticleList } from "../components/ArticleList";
-import { ErrorBoundary } from "../components/ErrorBoundary";
 import { FeedSidebar } from "../components/FeedSidebar";
-import { LoadingSpinner } from "../components/LoadingSpinner";
 
 export function UnreadArticles() {
 	const search = useSearch();
@@ -27,11 +25,7 @@ export function UnreadArticles() {
 	return (
 		<div className="flex gap-8">
 			<div className="hidden w-56 shrink-0 md:block">
-				<ErrorBoundary>
-					<Suspense fallback={<LoadingSpinner />}>
-						<FeedSidebar basePath="/unread" />
-					</Suspense>
-				</ErrorBoundary>
+				<FeedSidebar basePath="/unread" />
 			</div>
 			<div className="min-w-0 flex-1">
 				<UnreadArticleList feedId={feedId} />
-- 
cgit v1.3-1-g0d28

