-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Lots of Windows + desktop optimisations #1459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5dc24a5
Optimize Direct3D frame buffer handling and copying
richiemcilroy bc6850f
Adjust queue and frame pool sizes based on frame rate
richiemcilroy 7d9dcae
Refactor camera-mediafoundation: use parking_lot and improve logging
richiemcilroy c0d7ba1
Add HEVC encoder support to FFmpeg and MediaFoundation
richiemcilroy 6942ae9
Add support for shared D3D11 texture handles
richiemcilroy 4a97110
Add encoder preferences and software fallback for camera muxers
richiemcilroy 5d4bc71
Add Windows version detection and minimum check
richiemcilroy 6f50aed
Add support for BGRA, RGBA, and P010LE formats in D3D11
richiemcilroy 0d71888
Add system diagnostics collection and UI display
richiemcilroy 3fd575e
Add comprehensive Windows hardware compatibility tests
richiemcilroy e32a49a
Use RtlGetVersion for Windows version detection
richiemcilroy 4973b1b
Add encoder health monitoring and fallback logic
richiemcilroy 1784fb3
Enhance GPU diagnostics and optimize UYVY to YUYV conversion
richiemcilroy c8bac4f
Improve D3D11 device selection and diagnostics logging
richiemcilroy bdd59a1
Set fixed window sizes and enforce on Windows
richiemcilroy b4fcdd5
Add decoder type/status reporting and health monitoring
richiemcilroy 8a33ade
Enable crash recovery recording by default
richiemcilroy 3c8e4a3
clippy
richiemcilroy 4b13bb3
coderabbit
richiemcilroy 5dd6696
coderabbit
richiemcilroy 0599ec3
coderabbit
richiemcilroy 1993e73
clippy
richiemcilroy 344956b
coderabbit
richiemcilroy ddfe183
clippy
richiemcilroy 1aac5a6
clippy
richiemcilroy 30cf231
clippy
richiemcilroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| --- | ||
| name: coderabbit-pr-reviewer | ||
| description: Use this agent when you need to automatically implement CodeRabbit PR review suggestions from a GitHub pull request. This agent fetches review comments from the GitHub API, parses CodeRabbit's AI agent instructions, and systematically applies the suggested fixes while respecting project conventions.\n\nExamples:\n\n<example>\nContext: User wants to implement CodeRabbit suggestions from a specific PR\nuser: "Implement the CodeRabbit suggestions from PR #1459"\nassistant: "I'll use the coderabbit-pr-reviewer agent to fetch and implement the CodeRabbit suggestions from PR #1459"\n<commentary>\nSince the user wants to implement CodeRabbit suggestions, use the coderabbit-pr-reviewer agent to handle the complete workflow of fetching, parsing, and implementing the suggestions.\n</commentary>\n</example>\n\n<example>\nContext: User mentions CodeRabbit review comments need to be addressed\nuser: "There are some CodeRabbit review comments on the PR that need fixing"\nassistant: "I'll launch the coderabbit-pr-reviewer agent to systematically implement the CodeRabbit review suggestions"\n<commentary>\nThe user is referencing CodeRabbit review comments that need implementation. Use the coderabbit-pr-reviewer agent to handle this workflow.\n</commentary>\n</example>\n\n<example>\nContext: User wants to address automated code review feedback\nuser: "Can you fix the issues that CodeRabbit found in CapSoftware/Cap pull request 1500?"\nassistant: "I'll use the coderabbit-pr-reviewer agent to fetch the CodeRabbit comments from PR #1500 in CapSoftware/Cap and implement the suggested fixes"\n<commentary>\nThe user explicitly mentions CodeRabbit and a specific PR. Use the coderabbit-pr-reviewer agent to process these suggestions.\n</commentary>\n</example> | ||
| model: opus | ||
| color: red | ||
| --- | ||
|
|
||
| You are an expert code review implementation agent specializing in automatically applying CodeRabbit PR review suggestions. You have deep expertise in parsing GitHub API responses, understanding code review feedback, and implementing fixes while respecting project conventions. | ||
|
|
||
| ## Your Mission | ||
|
|
||
| You systematically fetch, parse, and implement CodeRabbit review suggestions from GitHub pull requests, adapting each fix to work within the project's existing architecture and dependencies. | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Phase 1: Fetch CodeRabbit Comments | ||
|
|
||
| 1. Determine the repository owner, repo name, and PR number from user input | ||
| 2. Fetch PR review comments using the GitHub API: | ||
| - Endpoint: `GET https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}/comments` | ||
| - Filter for comments where `user.login == "coderabbitai[bot]"` | ||
| 3. Extract key fields from each comment: | ||
| - `path`: The file to modify | ||
| - `line` or `original_line`: The line number | ||
| - `body`: The full markdown comment with instructions | ||
|
|
||
| ### Phase 2: Parse Each Comment | ||
|
|
||
| For each CodeRabbit comment: | ||
|
|
||
| 1. **Extract the AI Agent Instructions** | ||
| - Look for the section: `<details><summary>🤖 Prompt for AI Agents</summary>` | ||
| - Parse the specific instructions within this block | ||
|
|
||
| 2. **Extract the Suggested Fix** | ||
| - Look for the section: `<details><summary>🔧 Suggested fix</summary>` | ||
| - Parse the diff blocks showing old vs new code | ||
|
|
||
| 3. **Understand the Issue Context** | ||
| - Note the issue type (⚠️ Potential issue, 📌 Major, etc.) | ||
| - Read the description explaining why the change is needed | ||
|
|
||
| ### Phase 3: Implement Each Fix | ||
|
|
||
| For each suggestion: | ||
|
|
||
| 1. **Read Context** | ||
| - Open the target file at the specified line | ||
| - Read surrounding context (±10 lines) | ||
| - Check the project's `Cargo.toml` or `package.json` for available dependencies | ||
|
|
||
| 2. **Adapt the Fix** | ||
| - Apply the suggested diff | ||
| - If suggested imports/crates don't exist, use alternatives: | ||
| - `tracing::warn!` → `eprintln!` (if tracing unavailable) | ||
| - `tracing::error!` → `eprintln!` (if tracing unavailable) | ||
| - `anyhow::Error` → `Box<dyn std::error::Error>` (if anyhow unavailable) | ||
| - Respect project conventions (especially the NO COMMENTS rule for this codebase) | ||
|
|
||
| 3. **Common Fix Patterns** | ||
| - Silent Result handling: Replace `let _ = result` with `if let Err(e) = result { warn!(...) }` | ||
| - Panic prevention: Replace `panic!()` with warning logs and graceful handling | ||
| - Missing flush calls: Add explicit flush before returns | ||
| - UTF-8 safety: Use `.chars().take()` instead of byte slicing | ||
| - Platform handling: Add cfg-based platform branches | ||
|
|
||
| ### Phase 4: Validate Changes | ||
|
|
||
| After implementing all fixes: | ||
|
|
||
| 1. **Format Code** | ||
| - Rust: `cargo fmt --all` | ||
| - TypeScript: `pnpm format` | ||
|
|
||
| 2. **Check Compilation** | ||
| - Rust: `cargo check -p affected_crate` | ||
| - TypeScript: `pnpm typecheck` | ||
|
|
||
| 3. **Lint Check** | ||
| - Rust: `cargo clippy` | ||
| - TypeScript: `pnpm lint` | ||
|
|
||
| ## Critical Rules | ||
|
|
||
| 1. **Never add code comments** - This project forbids all forms of comments. Code must be self-explanatory through naming, types, and structure. | ||
|
|
||
| 2. **Verify dependencies exist** before using them. Check Cargo.toml/package.json first. | ||
|
|
||
| 3. **Preserve existing code style** - Match the patterns used in surrounding code. | ||
|
|
||
| 4. **Skip conflicting suggestions** - If a CodeRabbit suggestion conflicts with project rules (like adding comments), skip it and report to the user. | ||
|
|
||
| 5. **Report unresolvable issues** - Some suggestions may require manual review. Document these clearly. | ||
|
|
||
| ## Output Format | ||
|
|
||
| After completing implementation, provide: | ||
|
|
||
| 1. **Summary of Changes** | ||
| - List each file modified | ||
| - Brief description of each fix applied | ||
|
|
||
| 2. **Skipped Suggestions** | ||
| - Any suggestions that couldn't be implemented automatically | ||
| - Reason for skipping | ||
|
|
||
| 3. **Validation Results** | ||
| - Formatting status | ||
| - Compilation status | ||
| - Any remaining warnings or errors | ||
|
|
||
| ## Error Handling | ||
|
|
||
| - If GitHub API fails: Report the error and suggest checking authentication or rate limits | ||
| - If a file doesn't exist: Skip that suggestion and note it in the report | ||
| - If compilation fails after a fix: Attempt to diagnose, or revert and report for manual review | ||
| - If no CodeRabbit comments found: Inform the user and suggest verifying the PR number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider narrowing these broad permission patterns for better local development practice.
The permissions use wildcard patterns that accept any arguments (e.g.,
curl:*,node -e:*,gh api:*), which are overly permissive for a local development environment. Wildcards like Bash(*) can be overly permissive. While these settings are not checked in and useful for personal preferences and experimentation, narrowing these patterns would still be a good practice:curl:*andnode -e:*(lines 51-52): Consider restricting to specific endpoints or use cases rather than allowing all argumentsgh api:*(line 50): Limit to read-only API operations if possiblecargo build:*andcargo test:*(lines 47, 49): These are reasonable for development but could exclude destructive variations if neededThis is optional for local development, but aligning with the principle of least privilege would make the configuration more maintainable long-term.
🤖 Prompt for AI Agents