Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type/build:
- changed-files:
- any-glob-to-any-file:
- '**/*.csproj'
- '**/*.sln'
- '**/*.slnx'
- '.github/**/*'

# Changes
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Build Release
working-directory: repo
run: dotnet build CheapShotcutRandomizer.sln --configuration Release --no-restore
run: dotnet build CheapShotcutRandomizer.slnx --configuration Release --no-restore

- name: Check for benchmark project
id: check
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Build solution
working-directory: repo
run: dotnet build CheapShotcutRandomizer.sln --configuration ${{ matrix.configuration }} --no-restore
run: dotnet build CheapShotcutRandomizer.slnx --configuration ${{ matrix.configuration }} --no-restore

- name: Run tests
working-directory: repo
Expand Down Expand Up @@ -120,16 +120,16 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Check code formatting
working-directory: repo
run: dotnet format CheapShotcutRandomizer.sln --verify-no-changes --verbosity diagnostic
run: dotnet format CheapShotcutRandomizer.slnx --verify-no-changes --verbosity diagnostic
continue-on-error: true

- name: Run code analysis
working-directory: repo
run: dotnet build CheapShotcutRandomizer.sln --configuration Release /p:TreatWarningsAsErrors=false /p:WarningLevel=4
run: dotnet build CheapShotcutRandomizer.slnx --configuration Release /p:TreatWarningsAsErrors=false /p:WarningLevel=4

dependency-check:
name: Dependency Vulnerability Scan
Expand All @@ -156,7 +156,7 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Check for vulnerable packages
working-directory: repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Build for CodeQL
working-directory: repo
run: dotnet build CheapShotcutRandomizer.sln --configuration Release --no-restore
run: dotnet build CheapShotcutRandomizer.slnx --configuration Release --no-restore

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Build solution
working-directory: repo
run: dotnet build CheapShotcutRandomizer.sln --configuration Debug --no-restore
run: dotnet build CheapShotcutRandomizer.slnx --configuration Debug --no-restore

- name: Run tests with coverage
working-directory: repo
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
contents: read

env:
CLAUDE_MODEL: "claude-sonnet-4-5-20250929"
CLAUDE_MODEL: "claude-sonnet-4-6"
MAX_TOKENS: 4096
MAX_DIFF_SIZE_BYTES: 100000

Expand Down Expand Up @@ -87,15 +87,24 @@ jobs:
CHANGED_FILES=$(jq -r '.changedFiles' pr-details.json)

# Build the review prompt
PROMPT="You are an expert code reviewer for C#, .NET, Blazor, and Avalonia projects. Review this pull request and provide:
PROMPT="You are an expert code reviewer for C#, .NET, Blazor, and Avalonia projects.

1. **Summary**: Brief overview of changes
2. **Code Quality**: Assessment of code organization, patterns, and best practices
3. **Potential Issues**: Security concerns, bugs, performance issues, or breaking changes
4. **Recommendations**: Suggestions for improvements
5. **Verdict**: APPROVE, REQUEST CHANGES, or COMMENT
Review this pull request. Be extremely concise - only flag things that actually matter.

Be constructive, concise, and focus on important issues. Use markdown formatting.
Format your review as:
1. **Summary** (1-2 sentences max)
2. **Code Quality** followed by a 1-5 star rating using filled ⭐ and empty ☆ (e.g. ⭐⭐⭐⭐☆). Below the rating, add one short sentence highlighting a strength or positive aspect of the PR.
3. **Issues** (only bugs, security problems, deadlocks, resource leaks, or breaking changes - skip this section entirely if none found). Prefix each issue with a severity orb: 🔴 Critical, 🟡 Warning, 🟢 Minor. Place the orb directly before the issue title, e.g. 🔴 DependencyChecker.cs — process not disposed. Do NOT put orbs on section headers.
4. **Verdict**: One of these three:
- **APPROVE** — code is good to merge
- **REQUEST CHANGES** — there are issues that should be fixed before merging. List the specific changes needed as a short bullet list directly under the verdict
- **REJECT** — code has fundamental or critical problems that require a rethink

Rules:
- Do NOT comment on style, naming, or minor preferences
- Do NOT suggest nice-to-have improvements or refactors
- Only raise issues you are confident are real problems
- If everything looks fine, just say so in 1-2 lines and approve

---

Expand Down Expand Up @@ -159,7 +168,7 @@ jobs:
INPUT_TOKENS=$(echo "$RESPONSE" | jq -r '.usage.input_tokens // 0')
OUTPUT_TOKENS=$(echo "$RESPONSE" | jq -r '.usage.output_tokens // 0')

# Calculate estimated cost (Sonnet 4.5: $3/MTok input, $15/MTok output)
# Calculate estimated cost (Sonnet 4.6: $3/MTok input, $15/MTok output)
COST=$(echo "scale=4; ($INPUT_TOKENS * 3 + $OUTPUT_TOKENS * 15) / 1000000" | bc)

echo "📊 Token usage: ${INPUT_TOKENS} input + ${OUTPUT_TOKENS} output"
Expand Down Expand Up @@ -222,7 +231,7 @@ jobs:
echo "" >> comment.md
echo "---" >> comment.md
echo "📊 **Tokens**: ${INPUT_TOKENS} input + ${OUTPUT_TOKENS} output | 💰 **Cost**: ~\$${COST}" >> comment.md
echo "*Generated by Claude Sonnet 4.5 via GitHub Actions*" >> comment.md
echo "*Generated by Claude Sonnet 4.6 via GitHub Actions*" >> comment.md

# Post or update comment
if [ "$UPDATE_MODE" = "edit" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Restore dependencies
working-directory: repo
run: dotnet restore CheapShotcutRandomizer.sln
run: dotnet restore CheapShotcutRandomizer.slnx

- name: Build Release (Self-Contained)
working-directory: repo
Expand Down
12 changes: 6 additions & 6 deletions CheapShotcutRandomizer.Core/CheapShotcutRandomizer.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.2" />
<PackageReference Include="MudBlazor" Version="8.15.0" />
<PackageReference Include="CheapHelpers" Version="2.0.0" />
<PackageReference Include="CheapHelpers.MediaProcessing" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.3" />
<PackageReference Include="MudBlazor" Version="9.0.0" />
<PackageReference Include="CheapHelpers" Version="3.0.0" />
<PackageReference Include="CheapHelpers.MediaProcessing" Version="2.1.0" />
<PackageReference Include="FFMpegCore" Version="5.4.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.3" />
</ItemGroup>

</Project>
13 changes: 8 additions & 5 deletions CheapShotcutRandomizer.Tests/CheapShotcutRandomizer.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="bunit" Version="2.5.3" />
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="bunit" Version="2.6.2" />
<PackageReference Include="coverlet.collector" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="8.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="MudBlazor" Version="8.15.0" />
<PackageReference Include="CheapHelpers.MediaProcessing" Version="2.0.1" />
<PackageReference Include="MudBlazor" Version="9.0.0" />
<PackageReference Include="CheapHelpers.MediaProcessing" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
26 changes: 13 additions & 13 deletions CheapShotcutRandomizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@

<ItemGroup>
<!-- NuGet Package References -->
<PackageReference Include="CheapHelpers" Version="2.0.0" />
<PackageReference Include="CheapHelpers.Blazor" Version="2.0.0" />
<PackageReference Include="CheapHelpers.EF" Version="2.0.0" />
<PackageReference Include="CheapHelpers.Models" Version="2.0.0" />
<PackageReference Include="CheapHelpers.Services" Version="2.0.0" />
<PackageReference Include="SharpCompress" Version="0.44.5" />
<PackageReference Include="CheapHelpers" Version="3.0.0" />
<PackageReference Include="CheapHelpers.Blazor" Version="3.0.0" />
<PackageReference Include="CheapHelpers.EF" Version="2.0.1" />
<PackageReference Include="CheapHelpers.Models" Version="2.0.1" />
<PackageReference Include="CheapHelpers.Services" Version="2.0.1" />
<PackageReference Include="SharpCompress" Version="0.46.4" />

<!-- CheapAvaloniaBlazor Package Reference -->
<PackageReference Include="CheapAvaloniaBlazor" Version="2.0.2" />
<PackageReference Include="CheapAvaloniaBlazor" Version="3.0.0" />

<!-- MudBlazor for UI components -->
<PackageReference Include="MudBlazor" Version="8.15.0" />
<PackageReference Include="MudBlazor" Version="9.0.0" />

<!-- FFmpeg wrapper for video processing -->
<PackageReference Include="FFMpegCore" Version="5.4.0" />

<!-- Hardware detection (WMI) -->
<PackageReference Include="System.Management" Version="10.0.2" />
<PackageReference Include="System.Management" Version="10.0.3" />

<!-- Entity Framework Core for render queue database -->
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.2">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -72,7 +72,7 @@

<ItemGroup>
<ProjectReference Include="CheapShotcutRandomizer.Core\CheapShotcutRandomizer.Core.csproj" />
<PackageReference Include="CheapHelpers.MediaProcessing" Version="2.0.1" />
<PackageReference Include="CheapHelpers.MediaProcessing" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
65 changes: 0 additions & 65 deletions CheapShotcutRandomizer.sln

This file was deleted.

10 changes: 10 additions & 0 deletions CheapShotcutRandomizer.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Solution>
<Configurations>
<Platform Name="Any CPU" />
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Project Path="CheapShotcutRandomizer.Core/CheapShotcutRandomizer.Core.csproj" />
<Project Path="CheapShotcutRandomizer.csproj" />
<Project Path="CheapShotcutRandomizer.Tests/CheapShotcutRandomizer.Tests.csproj" />
</Solution>
2 changes: 1 addition & 1 deletion Components/Pages/RenderQueue.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/render-queue"

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Generate Coverage Report

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Generate Coverage Report

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Code Quality Checks

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Code Quality Checks

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / CodeQL Analysis (csharp)

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)

Check warning on line 1 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / CodeQL Analysis (csharp)

Illegal Attribute 'PanelClass' on 'MudTabs' using pattern 'LowerCase' source location '(1852,20)-(1852,79)' (https://mudblazor.com/features/analyzers)
@using CheapShotcutRandomizer.Components.Shared
@using CheapHelpers.MediaProcessing.Services
@inject IRenderQueueService QueueService
Expand Down Expand Up @@ -478,7 +478,7 @@
var dialog = await DialogService.ShowAsync<AddRenderJobDialog>("Add Render Job", parameters, options);
var result = await dialog.Result;

if (!result.Canceled && result.Data is RenderJob job)

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Generate Coverage Report

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Generate Coverage Report

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Code Quality Checks

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Code Quality Checks

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / Build and Test on windows-latest

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / CodeQL Analysis (csharp)

Dereference of a possibly null reference.

Check warning on line 481 in Components/Pages/RenderQueue.razor

View workflow job for this annotation

GitHub Actions / CodeQL Analysis (csharp)

Dereference of a possibly null reference.
{
await HandleJobAdded(job);
}
Expand Down Expand Up @@ -655,7 +655,7 @@
private async Task HandleClearAllJobs()
{
// Show confirmation dialog
bool? dialogResult = await DialogService.ShowMessageBox(
bool? dialogResult = await DialogService.ShowMessageBoxAsync(
"Clear All Jobs",
"Are you sure you want to clear all jobs from the queue? This will cancel any running jobs and delete all completed and failed jobs. This action cannot be undone.",
yesText: "Clear All",
Expand Down
18 changes: 8 additions & 10 deletions Components/Pages/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
@using CheapAvaloniaBlazor.Services
@using CheapHelpers.MediaProcessing.Services
@using SharpCompress.Archives
@using SharpCompress.Common
@inject SettingsService SettingsService
@using SharpCompress.Readers
@inject CheapShotcutRandomizer.Services.SettingsService SettingsService
@inject SvpDetectionService SvpDetection
@inject IDesktopInteropService DesktopInterop
@inject ISnackbar Snackbar
Expand Down Expand Up @@ -1681,18 +1681,15 @@ except Exception as e:
{
System.Diagnostics.Debug.WriteLine($"Starting extraction of {downloadPath}...");

using (var archive = ArchiveFactory.Open(downloadPath))
var extractionReaderOptions = new ReaderOptions { ExtractFullPath = true, Overwrite = true };
using (var archive = ArchiveFactory.OpenArchive(downloadPath, extractionReaderOptions))
{
System.Diagnostics.Debug.WriteLine($"Archive opened, extracting {archive.Entries.Count()} entries...");

int extractedCount = 0;
foreach (var entry in archive.Entries.Where(e => !e.IsDirectory))
{
entry.WriteToDirectory(extractPath, new ExtractionOptions()
{
ExtractFullPath = true,
Overwrite = true
});
entry.WriteToDirectory(extractPath);
extractedCount++;

// Log progress every 10 files
Expand Down Expand Up @@ -2211,10 +2208,11 @@ except Exception as e:
{
try
{
using var archive = SharpCompress.Archives.SevenZip.SevenZipArchive.Open(modelDownloadPath);
var modelReaderOptions = new ReaderOptions { ExtractFullPath = true, Overwrite = true };
using var archive = SharpCompress.Archives.SevenZip.SevenZipArchive.OpenArchive(modelDownloadPath, modelReaderOptions);
foreach (var entry in archive.Entries.Where(e => !e.IsDirectory))
{
entry.WriteToDirectory(modelExtractPath, new SharpCompress.Common.ExtractionOptions { ExtractFullPath = true, Overwrite = true });
entry.WriteToDirectory(modelExtractPath);
}
modelExtracted = true;
}
Expand Down
Loading
Loading