Skip to content

fix(dashboard): add custom error UI and fallback SVG for missing users#109

Open
krishnamanocha21 wants to merge 1 commit into
JhaSourav07:mainfrom
krishnamanocha21:fix/accessibility-aria-labels
Open

fix(dashboard): add custom error UI and fallback SVG for missing users#109
krishnamanocha21 wants to merge 1 commit into
JhaSourav07:mainfrom
krishnamanocha21:fix/accessibility-aria-labels

Conversation

@krishnamanocha21
Copy link
Copy Markdown

Description

Fixes #64

This PR implements a custom, CommitPulse-themed Error UI and fallback SVG for scenarios where a searched GitHub username does not exist. It ensures that both the dashboard page and the raw API endpoint handle 404s gracefully without crashing or rendering generic server errors.

Key Changes:

  1. Frontend (app/(root)/[username]/error.tsx):

    • Replaced the generic error boundary with a sleek "Broken Monolith" (🪨🔨) design.
    • Utilized useParams to dynamically display the missing username in the error message (e.g., User "username" not found on GitHub).
    • Hid the "Try again" button specifically for 404 errors, ensuring the user is directed to the "Go back home" CTA instead.
  2. Backend / API (app/api/streak/route.ts):

    • Updated the error catch block to check for "not found" messages and return a proper 404 status code.
    • Replaced the generic 500 error SVG with a premium 600x420 "Broken Monolith" SVG that matches the project's high-fidelity aesthetic, complete with a faded/broken grid and "USER_NOT_FOUND" status text.

Pillar

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

Visual Preview

Screenshot 2026-05-15 194636

API SVG Error Fallback:
Screenshot 2026-05-16 025749

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).

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

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

A member of the Team first needs to authorize it.

@JhaSourav07
Copy link
Copy Markdown
Owner

@krishnamanocha21

CI is not passing the PR.

@JhaSourav07 JhaSourav07 added status: blocked PRs with merge conflicts, failing builds, GSSoC 2026 labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC 2026 status: blocked PRs with merge conflicts, failing builds,

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX: Build a custom Error UI for non-existent GitHub users

2 participants