Skip to content

fix(dashboard): keep My pulls/issues/reviews updating on all tabs#160

Merged
stylessh merged 1 commit intomainfrom
fix/github-signal-stream-my-lists
Apr 18, 2026
Merged

fix(dashboard): keep My pulls/issues/reviews updating on all tabs#160
stylessh merged 1 commit intomainfrom
fix/github-signal-stream-my-lists

Conversation

@stylessh
Copy link
Copy Markdown
Owner

@stylessh stylessh commented Apr 18, 2026

Summary

The GitHub WebSocket signal stream and polling fallback now always subscribe to pulls.mine and issues.mine, and register invalidate targets for the corresponding React Query keys, in addition to any route-specific targets.

Why

On PR detail, issue detail, or review routes, the stream previously only tracked entity-scoped signals. My lists (pulls, issues, and the review queue derived from pulls) could go stale while those tabs were open because we never subscribed to the aggregate revalidation keys.

Implementation

useGitHubSignalStream merges default targets for githubQueryKeys.pulls.mine and githubQueryKeys.issues.mine after resolving userId from any existing GitHub query key in the caller's targets.

Summary by CodeRabbit

  • Improvements
    • Enhanced real-time synchronization of personal GitHub pull requests and issues in the dashboard, ensuring your data stays current and accurate.
    • Optimized data consistency for GitHub stream updates with better handling of multiple data sources.
    • More reliable synchronization to keep dashboard information in sync with your GitHub account activity.

Merge MyPulls, MyIssues, and MyReviews (pulls.mine) targets into the
signal stream on every route so tab badges and lists stay fresh when
viewing PR/issue detail or review.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 131314e8-0bdf-49ed-9eb2-1fa5373ceaa4

📥 Commits

Reviewing files that changed from the base of the PR and between ddfb150 and 4bd242e.

📒 Files selected for processing (1)
  • apps/dashboard/src/lib/use-github-signal-stream.ts

📝 Walkthrough

Walkthrough

Added logic to derive a GitHub query scope from stream targets and merge additional "My" list targets (pulls.mine and issues.mine) into the subscription set, with de-duplication by signature, then use these merged targets in the WebSocket and polling invalidation paths.

Changes

Cohort / File(s) Summary
GitHub Signal Stream Target Merging
apps/dashboard/src/lib/use-github-signal-stream.ts
Added mergeTargetsWithMyGitHubLists function to extract a GitHub query scope, append "My" pull/issue targets, and de-duplicate by queryKey and signalKeys signature. Modified useGitHubSignalStream hook to use merged targets in WebSocket subscription and polling invalidation paths.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: ensuring 'My pulls/issues/reviews' stay updated across all tabs by continuously subscribing to these streams.
Description check ✅ Passed The description covers all required sections from the template: Summary (why), Changes (what was done), and demonstrates clear technical implementation details, though Test Plan and Screenshots are not included.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/github-signal-stream-my-lists

Comment @coderabbitai help to get the list of available commands and usage tips.

@stylessh stylessh merged commit d43e2d8 into main Apr 18, 2026
5 checks passed
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