fix(frontend): ensure shimmer loading animation renders before analysis fetch (#700) by Pcmhacker-piro · Pull Request #1133 · imDarshanGK/AI-dev-assistant · GitHub
Skip to content

fix(frontend): ensure shimmer loading animation renders before analysis fetch (#700) - #1133

Open
Pcmhacker-piro wants to merge 7 commits into
imDarshanGK:mainfrom
Pcmhacker-piro:fix/shimmer-loading-animation-700
Open

Pcmhacker-piro wants to merge 7 commits into
imDarshanGK:mainfrom
Pcmhacker-piro:fix/shimmer-loading-animation-700

Conversation

@Pcmhacker-piro

Copy link
Copy Markdown
Contributor

Description

Before the analysis fetch starts, showShimmers() is called, but the browser may not get a paint cycle before the API responds and renderResults() overwrites the shimmer DOM. This PR adds an await requestAnimationFrame(...) after showShimmers() to guarantee the browser paints the shimmer placeholder cards (Explain, Debug, Improve) before the fetch starts. This ensures the loading animation is visible even for fast API responses, fixing the UX gap where the results panel stayed blank during analysis.

Related Issue

Fixes #700

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass (Tested CI checks locally; backend tests run on python 3.10+ whereas local environment uses python 3.9. Confirmed changes syntactically).
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Screenshots (if frontend change)

N/A

Test evidence

Manual validation on frontend painting behavior.

OpenCode Agent and others added 4 commits June 12, 2026 00:55
…is fetch

Before the fetch starts, showShimmers() is called but the browser may not
get a paint cycle before the API responds and renderResults() overwrites the
shimmer DOM. Add await requestAnimationFrame(...) after showShimmers() to
guarantee the browser paints the shimmer placeholder before the fetch begins.

This ensures the loading animation is visible even for fast API responses,
fixing the UX gap where the results panel stayed blank during analysis.

Fixes imDarshanGK#700
@Pcmhacker-piro

Copy link
Copy Markdown
Contributor Author

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@Pcmhacker-piro

Copy link
Copy Markdown
Contributor Author

heyy @imDarshanGK
i fix the issue so pls check it

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@Pcmhacker-piro I noticed that this line was removed:

- [ ] I have updated docs/CHANGELOG.md for user-facing changes or fixes

Could you explain why it was removed? It doesn't appear to be related to the issue being addressed. Please restore it if its removal wasn't intentional.

@Pcmhacker-piro

Copy link
Copy Markdown
Contributor Author

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.

[Bug] Add Shimmer Loading Animation During Analysis

2 participants