How AI Image Studio is verified before merge and release.
Workflow: .github/workflows/ci.yml
Triggers: push and pull_request to main / master.
graph LR
FE[Frontend UI<br/>ubuntu]
WIN[Windows plug-in<br/>windows-latest]
MAC[macOS plug-in<br/>macos-14]
FE --> Lint[pnpm lint]
FE --> BuildUI[pnpm build]
FE --> Wwwroot[wwwroot diff check]
WIN --> BuildWin[dotnet build .sln]
WIN --> TestWin[dotnet test Backend.Tests]
MAC --> BuildMac[dotnet build Mac.sln]
MAC --> TestMac[dotnet test Backend.Tests]
MAC --> Publish[osx-arm64 backend publish]
MAC --> Artifacts[.rhp + sidecar binary]
| Step | Command | Purpose |
|---|---|---|
| Install | pnpm install --frozen-lockfile |
Reproducible deps |
| Lint | pnpm run lint |
ESLint + TypeScript rules |
| Build | pnpm run build |
tsc + Vite → Backend/wwwroot |
| Verify wwwroot | git diff --exit-code wwwroot |
Committed assets match build |
| Step | Command | Purpose |
|---|---|---|
| Restore / build | dotnet build RhinoImageStudio.sln |
Backend, Shared, Plugin, RhinoCommon |
| Test | dotnet test RhinoImageStudio.Backend.Tests |
Unit tests |
Requires Windows Desktop SDK (WebView2 plugin project).
| Step | Command | Purpose |
|---|---|---|
| Build | dotnet build RhinoImageStudio.Mac.sln |
Mac plugin + RhinoCommon net8 |
| Test | dotnet test RhinoImageStudio.Backend.Tests |
Same tests as Windows |
| Publish | dotnet publish Backend osx-arm64 self-contained |
Sidecar for .rhp bundle |
| Verify | .rhp exists + backend binary executable |
Release artifact sanity |
cd src
dotnet build RhinoImageStudio.Mac.sln # macOS
dotnet build RhinoImageStudio.sln # Windows
dotnet test RhinoImageStudio.Backend.Tests/RhinoImageStudio.Backend.Tests.csprojcd src/RhinoImageStudio.UI
pnpm install
pnpm run lint
pnpm run build # updates ../RhinoImageStudio.Backend/wwwroot
pnpm run dev # Vite dev server (backend must run separately)cd src/RhinoImageStudio.Backend
dotnet run # http://localhost:17532Project: src/RhinoImageStudio.Backend.Tests/
| Test class | Covers |
|---|---|
DisplayModeMappingTests |
Rhino name ↔ enum parsing, sentinels (Current, viewport) |
FalInputBuilderTests |
Augmented prompt passed to fal payload |
Run:
dotnet test src/RhinoImageStudio.Backend.Tests --configuration ReleasePrefer testing pure functions and small services without spinning up WebApplicationFactory unless necessary:
DisplayModeMapping,GenerateRequestValidator,FalInputBuilder- Shared contract serialization round-trips
Place new files in RhinoImageStudio.Backend.Tests/ and reference Shared + Backend projects.
Config: src/RhinoImageStudio.UI/eslint.config.js
| Rule | Level |
|---|---|
@typescript-eslint/no-explicit-any |
warn |
@typescript-eslint/no-unused-vars |
error |
pnpm --dir src/RhinoImageStudio.UI run lintAutomated tests do not launch Rhino. Before release:
- Build plugin → load
.rhpin Rhino 8 ImageStudiocommand → panel opens- Capture viewport → generation completes → SSE progress updates
- Mask inpainting with Gemini model
- Settings → save Gemini + fal keys → verify encrypted storage
scripts/install-mac-plugin.shImageStudioStartBackend→ImageStudioOpen- Display mode list populated (not empty/stub)
- Capture + generate flow
- Bridge token: restart backend — plugin reconnects
See macOS plugin setup for full steps.
| Check | Windows | macOS |
|---|---|---|
| Solution builds | RhinoImageStudio.sln |
RhinoImageStudio.Mac.sln |
| Unit tests | ✓ | ✓ |
| UI build + wwwroot | ✓ | ✓ |
| Plugin loads in Rhino 8 | Manual | Manual |
| AI generation E2E | Manual | Manual |
| Secret migration (existing DPAPI) | Manual | N/A |