summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-07 05:06:43 -0800
committerFuwn <[email protected]>2026-02-07 05:06:43 -0800
commit80da73b5e10cc462745e921f79386773420aa646 (patch)
tree79e02404591e4977fa9f923aed8b1f8cdf3219dc
parentfix: persist sidebar size across collapse/expand cycles (diff)
downloadasa.news-80da73b5e10cc462745e921f79386773420aa646.tar.xz
asa.news-80da73b5e10cc462745e921f79386773420aa646.zip
fix: prevent sidebar max width from clamping persisted size on load
Return 35% max until subscriptions/feeds data loads. Previously the useMemo computed a small max from just nav items on first render, causing the library to clamp and overwrite the stored sidebar width.
-rw-r--r--apps/web/app/reader/_components/reader-layout-shell.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/web/app/reader/_components/reader-layout-shell.tsx b/apps/web/app/reader/_components/reader-layout-shell.tsx
index 4952662..3ff2fa8 100644
--- a/apps/web/app/reader/_components/reader-layout-shell.tsx
+++ b/apps/web/app/reader/_components/reader-layout-shell.tsx
@@ -60,6 +60,7 @@ export function ReaderLayoutShell({
const sidebarMaxWidth = useMemo(() => {
if (typeof window === "undefined") return "35%"
+ if (!subscriptionsData && !customFeedsData) return "35%"
const canvas = document.createElement("canvas")
const maybeContext = canvas.getContext("2d")