feat(ui): GitHub PRs list pilot on the shared design system (U5 B1)#433
Conversation
Second B1 screen, ported from desktop-github-prs.html: - libs/ui: new PullRequestList screen — summary stat tiles, search + filter-chip toolbar, full-width PR rows (state tile open/draft/ merged/conflict, branch chips, ±diff, CI check squares with accessible labels, reviewer avatar stack with status dots, badge + time column); loading/error/empty states; responsive at 1180/760px. New shared types: UiPullRequest/UiPullRequestState/UiPrCheck/ UiPrCheckStatus/UiPrReviewer/UiPrStat. - Electron: pure github-prs-ui mappers (PRData → row shape, initials, compact relative age, stat values, client-side filtering; 8 tests) + GitHubPRsPilotView over the existing github:pr:list IPC, mounted as "GitHub PRs (new UI)" beside the legacy review view. - i18n: github:prsPilot.* keys (en+fr), navigation.githubPRsNext. listPRs only returns open PRs today, so the pilot maps state=open; draft/merged/conflict/checks render from the shared types and are exercised in Storybook until the detail flow lands in part 2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Pilot: the list handler folds every failure into an empty list, so the error state was unreachable — pair listPRs with the explicit checkGitHubConnection and surface the localized error when the project is not connected (raw details go to console.error). - i18n: rowMeta now pluralizes via i18next count (rowMeta_one/_other, en+fr), fixing "1 files"/"1 fichiers"; relative-age unit suffixes are localized (fr: min/h/j) through injectable AgeUnits. - PullRequestList a11y: the state tile is a labeled role="img" (Open/Draft/Merged/Conflict, injectable), and CI check squares announce "label: status" (passed/failed/warning/running/skipped, injectable) instead of the bare check name. 9 mapper tests green; tsc clean in libs/ui and the Electron app. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds a shared pull-request list UI with loading, error, filtering, statistics, responsive styling, and Storybook states. Frontend helpers map GitHub data into the UI model, while a new localized pilot route loads and renders the data. ChangesGitHub PRs pilot UI
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Sidebar
participant App
participant GitHubPRsPilotView
participant GitHubIPC
participant PullRequestList
Sidebar->>App: select github-prs-next
App->>GitHubPRsPilotView: render with projectId
GitHubPRsPilotView->>GitHubIPC: checkGitHubConnection(projectId)
GitHubPRsPilotView->>GitHubIPC: listPRs(projectId)
GitHubPRsPilotView->>PullRequestList: pass mapped PRs and statistics
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/ui/src/screens/PullRequestList.tsx`:
- Around line 292-294: Update the reviewer key in the pullRequest.reviewers.map
rendering to use the unique reviewer.name (GitHub login) instead of
reviewer.initials, avoiding collisions between reviewers with matching initials.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 95919759-7bc8-4c20-a7c4-93a012bed754
📒 Files selected for processing (14)
apps/frontend/src/renderer/App.tsxapps/frontend/src/renderer/__tests__/github-prs-ui.test.tsapps/frontend/src/renderer/components/GitHubPRsPilotView.tsxapps/frontend/src/renderer/components/Sidebar.tsxapps/frontend/src/renderer/lib/github-prs-ui.tsapps/frontend/src/shared/i18n/locales/en/github.jsonapps/frontend/src/shared/i18n/locales/en/navigation.jsonapps/frontend/src/shared/i18n/locales/fr/github.jsonapps/frontend/src/shared/i18n/locales/fr/navigation.jsonlibs/ui/src/client/types.tslibs/ui/src/index.tslibs/ui/src/screens/PullRequestList.csslibs/ui/src/screens/PullRequestList.stories.tsxlibs/ui/src/screens/PullRequestList.tsx
- Stories: hooks moved out of the story render into a named InteractivePullRequestList component (S6440 reliability bugs). - CSS: merged-tile foreground darkened to #8a3aa3 for WCAG AA 5.5:1 on the mockup's #f6e7fb (S7924). - JSX: explicit string expressions for the branch arrow and diff separator (S6772 ambiguous spacing). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Key reviewer avatars by the unique login (reviewer.name) with an index-qualified initials fallback — two reviewers sharing initials no longer produce duplicate React keys. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|



Summary
Second screen of the B1 "Code & review" batch, ported from
desktop-github-prs.html.libs/ui (shared design system)
UiPullRequest/UiPullRequestState/UiPrCheck/UiPrCheckStatus/UiPrReviewer/UiPrStat.Electron
github-prs-uimappers (PRData → row shape, initials, compact relative age with localizable unit suffixes, stat values, client-side filtering) — 9 tests.GitHubPRsPilotViewover the existinggithub:pr:listIPC paired withcheckGitHubConnection(the list handler folds failures into an empty list, so the connection check is what makes the error state reachable). Mounted as "GitHub PRs (new UI)" beside the legacy review view, which stays untouched.listPRsonly returns open PRs today — the pilot mapsstate=open; draft/merged/conflict/checks render from the shared types and are exercised in Storybook until the detail flow lands in part 2.i18n
github:prsPilot.*(en+fr) with pluralizedrowMeta_one/_otherand localized age units (fr: min/h/j);navigation:items.githubPRsNext.Adversarial review (find → verify)
"1 files"/"1 fichiers"(i18nextcountpluralization).role="img"), check squares read identically for pass/fail (now "label: status"), English age suffixes leaked into French (now injectable units).Verification
libs/ui+ Electron tsc clean; Storybook rebuilt, OpenPRs story visually verified against the mockup (stat tiles, chips, all four state tiles, checks, avatar stacks, badges).Next in B1
GitHub Issues / Patterns / Context on the same playbook; PR detail flow as part 2.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests