Skip to content

fix: constrain student layout height so inner scroll containers work#1463

Open
Xenon010101 wants to merge 2 commits into
Sachinchaurasiya360:mainfrom
Xenon010101:fix/issue-1452-job-agent-scroll
Open

fix: constrain student layout height so inner scroll containers work#1463
Xenon010101 wants to merge 2 commits into
Sachinchaurasiya360:mainfrom
Xenon010101:fix/issue-1452-job-agent-scroll

Conversation

@Xenon010101
Copy link
Copy Markdown
Contributor

@Xenon010101 Xenon010101 commented Jun 5, 2026

What

Fix Job Agent chat messages area not scrolling independently — the parent layout scrolls instead.

Root cause

StudentLayout.tsx <main> had overflow-auto but no height constraint, so flex-1 child pages couldn't constrain their height. The outer element scrolled instead of the inner messages container.

Changes

  • StudentLayout.tsx: Made outer div a flex-col, changed <main> to flex-1 min-h-0 overflow-hidden, wrapped <Outlet /> in a scrollable div.h-full.overflow-y-auto

Verification

  • Messages area in Job Agent chat now scrolls independently
  • Header and input bar stay fixed
  • All other student pages still scroll correctly via the wrapper
  • No visual regressions in layout

CI failures

N/A

Before

Parent <main> scrolled when conversation grew — messages area had no independent scroll.

After

Messages area scrolls independently; header and input bar remain fixed in place.

Closes #1452

Summary by CodeRabbit

  • New Features

    • Added smooth animation effects to the Contact Us heading with split text display and underline scale styling.
  • Style

    • Updated contact form field styling with transparent background colors while maintaining existing borders, typography, and interactive focus states.
    • Restructured student interface layout with an improved scroll container implementation and enhanced responsive behavior across devices.

Adds green underline animation to heading heading, changes input/textarea backgrounds to bg-transparent to match glass-morphism card style. Closes Sachinchaurasiya360#1318

Signed-off-by: Xenon010101 <xenon010101@users.noreply.github.com>
Changes StudentLayout outer div to flex-col and main to flex-1 min-h-0 overflow-hidden, wrapping Outlet in a scrollable container. This allows child pages like JobAgentPage (which use flex-1) to properly constrain their height and scroll independently instead of the parent scrolling. Closes Sachinchaurasiya360#1452

Signed-off-by: Xenon010101 <xenon010101@users.noreply.github.com>
@github-actions github-actions Bot added bug Something isn't working gssoc quality:exceptional Exceptional implementation quality scope:frontend Changes to client-side / UI code labels Jun 5, 2026
@github-actions github-actions Bot added type:bug Bug fixes type:design UI/UX or design-related updates level:beginner Good for first-time contributors labels Jun 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Hi @Xenon010101, thanks for contributing to InternHack! 🎉

I have automatically:

  • 👤 Assigned this PR to you.
  • 🏷️ Applied the gssoc:approved label.

Our workflows will now analyze your changes to classify:

  • 📈 PR Difficulty: level:*
  • 🧩 PR Type: type:*
  • 🌟 PR Quality: quality:*

Tip

Ensure your PR description references the issue it resolves (e.g. Closes #123). This allows the bot to inherit any additional labels from that issue!

Happy coding! 🚀

@github-actions github-actions Bot added the gssoc:approved Approved for GSSoC scoring label Jun 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ca51d6f4-9633-49a7-b93f-e7350e3399e9

📥 Commits

Reviewing files that changed from the base of the PR and between 0c176ae and ec19772.

📒 Files selected for processing (2)
  • client/src/module/legal/ContactPage.tsx
  • client/src/module/student/StudentLayout.tsx

📝 Walkthrough

Walkthrough

This PR updates the Contact page UI with animated heading and transparent form fields, and restructures the StudentLayout scroll container to fix independent scrolling behavior of child content areas, directly addressing the Job Agent chat scroll issue.

Changes

UI and Layout Updates

Layer / File(s) Summary
Contact page heading animation
client/src/module/legal/ContactPage.tsx
framer-motion is imported and the static "Contact Us" heading is replaced with an animated composition that underlines and scales the "Us" text.
Contact page form field styling
client/src/module/legal/ContactPage.tsx
Name, email, subject, and message form fields transition from solid background colors to bg-transparent, preserving borders, text colors, and focus ring styling.
StudentLayout scroll container restructuring
client/src/module/student/StudentLayout.tsx
Top-level container is converted to flex column layout; main content area is restructured with nested scroll wrapper using flex-1 min-h-0 overflow-hidden and overflow-y-auto, enabling independent scrolling of child content and fixing chat message scroll behavior.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly Related PRs

  • Sachinchaurasiya360/InternHack#1279: Both PRs introduce Framer Motion–based split/underlined heading animations across student-facing pages (ContactPage vs JobLandingPage/SignalsPage/OpenSourceLandingPage).

Suggested Labels

type:bug, scope:frontend, bug, level:intermediate

Suggested Reviewers

  • Sachinchaurasiya360

Poem

🐰 A heading dances, now animated with flair,
Form fields turn transparent, no backgrounds to spare,
Nested scrolls now scroll right, no sidebar strays,
Layout flows like clover through flexbox's maze! 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning Description covers the issue, root cause, changes made, and verification steps. However, no screenshot/video is provided despite UI changes being made (layout restructuring). Add a screenshot or screen recording demonstrating the fixed scrolling behavior in the Job Agent chat messages area.
Out of Scope Changes check ⚠️ Warning ContactPage.tsx changes (framer-motion animations and form styling) appear unrelated to the StudentLayout height constraint fix for Job Agent chat scrolling. Either move ContactPage.tsx changes to a separate PR or explain their necessity and connection to the StudentLayout fix.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly and specifically describes the main change: constraining student layout height to enable inner scroll containers, which is the core fix for the Job Agent chat scrolling issue.
Linked Issues check ✅ Passed The PR addresses all objectives from issue #1452: messages area now scrolls independently via flex-1 min-h-0 constraint, header/input bar remain fixed, and child pages maintain proper scrolling behavior.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gssoc:approved Approved for GSSoC scoring gssoc level:beginner Good for first-time contributors quality:exceptional Exceptional implementation quality scope:frontend Changes to client-side / UI code type:bug Bug fixes type:design UI/UX or design-related updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Job Agent chat messages not independently scrollable — scrolls sidebar instead

1 participant