Inbox & PR Checks
Relevant source files
The following files were used as context for generating this wiki page:
The Inbox system provides a centralized interface for triaging work items across multiple providers including GitHub, GitLab, Linear, and Jira. It enables users to view, filter, and discuss issues or pull requests (PRs) without leaving the application environment. Sources: src/features/inbox/ui/InboxView.tsx:325-345, src/features/inbox/model/githubTasks.test.ts:311-325
PR Checks specifically integrate remote continuous integration (CI) results directly into the Inbox detail view. This module monitors the status of automated tests, builds, and linting processes for GitHub Pull Requests and GitLab Merge Requests. Sources: src/features/inbox/ui/InboxPrChecks.tsx:395-410, src/features/inbox/ui/InboxView.test.ts:130-145
System Architecture
The Inbox architecture relies on a "Remote Inspection" model. The system uses CLI integrations (e.g., gh, glab) or API requests to retrieve data from remote repositories. It explicitly avoids local clones or branch checkouts for analysis to maintain environment isolation. Sources: src/instructions/inbox.md:7-15
Data Flow for Inbox Items
The diagram shows how the system fetches and triages items from diverse providers into a unified list. Sources: src/features/inbox/ui/InboxView.tsx:430-480, src/features/inbox/model/githubTasks.test.ts:166-180
Core Components
InboxView
The primary container managing the inbox sidebar and detail pane. It handles provider connection status, search filtering, and the layout for different item kinds. Sources: src/features/inbox/ui/InboxView.tsx:180-210
InboxDetail
Renders the specific content of a selected work item. For Pull Requests, it provides tabs for Summary, Code (Diff), and Checks. Sources: src/features/inbox/ui/InboxView.tsx:1125-1160
InboxPrChecks
A specialized component that displays the status of CI jobs. It categorizes jobs by state (pass, fail, pending, skipping) and provides access to logs and failure annotations. Sources: src/features/inbox/ui/InboxPrChecks.tsx:416-450
| Component | Responsibility | Relevant Files |
|---|---|---|
InboxFiltersMenu | Manages project-specific and provider-specific visibility filters. | InboxView.tsx |
InboxCard | Displays a summary of an item in the sidebar list. | InboxView.tsx |
PrCheckRow | Represents a single CI job within the Checks tab. | InboxPrChecks.tsx |
InboxPrDiff | Renders file changes for Pull Requests. | InboxView.tsx |
Pull Request Checks Logic
PR Checks operate through periodic polling when the "Checks" tab is active. The system tracks the overall status of the PR commit (Head OID) and updates individual job results. Sources: src/features/inbox/ui/InboxDetail.polling.test.ts:60-80
Job State Handling
Jobs are sorted and displayed based on their outcome. The system prioritizes failures to ensure visibility of blocking issues.
The flow describes how the UI categorizes and reacts to different CI job outcomes. Sources: src/features/inbox/ui/InboxPrChecks.tsx:32-60, src/features/inbox/ui/InboxPrChecks.test.ts:85-110
CI Repair Integration
When a check fails, the system provides a "Fix with AI" or "Fix all failed" option. This launches an automation session to diagnose and implement a fix based on the failure logs. Sources: src/features/inbox/ui/InboxPrChecks.tsx:430-455, src/features/inbox/ui/InboxPrChecks.test.ts:125-150
Data Models
InboxItem
The standard structure for work items across all providers.
| Field | Type | Description |
|---|---|---|
kind | pr | issue | The type of work item. |
provider | github | gitlab | linear | jira | The originating service. |
state | string | The current status (e.g., "open", "closed", "merged"). |
repo | string | The repository identifier. |
number | number | The item ID/number within the provider. |
Sources: src/features/inbox/ui/InboxView.test.ts:18-35, src/features/inbox/model/githubTasks.test.ts:18-30
GithubPrCheck
Represents a single CI job within a GitHub check suite. Sources: src/features/inbox/ui/InboxPrChecks.test.ts:44-55
export type GithubPrCheck = {
name: string;
workflow: string;
state: "pass" | "fail" | "pending" | "cancel" | "unknown" | "skipping";
url: string | null;
startedAt: string | null;
completedAt: string | null;
};
Sources: src/features/inbox/ui/InboxPrChecks.test.ts:44-55
Filtering and Search
The Inbox supports multiple filtering layers:
- Provider Selection: Switch between GitHub, Linear, Jira, and GitLab. Sources: src/features/inbox/ui/InboxView.tsx:340-360
- Assignment: Toggle between items "Assigned to me" and all items. Sources: src/features/inbox/model/githubTasks.test.ts:40-55
- State: Filter by Open or Closed items. Sources: src/features/inbox/ui/InboxView.tsx:395-405
- Full-text Search: Matches against title, number, repo name, and labels. Sources: src/features/inbox/model/githubTasks.test.ts:250-270
Conclusion
The Inbox & PR Checks system acts as a high-fidelity triage layer. By integrating CI results and providing AI-assisted repair paths directly within the UI, it reduces the friction of context switching between development environments and remote project management tools. Sources: src/features/inbox/ui/InboxView.tsx:1125-1150, src/instructions/inbox.md:20-30