Skip to content

Add shimmer loading skeleton for analysis dashboard#86

Open
kushwahnihal25-rgb wants to merge 1 commit into
jpdevhub:mainfrom
kushwahnihal25-rgb:main
Open

Add shimmer loading skeleton for analysis dashboard#86
kushwahnihal25-rgb wants to merge 1 commit into
jpdevhub:mainfrom
kushwahnihal25-rgb:main

Conversation

@kushwahnihal25-rgb

@kushwahnihal25-rgb kushwahnihal25-rgb commented Jun 8, 2026

Copy link
Copy Markdown

Description

Description

Added a shimmer loading skeleton for the Analysis Dashboard to improve the user experience while scan data is loading.

Changes Made

  • Added ScanSkeleton component
  • Added shimmer loading animation
  • Added loading placeholders for dashboard content
  • Improved loading state UX on refresh/navigation

Testing

  • Verified skeleton appears during loading
  • Verified shimmer animation works correctly
  • Verified dashboard renders after loading completes

Checklist

  • npm run lint passes with no errors
  • npm run build compiles without TypeScript errors
  • python -m pytest passes (including new tests I added)
  • No .env files, API keys, secrets, model weights, or __pycache__ in this diff
  • Branch is rebased on main, not merged

Summary by CodeRabbit

  • Style
    • Added animated skeleton loaders and shimmer effects to the Analysis Dashboard for improved visual feedback during loading states.

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

@kushwahnihal25-rgb is attempting to deploy a commit to the karan3431's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🎉 Thank you for your Pull Request! We're thrilled to have your contribution to FreshScan AI.

Before we review, please make sure you have:

  • Followed the CONTRIBUTING.md guidelines.
  • Ensured all automated CI checks (linting, tests) are passing.
  • Checked that your commit messages follow the Conventional Commits format.

A maintainer will review your code as soon as possible!

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid input: expected object, received boolean at "reviews.auto_review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

This PR upgrades frontend dependencies and introduces a skeleton loading UI with shimmer animation to the Analysis Dashboard. The CSS adds a shimmer keyframes animation, the dashboard component defines a reusable ScanSkeleton placeholder, and the loading flow now renders that skeleton while data loads.

Changes

Skeleton Loading UI and Dependency Updates

Layer / File(s) Summary
Dependency version updates
package.json
Frontend dependencies are bumped: lucide-react (1.16.0 → 1.17.0), react (19.2.4 → 19.2.7), react-dom (19.2.4 → 19.2.7), and react-router-dom (7.14.0 → 7.17.0).
Skeleton loading UI and integration
src/index.css, src/pages/AnalysisDashboard.tsx
CSS shimmer animation and .skeleton-shimmer class provide the animated gradient effect; ScanSkeleton component defines the placeholder layout; dashboard loading state now renders ScanSkeleton instead of message list; module-level logging added for debugging.

🎯 2 (Simple) | ⏱️ ~8 minutes

A shimmer dance through React's halls so bright,
Where skeletons gleam with animated light,
Dependencies fresh, the UI takes flight—
Loading states shimmer, a pleasant sight! 🐰✨

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main changes: adding a shimmer loading skeleton component to the Analysis Dashboard, which is the primary focus across all modified files.
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.

✏️ 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.

@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

🤖 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 `@src/index.css`:
- Around line 418-419: Remove the blank line before the animation declaration to
satisfy the declaration-empty-line-before lint rule: ensure the CSS block with
the properties background-size and animation has no empty line between them
(i.e., place animation: shimmer 1.5s linear infinite; directly after
background-size: 200% 100%;), then re-run stylelint to confirm the violation is
resolved.

In `@src/pages/AnalysisDashboard.tsx`:
- Line 1: Remove the module-level console.log("ANALYSIS DASHBOARD LOADED") in
AnalysisDashboard.tsx; either delete this statement or replace it with a
debug-only/logging facility (e.g., use an environment-guard like
process.env.NODE_ENV === "development" or the app's logger) so it does not emit
in production. Target the top-level console.log call in the AnalysisDashboard
module and ensure no other module-level side-effect logs remain.
🪄 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 Plus

Run ID: b5ded911-7428-41fd-8a9c-e0dbc420f0c5

📥 Commits

Reviewing files that changed from the base of the PR and between d33d33e and 4b5b5c2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • src/index.css
  • src/pages/AnalysisDashboard.tsx

Comment thread src/index.css
Comment on lines +418 to +419
background-size: 200% 100%;
animation: shimmer 1.5s linear infinite;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix stylelint violation before animation declaration (Line 418).

There is an empty line before animation that violates declaration-empty-line-before and can fail linting.

Proposed fix
 .skeleton-shimmer {
   background: linear-gradient(
     90deg,
     var(--color-surface-mid) 25%,
     var(--color-surface-highest) 50%,
     var(--color-surface-mid) 75%
   );
-
   background-size: 200% 100%;
   animation: shimmer 1.5s linear infinite;
 }
📝 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
background-size: 200% 100%;
animation: shimmer 1.5s linear infinite;
.skeleton-shimmer {
background: linear-gradient(
90deg,
var(--color-surface-mid) 25%,
var(--color-surface-highest) 50%,
var(--color-surface-mid) 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s linear infinite;
}
🧰 Tools
🪛 Stylelint (17.12.0)

[error] 418-418: Expected no empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 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 `@src/index.css` around lines 418 - 419, Remove the blank line before the
animation declaration to satisfy the declaration-empty-line-before lint rule:
ensure the CSS block with the properties background-size and animation has no
empty line between them (i.e., place animation: shimmer 1.5s linear infinite;
directly after background-size: 200% 100%;), then re-run stylelint to confirm
the violation is resolved.

Source: Linters/SAST tools

@@ -1,3 +1,4 @@
console.log("ANALYSIS DASHBOARD LOADED");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove module-level debug log (Line 1).

This logs on every module load in production and adds noise to client logs.

Proposed fix
-console.log("ANALYSIS DASHBOARD LOADED");
 import { useEffect, useState } from 'react';
📝 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
console.log("ANALYSIS DASHBOARD LOADED");
import { useEffect, useState } from 'react';
🤖 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 `@src/pages/AnalysisDashboard.tsx` at line 1, Remove the module-level
console.log("ANALYSIS DASHBOARD LOADED") in AnalysisDashboard.tsx; either delete
this statement or replace it with a debug-only/logging facility (e.g., use an
environment-guard like process.env.NODE_ENV === "development" or the app's
logger) so it does not emit in production. Target the top-level console.log call
in the AnalysisDashboard module and ensure no other module-level side-effect
logs remain.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant