Skip to content

fix: validation error SVG overflow in buildErrorResponse#3556

Merged
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
jatingow:fix/validation-error-svg-overflow
Jun 4, 2026
Merged

fix: validation error SVG overflow in buildErrorResponse#3556
JhaSourav07 merged 3 commits into
JhaSourav07:mainfrom
jatingow:fix/validation-error-svg-overflow

Conversation

@jatingow
Copy link
Copy Markdown
Contributor

@jatingow jatingow commented Jun 3, 2026

Description

Fixes #3467

The 400 and 500 error SVG templates in buildErrorResponse had three problems:

  • No viewBox (broken coordinate space)
  • No font-size (inherited browser default ~16px, too large)
  • No dominant-baseline (text misaligned vertically)
  • No truncation (long error messages overflowed the 400×150 box)

Changes

  • Added a shared buildInlineErrorSVG() helper with proper viewBox,
    font-size="13", dominant-baseline="central", and 2-line truncation
  • Replaced both broken SVG templates with calls to the helper

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.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 3, 2026

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

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the needs-details This PR is missing required description details. label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

👋 Hey @jatingow, it looks like you didn't use our PR template!

The section ## Pillar is missing from your PR description.

Please update your PR description to include all required sections so we can review this properly:

  • ## Description — What does this PR do? Which issue does it fix?
  • ## Pillar — Which contribution pillar does this fall under?
  • ## Checklist — Have you ticked off the quality checklist?

You can find the full template in CONTRIBUTING.md. Just edit your PR description and the needs-details label will be removed automatically. 🙌

@github-actions github-actions Bot added the needs-rebase This PR has merge conflicts and needs a rebase. label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

⚠️ Hey @jatingow, this PR has merge conflicts with the main branch.

Please pull the latest changes and resolve the conflicts so we can review it!

git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-lease

Once resolved, the needs-rebase label will be removed automatically on the next check. 🙌

@github-actions github-actions Bot added type:bug Something isn't working as expected and removed needs-rebase This PR has merge conflicts and needs a rebase. labels Jun 3, 2026
@Aamod007 Aamod007 added gssoc26 GSSoC 2026 mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:feature New features, additions, or enhancements level:intermediate Moderate complexity tasks labels Jun 4, 2026
@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 4, 2026
@JhaSourav07 JhaSourav07 merged commit 0e542a0 into JhaSourav07:main Jun 4, 2026
10 of 11 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

🎉 Congratulations @jatingow! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

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

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points gssoc26 GSSoC 2026 level:intermediate Moderate complexity tasks mentor:Aamod007 needs-details This PR is missing required description details. quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected type:feature New features, additions, or enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: validation error SVG overflows 400×150 viewBox on long messages

3 participants