Skip to content

Fix missing activity data sync after first login#56

Open
diksha78dev wants to merge 1 commit into
laypatel13:developfrom
diksha78dev:fix/command-fail-first-login
Open

Fix missing activity data sync after first login#56
diksha78dev wants to merge 1 commit into
laypatel13:developfrom
diksha78dev:fix/command-fail-first-login

Conversation

@diksha78dev

Copy link
Copy Markdown

Description

Fixes the "No activity data yet" error that occurs when a new user runs insights commands immediately after logging in. The GitHub activity sync is now automatically triggered via a non-blocking background task upon first login, ensuring a seamless onboarding experience.

Related Issue

Closes #20

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CLI / visual change

Changes Made

  • Added background_sync_github helper to backend/app/routers/auth.py
  • Added FastAPI BackgroundTasks to the github_callback route
  • Configured the background sync to run only if user.last_synced_at is empty

Screenshots / Terminal Output

N/A (Backend behavior change)

Checklist

  • I read CONTRIBUTING.md and followed the assignment rules for this issue's label
  • My branch is up to date with develop
  • I tested my changes locally
  • I followed the existing code style and commit convention
  • I added tests where applicable (backend changes)

Notes for Reviewer

The background task instantiates its own SessionLocal to prevent SQLAlchemy session lifecycle conflicts since the main HTTP request context is closed by the time the background task executes.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

@diksha78dev is attempting to deploy a commit to the clutch Team on Vercel.

A member of the Team first needs to authorize it.

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] Command fails after first login due to missing data sync

1 participant