Review Change StackReview Change Stack
Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- βΆοΈ Resume reviews
- π Trigger review
π Walkthrough
Walkthrough
Adds viewed-file tracking across GitHub, GitLab, Bitbucket, and Azure DevOps. Adds environment persistence, RPC endpoints, provider revision APIs, optimistic client state, UI controls, Azure DevOps diff generation, and repository identity normalization.
Changes
Pull request review features
| Layer / File(s) | Summary |
|---|---|
Contracts and persistence packages/contracts/..., apps/server/src/persistence/... | Defines viewed-file states, RPC contracts, repository identity resolution, SQLite storage, and migration registration. |
Provider integrations and diffs apps/server/src/pullRequest/... | Adds provider viewed-state operations, revision lookup, Azure DevOps iteration reads, bounded content reads, local unified diff generation, and Bitbucket patch parsing. |
Service orchestration apps/server/src/pullRequest/PullRequestService.ts, apps/server/src/pullRequest/pullRequestViewedFiles.ts, apps/server/src/pullRequest/PullRequestService.test.ts | Routes host and environment storage, caches revisions, serializes writes, detects stale marks, and invalidates revision state. |
RPC, client state, and UI packages/client-runtime/..., apps/server/src/ws.ts, apps/web/src/components/pullRequest/... | Adds RPC handlers, serial command handling, optimistic overlays, debounced updates, viewed counts, stale indicators, and checkbox-driven folding. |
Repository identity and navigation packages/shared/src/git.ts, apps/web/src/lib/..., apps/web/src/components/..., docs/... | Normalizes Azure DevOps repository identities and uses the shared repository resolver in links, previews, and documentation. |
Priority: β Normal
Estimated code review effort: 5 (Critical) | ~120 minutes
Suggested reviewers: bil0000, juliusmarminge
Sequence Diagram(s)
| 1 | sequenceDiagram |
| 2 | participant Reader |
| 3 | participant PullRequestCodeTab |
| 4 | participant ClientRuntime |
| 5 | participant WebSocket |
| 6 | participant PullRequestService |
| 7 | participant Provider |
| 8 | participant ViewedRepository |
| 9 | Reader->>PullRequestCodeTab: Toggle file viewed |
| 10 | PullRequestCodeTab->>ClientRuntime: Queue viewed-state update |
| 11 | ClientRuntime->>WebSocket: pullRequests.setFilesViewed |
| 12 | WebSocket->>PullRequestService: setFilesViewed |
| 13 | PullRequestService->>Provider: Read file revision when needed |
| 14 | PullRequestService->>ViewedRepository: Store environment mark |
| 15 | PullRequestService-->>WebSocket: Complete update |
| 16 | WebSocket-->>ClientRuntime: Refresh viewed state |
| 17 | ClientRuntime-->>PullRequestCodeTab: Render viewed or changed state |
Merge Risk: π‘ Moderate Β· up to 71c85
Large Azure-created or deleted files can produce oversized diff responses, increasing memory and transport risk. This should be bounded before merge.
π₯ Pre-merge checks | β 3 | β 2
β Failed checks (2 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | β οΈ Warning | Docstring coverage is 67.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 78 functions across 52 files. (2 skipped:β¦ | Write docstrings for the functions missing them to satisfy the coverage threshold. |
| Description check | β οΈ Warning | The description contains detailed change, testing, UI, and verification information, but it does not use the required What Changed, Why, UI Changes, and Checklist sections. It also does not provide thβ¦ | Rewrite the description using the repository template headings. Add explicit What Changed and Why sections, keep the UI screenshots and interaction video under UI Changes, and complete the Checklist with the applicable items checked. |
β Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Linked Issues check | β Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | β Passed | Check skipped because no linked issues were found for this pull request. |
| Title check | β Passed | The title clearly and concisely describes the main change: adding per-file viewed marking to pull request views. |
Full details: Docstring Coverage
Explanation
Docstring coverage is 67.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 78 functions across 52 files. (2 skipped: 2 unsupported.)
Full details: Description check
Explanation
The description contains detailed change, testing, UI, and verification information, but it does not use the required What Changed, Why, UI Changes, and Checklist sections. It also does not provide the required checklist responses.
- Fix all pre-merge checks with AI
β¨ Finishing Touches
π§ͺ Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands.