Skip to content

fix: perfect dashboard auth overlay positioning on mobile and desktop - #108

Merged
nitinmohan18 merged 1 commit into
mainfrom
ui-imp
Jul 19, 2026
Merged

fix: perfect dashboard auth overlay positioning on mobile and desktop#108
nitinmohan18 merged 1 commit into
mainfrom
ui-imp

Conversation

@nitinmohan18

@nitinmohan18 nitinmohan18 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator
  • Improved home page coloring by neutralizing secondary accents to make primary actions stand out more (90/10 rule).
  • Refined the AI card size and added smooth animations for a more premium, lag-free experience.
  • Resolved an issue where the auth overlay modal was clipping or overlapping adjacent sections.
  • Re-implemented mobile behavior to use a perfectly contained sticky track, allowing the modal to smoothly scroll with the user without overlapping.
  • Re-implemented desktop behavior to use strict absolute centering, locking the modal perfectly in the center of the viewport and eliminating overflow issues.

Summary by CodeRabbit

  • New Features

    • Added an animated typing-and-response interaction to the landing page’s AI demonstration.
    • Improved the dashboard sign-in overlay with a more responsive layout and refreshed visual styling.
  • Bug Fixes

    • Refined page and section sizing to account for the header, improving vertical alignment across screen sizes.
    • Improved dashboard divider visibility and full-width rendering.
  • Style

    • Updated landing page gradients, buttons, typography, spacing, and feature presentation for a more polished experience.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyper-learning-tech Ready Ready Preview, Comment Jul 19, 2026 5:00am

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Landing and page layout

Layer / File(s) Summary
Viewport-aware page layouts
app/(public)/cgpa-calculator/page.tsx, app/(public)/creators/page.tsx, components/contact/ContactSection.tsx, features/landing/*
Public and landing sections now use calc(100vh - 72px) minimum heights, with centered creators and contact content.
Animated landing hero chat
features/landing/hero.tsx
The hero mockup now types a prompt, transitions to submitted user and assistant messages, and updates related styling and animations.

Dashboard presentation

Layer / File(s) Summary
Dashboard overlay and divider presentation
app/dashboard/page.tsx, components/dashboard/auth-overlay.tsx
The dashboard divider gains explicit width and stacking, while the authentication overlay receives responsive positioning and updated card, onboarding, and action styling.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Hero
  participant TypingEffect
  participant AnimatePresence
  participant AIMockup
  Hero->>TypingEffect: start prompt interval
  TypingEffect->>Hero: update typedText and messageSent
  Hero->>AnimatePresence: render submitted chat state
  AnimatePresence->>AIMockup: animate user and assistant content
Loading

Possibly related PRs

Suggested reviewers: imuniqueshiv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately highlights the main auth overlay positioning fix on mobile and desktop.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ui-imp

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.

@nitinmohan18
nitinmohan18 merged commit a40c551 into main Jul 19, 2026
3 checks passed
@nitinmohan18
nitinmohan18 deleted the ui-imp branch July 19, 2026 05:01
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @nitinmohan18!

Thank you for contributing to HyperLearningTech.

Your pull request has been successfully merged into main.

📦 Merge Summary

🚀 Keep Contributing

  • Follow the CONTRIBUTING.md guidelines.
  • Keep each Pull Request focused on a single feature or fix.
  • Run formatting, linting, type checking, and a production build before opening a PR.

Thank you for helping make HyperLearningTech better.

Happy Coding! 🚀

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
app/dashboard/page.tsx (2)

60-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove redundant w-full class.

The inset-x-0 class applies both left: 0 and right: 0, which makes the element implicitly span the full width of its relative parent. Adding w-full is redundant.

♻️ Proposed refactor
-      <div className="absolute inset-x-0 top-0 z-50 h-px w-full bg-gradient-to-r from-transparent via-blue-500/30 to-transparent" />
+      <div className="absolute inset-x-0 top-0 z-50 h-px bg-gradient-to-r from-transparent via-blue-500/30 to-transparent" />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/dashboard/page.tsx` at line 60, Remove the redundant w-full utility from
the div’s className, while preserving the existing inset-x-0 positioning and all
other styling classes.

60-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove redundant w-full class.

The inset-x-0 class applies both left: 0 and right: 0, which makes the element implicitly span the full width of its relative parent. Adding w-full is redundant.

♻️ Proposed refactor
-      <div className="absolute inset-x-0 top-0 z-50 h-px w-full bg-gradient-to-r from-transparent via-blue-500/30 to-transparent" />
+      <div className="absolute inset-x-0 top-0 z-50 h-px bg-gradient-to-r from-transparent via-blue-500/30 to-transparent" />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/dashboard/page.tsx` at line 60, Remove the redundant w-full utility from
the div’s className, keeping inset-x-0 and all other positioning and styling
classes unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@features/landing/hero.tsx`:
- Around line 56-73: Update the useEffect timer lifecycle so its cleanup tracks
and clears the outer timer, the typing interval, and the inner 200ms timeout. Do
not return cleanup from inside the setTimeout callback; retain timer handles in
the effect scope and clear them all on unmount, including during StrictMode
remounts.
- Line 113: Replace each affected min-height expression with valid Tailwind calc
syntax using calc(100vh_-_72px), and make the navbar offset responsive by using
the h-16 value below md and the 72px value at md and above. Apply this
consistently in features/landing/hero.tsx:113,
app/(public)/cgpa-calculator/page.tsx:73, app/(public)/creators/page.tsx:85,
components/contact/ContactSection.tsx:41, features/landing/ai-demo.tsx:120,
features/landing/cgpa-feature.tsx:17, features/landing/faq.tsx:41,
features/landing/features.tsx:34, and features/landing/stats.tsx:86.

---

Nitpick comments:
In `@app/dashboard/page.tsx`:
- Line 60: Remove the redundant w-full utility from the div’s className, while
preserving the existing inset-x-0 positioning and all other styling classes.
- Line 60: Remove the redundant w-full utility from the div’s className, keeping
inset-x-0 and all other positioning and styling classes unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f649ac38-b973-47ae-9ef9-ac3845e9e7da

📥 Commits

Reviewing files that changed from the base of the PR and between a5608a4 and c9fa7fa.

📒 Files selected for processing (11)
  • app/(public)/cgpa-calculator/page.tsx
  • app/(public)/creators/page.tsx
  • app/dashboard/page.tsx
  • components/contact/ContactSection.tsx
  • components/dashboard/auth-overlay.tsx
  • features/landing/ai-demo.tsx
  • features/landing/cgpa-feature.tsx
  • features/landing/faq.tsx
  • features/landing/features.tsx
  • features/landing/hero.tsx
  • features/landing/stats.tsx

Comment thread features/landing/hero.tsx
Comment on lines +56 to +73
useEffect(() => {
let i = 0;
const timer = setTimeout(() => {
const interval = setInterval(() => {
setTypedText(fullText.slice(0, i + 1));
i++;
if (i >= fullText.length) {
clearInterval(interval);
setTimeout(() => {
setMessageSent(true);
setTypedText("");
}, 200);
}
}, 15);
return () => clearInterval(interval);
}, 400);
return () => clearTimeout(timer);
}, []);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Interval and inner timeout leak on unmount. The effect's returned cleanup only clears the outer timer. The return () => clearInterval(interval) on Line 70 is returned from the setTimeout callback and is discarded, so once typing starts, interval (and the 200ms inner setTimeout) are never cleared. On unmount mid-typing—or on React StrictMode's double mount in dev—the interval keeps firing setTypedText/setMessageSent on an unmounted component.

🔒 Proposed fix: track and clear all timers in the effect cleanup
   useEffect(() => {
     let i = 0;
-    const timer = setTimeout(() => {
-      const interval = setInterval(() => {
+    let interval: ReturnType<typeof setInterval>;
+    let doneTimeout: ReturnType<typeof setTimeout>;
+    const timer = setTimeout(() => {
+      interval = setInterval(() => {
         setTypedText(fullText.slice(0, i + 1));
         i++;
         if (i >= fullText.length) {
           clearInterval(interval);
-          setTimeout(() => {
+          doneTimeout = setTimeout(() => {
             setMessageSent(true);
             setTypedText("");
           }, 200);
         }
       }, 15);
-      return () => clearInterval(interval);
     }, 400);
-    return () => clearTimeout(timer);
+    return () => {
+      clearTimeout(timer);
+      clearInterval(interval);
+      clearTimeout(doneTimeout);
+    };
   }, []);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
useEffect(() => {
let i = 0;
const timer = setTimeout(() => {
const interval = setInterval(() => {
setTypedText(fullText.slice(0, i + 1));
i++;
if (i >= fullText.length) {
clearInterval(interval);
setTimeout(() => {
setMessageSent(true);
setTypedText("");
}, 200);
}
}, 15);
return () => clearInterval(interval);
}, 400);
return () => clearTimeout(timer);
}, []);
useEffect(() => {
let i = 0;
let interval: ReturnType<typeof setInterval>;
let doneTimeout: ReturnType<typeof setTimeout>;
const timer = setTimeout(() => {
interval = setInterval(() => {
setTypedText(fullText.slice(0, i + 1));
i++;
if (i >= fullText.length) {
clearInterval(interval);
doneTimeout = setTimeout(() => {
setMessageSent(true);
setTypedText("");
}, 200);
}
}, 15);
}, 400);
return () => {
clearTimeout(timer);
clearInterval(interval);
clearTimeout(doneTimeout);
};
}, []);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@features/landing/hero.tsx` around lines 56 - 73, Update the useEffect timer
lifecycle so its cleanup tracks and clears the outer timer, the typing interval,
and the inner 200ms timeout. Do not return cleanup from inside the setTimeout
callback; retain timer handles in the effect scope and clear them all on
unmount, including during StrictMode remounts.

Comment thread features/landing/hero.tsx
<section
id="Home"
className="relative overflow-hidden scroll-mt-24 border-b border-border dark:bg-transparent"
className="relative overflow-hidden scroll-mt-24 border-b border-border dark:bg-transparent min-h-[calc(100vh-72px)] flex items-center w-full"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

CSS calc requires whitespace around minus operator calc(100vh-72px) invalid

💡 Result:

Yes, the CSS calc function requires whitespace around the plus (+) and minus (-) operators to be valid [1][2][3]. Therefore, calc(100vh-72px) is invalid syntax and will be discarded by the browser [4][2]. The requirement exists because the minus sign (-) can also be part of a negative number or a CSS identifier (e.g., in a unit or a keyword) [5][2]. Without whitespace, the browser may misinterpret the expression—for example, it might parse calc(100vh-72px) as a single value rather than a subtraction operation [2][3]. By contrast, the multiplication (*) and division (/) operators do not require whitespace, although adding it for consistency is permitted and recommended [1][6][7]. To make your expression valid, ensure there is a space on both sides of the minus operator: calc(100vh - 72px) [2][7]

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== occurrences ==\n'
rg -n 'min-h-\[calc\(100vh-72px\)\]|md:h-\[72px\]|h-16|72px' \
  features app components -g '!**/node_modules/**'

printf '\n== hero snippet ==\n'
sed -n '100,125p' features/landing/hero.tsx

printf '\n== contact snippet ==\n'
sed -n '1,70p' components/contact/ContactSection.tsx

printf '\n== header/nav snippet candidates ==\n'
rg -n 'md:h-\[72px\]|h-16|header|navbar' app features components -g '!**/node_modules/**'

Repository: imuniqueshiv/HyperLearningTech

Length of output: 9864


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== file list for likely header/layout files ==\n'
git ls-files | rg '(^app/|^features/|^components/).*(header|nav|navbar|layout|hero|contact|faq|features|stats|ai-demo|cgpa|creators)'

printf '\n== maybe shared shell/header component ==\n'
rg -n 'md:h-\[72px\]|h-16|min-h-\[calc\(100vh-72px\)\]' app features components -g '!**/node_modules/**'

Repository: imuniqueshiv/HyperLearningTech

Length of output: 4356


Use calc(100vh_-_72px) and make the offset responsive.

  • min-h-[calc(100vh-72px)] won’t parse as a valid calc() value; change each occurrence to min-h-[calc(100vh_-_72px)].
  • The navbar is h-16 below md and md:h-[72px], so a fixed 72px offset only matches desktop.
📍 Affects 9 files
  • features/landing/hero.tsx#L113-L113 (this comment)
  • app/(public)/cgpa-calculator/page.tsx#L73-L73
  • app/(public)/creators/page.tsx#L85-L85
  • components/contact/ContactSection.tsx#L41-L41
  • features/landing/ai-demo.tsx#L120-L120
  • features/landing/cgpa-feature.tsx#L17-L17
  • features/landing/faq.tsx#L41-L41
  • features/landing/features.tsx#L34-L34
  • features/landing/stats.tsx#L86-L86
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@features/landing/hero.tsx` at line 113, Replace each affected min-height
expression with valid Tailwind calc syntax using calc(100vh_-_72px), and make
the navbar offset responsive by using the h-16 value below md and the 72px value
at md and above. Apply this consistently in features/landing/hero.tsx:113,
app/(public)/cgpa-calculator/page.tsx:73, app/(public)/creators/page.tsx:85,
components/contact/ContactSection.tsx:41, features/landing/ai-demo.tsx:120,
features/landing/cgpa-feature.tsx:17, features/landing/faq.tsx:41,
features/landing/features.tsx:34, and features/landing/stats.tsx:86.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant