Skip to content

fix(optimizer): handle unavailable profile data state - #8944

Open
nyxsky404 wants to merge 1 commit into
JhaSourav07:mainfrom
nyxsky404:fix/optimizer-unavailable-without-profile
Open

fix(optimizer): handle unavailable profile data state#8944
nyxsky404 wants to merge 1 commit into
JhaSourav07:mainfrom
nyxsky404:fix/optimizer-unavailable-without-profile

Conversation

@nyxsky404

Copy link
Copy Markdown
Contributor

Description

Fixes #8610

Profile Optimizer was still running the analysis animation and emitting a fallback score (72) when userData was null/incomplete. It now short-circuits to a "Profile Data Unavailable" state, skips score generation, and keeps copy/download disabled until real profile fields are present.

Pillar

  • Pillar 1 — New Theme Design
  • Pillar 2 — Geometric SVG Improvement
  • Pillar 3 — Timezone Logic Optimization
  • Other (Bug fix, refactoring, docs)

Visual Preview

N/A — modal empty-state behavior change.

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 11:22
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@nyxsky404 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@retenta-bot

retenta-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

This PR addresses issue #8610 by ensuring that the Profile Optimizer correctly handles cases where user data is missing. It short-circuits the analysis process to avoid misleading fallback scores, which enhances the user experience. This change is similar to previous decisions made to fix dead code in the calculation functions, ensuring accurate evaluations. Thank you for your contribution!

@retenta-bot retenta-bot Bot changed the title fix(optimizer): show unavailable state when profile data is missing fix(optimizer): handle unavailable profile data state Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

Asset PR Size Base Size Difference Status
static/chunks/app/(root)/dashboard/[username]/page-[hash].js 57.32 KB 57.13 KB +0.19 KB (+0.34%) 🔴 Regression

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 4940.09 KB 4939.27 KB +0.83 KB (+0.02%)
Total CSS 348.46 KB 348.46 KB 0 B

@Aamod007 Aamod007 added level:intermediate Moderate complexity tasks quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected mentor:Aamod007 labels Aug 9, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good error resilience fix for the ProfileOptimizerModal! Handling the null/empty user data gracefully prevents React runtime crashes. Approved!

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

Labels

level:intermediate Moderate complexity tasks mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Profile Optimizer reports scores without profile data

3 participants