Summary
In the chat/Tutor feature (/learn), when the layout preference is the horizontal top nav bar (not the sidebar), the page becomes scrollable and the sticky top nav scrolls out of view. The nav should stay fixed and only the chat body should scroll.
Repro
- Set layout preference to the horizontal top nav shell (not sidebar).
- Open
/learn and start / resume a tutor session. - Scroll — the whole screen scrolls and the 56px top nav bar disappears off the top.
Only happens in horizontal-nav mode; the sidebar layout is unaffected.
Root cause (grounded in code)
ShellFrame (frontend/src/components/ShellFrame.tsx) builds the horizontal layout as a 100vh flex column: TopNav (fixed 56px, position: sticky) + <main flex:1 overflowY:auto>. So main's usable height is 100vh − 56px.
But the chat screen hardcodes height: 100vh on its root containers:
frontend/src/components/screens/Learn.tsx:434 (entry screen)frontend/src/components/screens/Learn.tsx:503 (active session)
A 100vh child inside a 100vh − 56px container overflows main by exactly the nav height, so main becomes scrollable and the content (and with it the visual anchor of the nav) shifts. In sidebar mode the SideNav is a full-height row sibling, so 100vh matches the viewport and the bug doesn't manifest — which is why it's horizontal-mode-only.
TOP_NAV_HEIGHT (56) is exported from TopNav.tsx:75 but is never used in any content-height calculation.
Fix direction
- The chat screen should fill its container (
height: 100% / rely on main's flex:1) instead of height: 100vh, or subtract TOP_NAV_HEIGHT in horizontal mode. - Same
height: 100vh pattern affects other screens and likely has the same bug: Quiz.tsx, Library.tsx, notetaker/page.tsx, course-planner/page.tsx, Social.tsx. Worth fixing generally (a shared full-height wrapper) rather than one-off per screen.
Acceptance
- In horizontal-nav mode on
/learn, the top nav stays fixed and only the chat message area scrolls; no whole-page scroll pushes the nav off-screen.
Summary
In the chat/Tutor feature (
/learn), when the layout preference is the horizontal top nav bar (not the sidebar), the page becomes scrollable and the sticky top nav scrolls out of view. The nav should stay fixed and only the chat body should scroll.Repro
/learnand start / resume a tutor session.Only happens in horizontal-nav mode; the sidebar layout is unaffected.
Root cause (grounded in code)
ShellFrame(frontend/src/components/ShellFrame.tsx) builds the horizontal layout as a100vhflex column:TopNav(fixed 56px,position: sticky) +<main flex:1 overflowY:auto>. Somain's usable height is100vh − 56px.But the chat screen hardcodes
height: 100vhon its root containers:frontend/src/components/screens/Learn.tsx:434(entry screen)frontend/src/components/screens/Learn.tsx:503(active session)A
100vhchild inside a100vh − 56pxcontainer overflowsmainby exactly the nav height, somainbecomes scrollable and the content (and with it the visual anchor of the nav) shifts. In sidebar mode theSideNavis a full-height row sibling, so100vhmatches the viewport and the bug doesn't manifest — which is why it's horizontal-mode-only.TOP_NAV_HEIGHT(56) is exported fromTopNav.tsx:75but is never used in any content-height calculation.Fix direction
height: 100%/ rely onmain'sflex:1) instead ofheight: 100vh, or subtractTOP_NAV_HEIGHTin horizontal mode.height: 100vhpattern affects other screens and likely has the same bug:Quiz.tsx,Library.tsx,notetaker/page.tsx,course-planner/page.tsx,Social.tsx. Worth fixing generally (a shared full-height wrapper) rather than one-off per screen.Acceptance
/learn, the top nav stays fixed and only the chat message area scrolls; no whole-page scroll pushes the nav off-screen.