Skip to content

[codex] cache profile analyses#17

Draft
saurabhhhcodes wants to merge 1 commit into
0xarchit:mainfrom
saurabhhhcodes:feat/profile-response-cache
Draft

[codex] cache profile analyses#17
saurabhhhcodes wants to merge 1 commit into
0xarchit:mainfrom
saurabhhhcodes:feat/profile-response-cache

Conversation

@saurabhhhcodes

@saurabhhhcodes saurabhhhcodes commented Jun 11, 2026

Copy link
Copy Markdown

What changed

  • Added an SWR-backed fetch layer for profile analyses so repeated navigations reuse cached responses instead of refetching GitHub data every mount.
  • Moved the API call into a shared helper that normalizes errors, handles the star-gate response, and supports force refreshes.
  • Wired the existing refresh buttons through the cached mutate path so manual refreshes update the same cache entry.

Why

  • This issue calls out repeated GitHub API requests. The profile page was doing a local fetch in the client component on remount, so the same username could trigger the analysis again even when the app already had the result.

Validation

  • npm run lint
  • npm run build (passed after supplying the repo's required local environment variables)

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f22793fe-400e-4467-b991-a01f24b2eacb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

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.

1 participant