Skip to content

Conversation

Copy link

Copilot AI commented Dec 28, 2025

Implements background prefetching of issues, PRs, workflow runs, deployments, and artifacts for the 4 most recently updated repositories on app startup. Data loads instantly from cache when navigating to repo/issue details.

Changes

  • New services/prefetchService.ts: Orchestrates background data fetching

    • prefetchTopReposData(): Entry point, processes top N repos sequentially to avoid rate limits
    • prefetchRepoData(): Fetches issues, workflow runs, PR details for a single repo
    • prefetchIssueExpandedData(): Prefetches comments, related PRs, deployments, artifacts for top 5 issues
    • Configurable limits via constants: MAX_ISSUES_TO_PREFETCH, MAX_PRS_TO_PREFETCH, MAX_WORKFLOW_RUNS_FOR_ARTIFACTS
  • Updated views/Dashboard.tsx: Triggers prefetch after initial repo load

    // Non-blocking background prefetch
    if (data.length > 0) {
      prefetchTopReposData(token, data, 4).catch(err => {
        console.error('Background prefetch failed:', err);
      });
    }

Existing components (RepoDetail, IssueDetail) already leverage the cache system - no changes needed. Fresh data still fetched on navigation for cache updates.

Original prompt

This section details on the original issue you should resolve

<issue_title>on start fetch 4 top most repos issues actions prs and deployments, save them to cache so when i open repo and click issue it should be loaded instantly from cache, feel free to reorganize code</issue_title>
<issue_description>on start fetch 4 top most repos issues actions prs and deployments, save them to cache so when i open repo and click issue it should be loaded instantly from cache, feel free to reorganize code</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 28, 2025 09:35
Co-authored-by: friuns <7095563+friuns@users.noreply.github.com>
Co-authored-by: friuns <7095563+friuns@users.noreply.github.com>
Copilot AI changed the title [WIP] Fetch and cache top 4 repositories issues and deployments Prefetch and cache top 4 repos data for instant navigation Dec 28, 2025
Copilot AI requested a review from friuns December 28, 2025 09:40
@github-actions github-actions bot temporarily deployed to pull request December 28, 2025 09:41 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants