SarahXia0405 commited on
Commit
9c75094
·
verified ·
1 Parent(s): 3dab849

Update web/src/components/LeftSidebar.tsx

Browse files
Files changed (1) hide show
  1. web/src/components/LeftSidebar.tsx +14 -12
web/src/components/LeftSidebar.tsx CHANGED
@@ -340,7 +340,7 @@ export function LeftSidebar({
340
  const courseDisplayInfo = getCourseDisplayInfo();
341
 
342
  return (
343
- // ✅ Ensure the sidebar fills its parent height; only the Saved Chat area scrolls.
344
  <div className="h-full w-full min-h-0 flex flex-col overflow-hidden">
345
  {/* ========== FIXED TOP (no scroll) ========== */}
346
  {isLoggedIn && courseDisplayInfo && (
@@ -465,17 +465,19 @@ export function LeftSidebar({
465
  </div>
466
  )}
467
 
468
- {/* ========== SCROLL AREA (Saved Chats) ========== */}
469
- <div className="flex-1 min-h-0 overflow-y-auto">
470
- <div className="h-full min-h-0">
471
- <SavedChatSection
472
- isLoggedIn={isLoggedIn}
473
- savedChats={savedChats}
474
- onLoadChat={onLoadChat}
475
- onDeleteSavedChat={onDeleteSavedChat}
476
- onRenameSavedChat={onRenameSavedChat}
477
- />
478
- </div>
 
 
479
  </div>
480
 
481
  {/* Saved Item Dialog (unchanged) */}
 
340
  const courseDisplayInfo = getCourseDisplayInfo();
341
 
342
  return (
343
+ // ✅ fills parent; NO outer scroll
344
  <div className="h-full w-full min-h-0 flex flex-col overflow-hidden">
345
  {/* ========== FIXED TOP (no scroll) ========== */}
346
  {isLoggedIn && courseDisplayInfo && (
 
465
  </div>
466
  )}
467
 
468
+ {/* ========== ONLY SCROLL AREA (Saved Chats) ========== */}
469
+ <div
470
+ className="flex-1 min-h-0 overflow-y-auto overscroll-contain"
471
+ style={{ overscrollBehavior: "contain" }}
472
+ >
473
+ {/* IMPORTANT: keep SavedChatSection as a normal block; do NOT nest another overflow-y-auto inside it */}
474
+ <SavedChatSection
475
+ isLoggedIn={isLoggedIn}
476
+ savedChats={savedChats}
477
+ onLoadChat={onLoadChat}
478
+ onDeleteSavedChat={onDeleteSavedChat}
479
+ onRenameSavedChat={onRenameSavedChat}
480
+ />
481
  </div>
482
 
483
  {/* Saved Item Dialog (unchanged) */}