Conversation
- Major backend refactor: replaced ASP.NET Core/SignalR host with new stdio JSON-RPC host (`SlideGenerator.Ipc`) - Removed all SignalR, Hangfire, and ASP.NET Core infrastructure, DTOs, and related code - Introduced new projects: `SlideGenerator.Ipc` (JSON-RPC host), `SlideGenerator.Configs` (config system), `SlideGenerator.Generating` (generation runtime) - Overhauled configuration system: new `ConfigManager`, YAML-based config, simplified schema, removed old DTOs/records - Removed all legacy job abstractions, enums, and orchestration logic; new runtime encapsulates generation and validation - Updated build scripts, solution files, and documentation to reference new backend structure and usage - Updated coding conventions: enforced one top-level type per file, added StyleCop.Analyzers - Removed backend test tasks and legacy test projects - Updated Electron integration: frontend now communicates with backend via JSON-RPC IPC, removed all SignalR dependencies - Updated all documentation, guides, and developer workflow to reflect new architecture and APIs - Misc: deleted all code from old Application/Domain/Infrastructure layers, modernized C# usage, improved API docs
- Remove old projects: Configs, Jobs, Generating, Scanning; add Features and Services for domain and application logic - Move config, job, generation, and scanning code to new Features and Services projects with updated namespaces - Refactor generation models (SlidesGenerateRequest, Info/Configs separation) and scanning models/services - Update Ipc project references and endpoints to use new structure - Revise solution and project files to reflect new dependencies - Update architecture docs to describe new boundaries and rules - No business logic changes; safe refactor for maintainability and clarity
- Replace Emgu.CV with OpenCvSharp4 for cross-platform image processing; update .csproj with platform-specific runtime packages - Refactor DI setup to use IFaceDetectorModelFactory and IFaceDetectorModelProvider for improved abstraction - Update namespaces to feature-based structure for better modularity - Refactor GenerateService to use IFaceDetectorModelProvider, simplifying face detector management - Update ROI calculation logic to use feature-based calculator pattern - Add configuration and IDE support files (.gitignore, .name, betterCommentsSettings.xml, etc.) - Update architecture.md to clarify feature-based backend and shared contracts usage
- Move backend projects from src/ to backend/ root; update solution, Dockerfile, launch configs, and build scripts - Refactor architecture to feature-based layout, moving away from strict Clean Architecture rings - Rewrite and clarify backend documentation (architecture, config, job system, usage) in both English and Vietnamese - Implement stdio-based JSON-RPC 2.0 API: health, job management, slide/sheet scan, config endpoints - Redesign job system: Book/Sheet/Row hierarchy, SQLite persistence, crash recovery, concurrency control - Add feature-based services for job orchestration, YAML config management, slide generation, remote image download, scan operations - Integrate Elsa workflows for job snapshot persistence - Update CI/CD pipeline to auto-detect and conditionally run backend/frontend tests - Update project files and dependencies for .NET 10.0 - Remove unused/legacy configs and files; update .gitmodules for new submodule path - Reformat code and add XML documentation for maintainability - Update Vietnamese docs to match new backend structure and workflow
- Split codebase into Application and Domain layers for clarity - Move configs, download, and job/task models to Domain - Move scanning logic and models to Application - Update IPC endpoints to use new models and enums - Replace old Services/Features projects with new structure - Add Elsa workflow activities for presentation/workbook handling - Improve configuration and download systems for robustness - Remove obsolete code and update solution/project references - Enhance code organization, naming, and documentation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the frontend/backend integration from SignalR to a stdio JSON-RPC (Electron IPC bridge) architecture and updates related contracts, configuration, and docs accordingly.
Changes:
- Replace SignalR client usage with an RPC client + Electron
backendRequest/notification bridge. - Introduce a new backend
SlideGenerator.IpcJSON-RPC host and update build tooling/docs to target it. - Rename template-related fields from
pptx*toslide*and update UI i18n keys accordingly.
Reviewed changes
Copilot reviewed 279 out of 294 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/vite.config.ts | Removes SignalR-specific chunking/dep optimization. |
| frontend/test/mocks/handlers.ts | Switches health mock base URL import to RPC constants. |
| frontend/src/shared/services/signalrClient.ts | Removes SignalR client re-export facade. |
| frontend/src/shared/services/signalr/constants.ts | Removes SignalR constants (moved to RPC). |
| frontend/src/shared/services/signalr/baseUrl.ts | Keeps base URL logic but trims heavy docstrings. |
| frontend/src/shared/services/signalr/baseUrl.test.ts | Re-points tests to RPC constants. |
| frontend/src/shared/services/rpcClient.ts | Adds RPC client re-export facade. |
| frontend/src/shared/services/rpc/constants.ts | Adds RPC constants and env-configurable defaults. |
| frontend/src/shared/services/logging/index.ts | Renames preconfigured logger from signalR to rpc. |
| frontend/src/shared/services/backend/jobs/normalize.ts | Expands backend job status normalization mappings. |
| frontend/src/shared/services/backend/health/api.ts | Moves health check to Electron JSON-RPC call. |
| frontend/src/shared/services/backend/health/api.test.ts | Updates tests to mock electronAPI.backendRequest. |
| frontend/src/shared/services/backend/config/api.ts | Renames backend client from configHub to configClient. |
| frontend/src/shared/services/backend/clients.ts | Replaces SignalR hubs with RPC channel clients. |
| frontend/src/shared/locales/vi.ts | Renames i18n keys from pptx* to slide*. |
| frontend/src/shared/locales/en.ts | Renames i18n keys from pptx* to slide*. |
| frontend/src/shared/contexts/utils/jobUtils.ts | Updates terminology to RPC notifications/events. |
| frontend/src/shared/contexts/hooks/useJobProvider.ts | Renames export payload field to slidePath. |
| frontend/src/global.d.ts | Adds backendRequest and backend notification subscription typing. |
| frontend/src/features/process/hooks/useProcess.ts | Uses getBackendBaseUrl from RPC client facade. |
| frontend/src/features/process/tests/ProcessMenu.test.tsx | Updates module mock path to rpcClient. |
| frontend/src/features/create-task/utils/index.ts | Renames validation inputs from pptxPath to slidePath. |
| frontend/src/features/create-task/types/index.ts | Renames types/props from pptxPath to slidePath. |
| frontend/src/features/create-task/components/TemplateInputSection.tsx | Updates props and i18n keys to slide*. |
| frontend/src/features/create-task/CreateTaskMenu.tsx | Wires new slidePath state/handlers. |
| frontend/package.json | Drops SignalR dep, adds vscode-jsonrpc, upgrades versions, updates backend build project. |
| frontend/electron/preload/api.ts | Exposes backendRequest + notification wiring via IPC. |
| frontend/electron/main.ts | Adds IPC handlers for backend JSON-RPC request/notifications fanout. |
| frontend/docs/vi/overview.md | Updates architecture docs from SignalR to JSON-RPC. |
| frontend/docs/vi/development.md | Updates dev docs to RPC terminology. |
| frontend/docs/en/overview.md | Updates architecture docs from SignalR to JSON-RPC. |
| frontend/docs/en/development.md | Updates dev docs to RPC terminology. |
| frontend/README.md | Documents new Vite env vars for backend/RPC channels. |
| frontend/.env.example | Adds example env values (currently still hub-path oriented). |
| backend/tests/SlideGenerator.Tests/SlideGenerator.Tests.csproj | Removes legacy backend test project. |
| backend/tests/SlideGenerator.Tests/Presentation/SheetHubTests.cs | Removes legacy SignalR hub tests. |
| backend/tests/SlideGenerator.Tests/Presentation/JobHubSubscriptionTests.cs | Removes legacy SignalR hub subscription tests. |
| backend/tests/SlideGenerator.Tests/MSTestSettings.cs | Removes MSTest parallelization config. |
| backend/tests/SlideGenerator.Tests/Infrastructure/ConfigLoaderTests.cs | Removes legacy config loader tests. |
| backend/tests/SlideGenerator.Tests/Helpers/TestFixtures.cs | Removes legacy test fixtures. |
| backend/tests/SlideGenerator.Tests/Helpers/JsonHelper.cs | Removes JSON helper used by old hub tests. |
| backend/tests/SlideGenerator.Tests/Helpers/FakeJobStateStore.cs | Removes fake store used by old tests. |
| backend/tests/SlideGenerator.Tests/Helpers/ConfigTestHelper.cs | Removes config helper used by old tests. |
| backend/tests/SlideGenerator.Tests/Domain/PauseSignalTests.cs | Removes legacy domain tests. |
| backend/tests/SlideGenerator.Tests/Domain/JobSheetTests.cs | Removes legacy domain tests. |
| backend/tests/SlideGenerator.Tests/Domain/JobGroupTests.cs | Removes legacy domain tests. |
| backend/tests/SlideGenerator.Tests/Domain/JobConfigTests.cs | Removes legacy config default test. |
| backend/src/SlideGenerator.Presentation/SlideGenerator.Presentation.csproj | Removes legacy ASP.NET Core SignalR host project file. |
| backend/src/SlideGenerator.Presentation/Properties/launchSettings.json | Removes legacy SignalR host launch settings. |
| backend/src/SlideGenerator.Presentation/Dockerfile | Retargets Docker build/publish to SlideGenerator.Ipc. |
| backend/src/SlideGenerator.Presentation/Common/Hubs/Hub.cs | Removes legacy SignalR hub base class. |
| backend/src/SlideGenerator.Presentation/Common/Exceptions/Hubs/InvalidRequestFormat.cs | Removes legacy SignalR request format exception. |
| backend/src/SlideGenerator.Presentation/Common/Exceptions/Hubs/ConnectionNotFound.cs | Removes legacy SignalR connection exception. |
| backend/src/SlideGenerator.Infrastructure/SlideGenerator.Infrastructure.csproj | Removes legacy infrastructure project file. |
| backend/src/SlideGenerator.Infrastructure/Features/Slides/Services/SlideWorkingManager.cs | Removes legacy slide working manager implementation. |
| backend/src/SlideGenerator.Infrastructure/Features/Slides/Services/SlideTemplateManager.cs | Removes legacy slide template manager implementation. |
| backend/src/SlideGenerator.Infrastructure/Features/Slides/Exceptions/PresentationNotOpened.cs | Removes legacy slide exception. |
| backend/src/SlideGenerator.Infrastructure/Features/Slides/Adapters/WorkingPresentationAdapter.cs | Removes legacy adapter. |
| backend/src/SlideGenerator.Infrastructure/Features/Slides/Adapters/TemplatePresentationAdapter.cs | Removes legacy adapter. |
| backend/src/SlideGenerator.Infrastructure/Features/Sheets/Services/SheetService.cs | Removes legacy sheet service. |
| backend/src/SlideGenerator.Infrastructure/Features/Sheets/Exceptions/SheetNotFound.cs | Removes legacy sheet exception. |
| backend/src/SlideGenerator.Infrastructure/Features/Sheets/Adapters/WorksheetAdapter.cs | Removes legacy adapter. |
| backend/src/SlideGenerator.Infrastructure/Features/Sheets/Adapters/WorkbookAdapter.cs | Removes legacy adapter. |
| backend/src/SlideGenerator.Infrastructure/Features/Jobs/Services/JobRestoreHostedService.cs | Removes legacy hosted service. |
| backend/src/SlideGenerator.Infrastructure/Features/Jobs/Services/JobNotifier.cs | Removes legacy SignalR notifier. |
| backend/src/SlideGenerator.Infrastructure/Features/Jobs/Hangfire/SheetJobNameRegistry.cs | Removes legacy Hangfire display-name registry. |
| backend/src/SlideGenerator.Infrastructure/Features/Jobs/Hangfire/SheetJobDisplayNameAttribute.cs | Removes legacy Hangfire attribute. |
| backend/src/SlideGenerator.Infrastructure/Features/Images/Services/ImageService.cs | Removes legacy image service implementation. |
| backend/src/SlideGenerator.Infrastructure/Features/Images/Exceptions/NotImageFileUrl.cs | Removes legacy image URL exception. |
| backend/src/SlideGenerator.Infrastructure/Features/IO/FileSystem.cs | Removes legacy filesystem abstraction implementation. |
| backend/src/SlideGenerator.Infrastructure/Features/Downloads/Services/DownloadService.cs | Removes legacy download service implementation. |
| backend/src/SlideGenerator.Infrastructure/Features/Downloads/Models/DownloadImageTask.cs | Removes legacy download task wrapper. |
| backend/src/SlideGenerator.Infrastructure/Features/Configs/ConfigLoader.cs | Removes legacy config loader. |
| backend/src/SlideGenerator.Infrastructure/Common/Utilities/UrlUtils.cs | Removes legacy URL helpers. |
| backend/src/SlideGenerator.Infrastructure/Common/Utilities/PathUtils.cs | Removes legacy path helpers. |
| backend/src/SlideGenerator.Infrastructure/Common/Logging/LoggingExtensions.cs | Removes legacy Serilog wiring helper. |
| backend/src/SlideGenerator.Infrastructure/Common/Base/Service.cs | Removes legacy service base class. |
| backend/src/SlideGenerator.Framework | Updates framework submodule pointer (path change). |
| backend/src/SlideGenerator.Domain/SlideGenerator.Domain.csproj | Removes legacy domain project file (replaced). |
| backend/src/SlideGenerator.Domain/Features/Slides/IWorkingPresentation.cs | Removes legacy slide domain contracts. |
| backend/src/SlideGenerator.Domain/Features/Slides/ITemplatePresentation.cs | Removes legacy slide domain contracts. |
| backend/src/SlideGenerator.Domain/Features/Slides/Components/ShapeInfo.cs | Removes legacy slide component model. |
| backend/src/SlideGenerator.Domain/Features/Slides/Components/ImagePreview.cs | Removes legacy slide component model. |
| backend/src/SlideGenerator.Domain/Features/Sheets/Interfaces/ISheetBook.cs | Removes legacy sheet domain contracts. |
| backend/src/SlideGenerator.Domain/Features/Sheets/Interfaces/ISheet.cs | Removes legacy sheet domain contracts. |
| backend/src/SlideGenerator.Domain/Features/Jobs/States/SheetJobState.cs | Removes legacy job state model. |
| backend/src/SlideGenerator.Domain/Features/Jobs/States/JobLogEntry.cs | Removes legacy persisted log model. |
| backend/src/SlideGenerator.Domain/Features/Jobs/States/GroupJobState.cs | Removes legacy group state model. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Notifications/JobEvent.cs | Removes legacy job event model. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Interfaces/IJobStateStore.cs | Removes legacy persistence contract. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Interfaces/IJobSheet.cs | Removes legacy job contract. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Interfaces/IJobGroup.cs | Removes legacy job contract. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Interfaces/IJobEventPublisher.cs | Removes legacy publisher contract. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Enums/JobType.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Enums/JobState.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Enums/JobSheetStatus.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Enums/JobGroupStatus.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Components/PauseSignal.cs | Removes legacy pause signal. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Components/JobTextConfig.cs | Removes legacy config model. |
| backend/src/SlideGenerator.Domain/Features/Jobs/Components/JobImageConfig.cs | Removes legacy config model. |
| backend/src/SlideGenerator.Domain/Features/Images/Enums/ImageRoiType.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Domain/Features/Images/Enums/ImageCropType.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Domain/Features/IO/IFileSystem.cs | Removes legacy IO contract. |
| backend/src/SlideGenerator.Domain/Features/Downloads/IDownloadTask.cs | Removes legacy download contracts. |
| backend/src/SlideGenerator.Domain/Features/Downloads/IDownloadClient.cs | Removes legacy download contract + result model. |
| backend/src/SlideGenerator.Domain/Features/Downloads/Events/DownloadStartedArgs.cs | Removes legacy download events. |
| backend/src/SlideGenerator.Domain/Features/Downloads/Events/DownloadProgressedArgs.cs | Removes legacy download events. |
| backend/src/SlideGenerator.Domain/Features/Downloads/Events/DownloadCompletedArgs.cs | Removes legacy download events. |
| backend/src/SlideGenerator.Domain/Features/Downloads/Enums/DownloadStatus.cs | Removes legacy download enum. |
| backend/src/SlideGenerator.Domain/Features/Configs/Config.cs | Removes legacy config root model. |
| backend/src/SlideGenerator.Domain/Features/Configs/Config.ServerConfig.cs | Removes legacy server config model. |
| backend/src/SlideGenerator.Domain/Features/Configs/Config.JobConfig.cs | Removes legacy job config model. |
| backend/src/SlideGenerator.Domain/Features/Configs/Config.ImageConfig.cs | Removes legacy image config model. |
| backend/src/SlideGenerator.Domain/Features/Configs/Config.DownloadConfig.cs | Removes legacy download config model. |
| backend/src/SlideGenerator.Application/SlideGenerator.Application.csproj | Removes legacy application project file (replaced). |
| backend/src/SlideGenerator.Application/Properties/launchSettings.json | Removes legacy app launch settings. |
| backend/src/SlideGenerator.Application/Features/Slides/ISlideWorkingManager.cs | Removes legacy API contracts. |
| backend/src/SlideGenerator.Application/Features/Slides/ISlideTemplateManager.cs | Removes legacy API contracts. |
| backend/src/SlideGenerator.Application/Features/Slides/ISlideServices.cs | Removes legacy slide services contracts. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Responses/Successes/SlideScanTemplateSuccess.cs | Removes legacy SignalR DTOs. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Responses/Successes/SlideScanShapesSuccess.cs | Removes legacy SignalR DTOs. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Responses/Successes/SlideScanPlaceholdersSuccess.cs | Removes legacy SignalR DTOs. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Responses/Errors/Error.cs | Removes legacy error DTO. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Requests/SlideScanTemplate.cs | Removes legacy request DTO. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Requests/SlideScanShapes.cs | Removes legacy request DTO. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Requests/SlideScanPlaceholders.cs | Removes legacy request DTO. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Notifications/JobStatusNotification.cs | Removes legacy notifications. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Notifications/JobProgressNotification.cs | Removes legacy notifications. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Notifications/JobLogNotification.cs | Removes legacy notifications. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Notifications/JobErrorNotification.cs | Removes legacy notifications. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Notifications/GroupStatusNotification.cs | Removes legacy notifications. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Notifications/GroupProgressNotification.cs | Removes legacy notifications. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Enums/ControlAction.cs | Removes legacy enums. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Components/SlideTextConfig.cs | Removes legacy DTOs. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Components/SlideImageConfig.cs | Removes legacy DTOs. |
| backend/src/SlideGenerator.Application/Features/Slides/DTOs/Components/ShapeDto.cs | Removes legacy DTOs. |
| backend/src/SlideGenerator.Application/Features/Sheets/ISheetService.cs | Removes legacy sheet API. |
| backend/src/SlideGenerator.Application/Features/Sheets/DTOs/... | Removes legacy sheet DTOs (multiple files). |
| backend/src/SlideGenerator.Application/Features/Jobs/JobStateMapper.cs | Removes legacy mapper. |
| backend/src/SlideGenerator.Application/Features/Jobs/JobSignalRGroups.cs | Removes legacy SignalR group naming helper. |
| backend/src/SlideGenerator.Application/Features/Jobs/DTOs/... | Removes legacy jobs DTOs (multiple files). |
| backend/src/SlideGenerator.Application/Features/Jobs/Contracts/... | Removes legacy jobs contracts (multiple files). |
| backend/src/SlideGenerator.Application/Features/Images/IImageService.cs | Removes legacy image contract. |
| backend/src/SlideGenerator.Application/Features/Downloads/IDownloadService.cs | Removes legacy download contract. |
| backend/src/SlideGenerator.Application/Features/Configs/... | Removes legacy config DTOs/contracts (multiple files). |
| backend/src/SlideGenerator.Application/Common/Utilities/OutputPathUtils.cs | Removes legacy output path helper. |
| backend/src/SlideGenerator.Application/Common/Base/DTOs/Responses/Response.cs | Removes legacy response base for SignalR protocol. |
| backend/global.json | Pins .NET SDK for backend build. |
| backend/docs/vi/usage.md | Updates usage to JSON-RPC host and methods. |
| backend/docs/vi/signalr.md | Removes SignalR API doc. |
| backend/docs/vi/job-system.md | Updates job system docs to JSON-RPC. |
| backend/docs/vi/development.md | Updates dev docs to JSON-RPC host. |
| backend/docs/vi/deployment.md | Updates deployment docs to new host. |
| backend/docs/vi/architecture.md | Updates architecture docs to JSON-RPC transport. |
| backend/docs/en/usage.md | Updates usage to JSON-RPC host and methods. |
| backend/docs/en/signalr.md | Removes SignalR API doc. |
| backend/docs/en/job-system.md | Removes legacy job system doc under old structure. |
| backend/docs/en/development.md | Updates dev docs to JSON-RPC host. |
| backend/docs/en/deployment.md | Updates deployment docs to new host. |
| backend/docs/en/architecture.md | Removes legacy architecture doc under old structure. |
| backend/construction.md | Adds backend architecture guidance for agents/contributors. |
| backend/backend.config.sample.yaml | Updates sample config structure. |
| backend/SlideGenerator.slnx | Retargets solution projects to new layout. |
| backend/SlideGenerator.Ipc/Properties/launchSettings.json | Adds launch profiles for new IPC host. |
| backend/SlideGenerator.Ipc/Program.cs | Adds stdio JSON-RPC host bootstrap and DI wiring. |
| backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.cs | Adds JSON-RPC endpoint root + job update notifications. |
| backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.System.cs | Adds system.health JSON-RPC method. |
| backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.Slides.cs | Adds slide scanning JSON-RPC method. |
| backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.Jobs.cs | Adds jobs JSON-RPC methods. |
| backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.Excel.cs | Adds worksheet scan JSON-RPC method. |
| backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.Configs.cs | Adds configs JSON-RPC methods. |
| backend/SlideGenerator.Ipc/Contracts/Requests/ScanFileRequest.cs | Adds request DTO for file scanning. |
| backend/SlideGenerator.Ipc/Contracts/Requests/JobIdRequest.cs | Adds request DTO for job id calls. |
| backend/SlideGenerator.Framework | Updates framework submodule pointer. |
| backend/SlideGenerator.Domain/Tasks/Models/TextConfig.cs | Adds new task/generation config models. |
| backend/SlideGenerator.Domain/Tasks/Models/TaskStatus.cs | Adds new normalized task status enum. |
| backend/SlideGenerator.Domain/Tasks/Models/TaskControl.cs | Adds new task control enum. |
| backend/SlideGenerator.Domain/Tasks/Models/SlideInfo.cs | Adds new slide mapping model. |
| backend/SlideGenerator.Domain/Tasks/Models/ShapeInfo.cs | Adds new shape mapping model. |
| backend/SlideGenerator.Domain/Tasks/Models/OutputExtension.cs | Adds output format mapping helpers. |
| backend/SlideGenerator.Domain/Tasks/Models/ImageConfig.cs | Adds image binding model. |
| backend/SlideGenerator.Domain/Tasks/Models/GenerateRequest.cs | Adds JSON-RPC generation request model. |
| backend/SlideGenerator.Domain/Tasks/Activities/LoadWorkbook.cs | Adds Elsa workflow activity for loading workbook into transient context. |
| backend/SlideGenerator.Domain/SlideGenerator.Domain.csproj | Adds new domain project definition and deps. |
| backend/SlideGenerator.Domain/Download/Services/ResolveService.cs | Adds URL resolution/validation helper around CloudResolver. |
| backend/SlideGenerator.Domain/Configs/Services/ConfigManager.cs | Adds new YAML-based config manager/provider. |
| backend/SlideGenerator.Domain/Configs/Models/Config.cs | Adds new config root model. |
| backend/SlideGenerator.Domain/Configs/Models/Config.JobConfig.cs | Adds job config model + DB path. |
| backend/SlideGenerator.Domain/Configs/Models/Config.ImageConfig.cs | Adds image config model. |
| backend/SlideGenerator.Domain/Configs/Models/Config.DownloadConfig.cs | Adds download config model. |
| backend/SlideGenerator.Domain/Configs/Contacts/IConfigProvider.cs | Adds read-only config provider contract. |
| backend/SlideGenerator.Application/SlideGenerator.Application.csproj | Adds new application project definition. |
| backend/SlideGenerator.Application/Scanning/Services/ScanService.cs | Adds workbook/presentation scanning logic leveraging framework helpers. |
| backend/SlideGenerator.Application/Scanning/Models/Slides/SlideInfo.cs | Adds scanning response DTOs. |
| backend/SlideGenerator.Application/Scanning/Models/Slides/PresentationInfo.cs | Adds scanning response DTOs. |
| backend/SlideGenerator.Application/Scanning/Models/Sheets/WorksheetInfo.cs | Adds scanning response DTOs. |
| backend/SlideGenerator.Application/Scanning/Models/Sheets/WorkbookInfo.cs | Adds scanning response DTOs. |
| backend/README.md | Updates backend README for JSON-RPC host and new docs paths. |
| backend/Documents/en/stdio-jsonrpc.md | Adds JSON-RPC API documentation. |
| backend/Documents/en/job-system.md | Adds updated job system documentation. |
| backend/Documents/en/face-detection.md | Adds placeholder doc file. |
| backend/Documents/en/architecture.md | Adds updated architecture documentation. |
| backend/Directory.Build.props | Adds StyleCop analyzers package reference. |
| backend/.github/copilot-instructions.md | Adds backend-specific Copilot contribution guidance. |
| backend/.editorconfig | Adds backend analyzer/editorconfig preferences. |
| Taskfile.yml | Updates backend project path and disables backend test task. |
| CONTRIBUTING.md | Updates startup project/run instructions and coding convention. |
| .vscode/launch.json | Updates VS Code launch target to new IPC project. |
| .gitmodules | Updates framework submodule path. |
| .github/workflows/release.yml | Updates publish target to new IPC project. |
| .github/workflows/build.yml | Adds test detection to skip test steps when none exist. |
Files not reviewed (10)
- backend/.idea/.idea.SlideGenerator/.idea/.gitignore: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/.name: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/betterCommentsSettings.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/copilot.data.migration.agent.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/copilot.data.migration.ask.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/copilot.data.migration.ask2agent.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/discord.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/encodings.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/indexLayout.xml: Language not supported
- frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (8)
backend/SlideGenerator.Ipc/Program.cs:1
- Registering an interface as both the service type and implementation type will not compile and cannot be constructed by DI. Replace the second type parameter with the concrete factory implementation (e.g.,
FaceDetectorModelFactory) or provide a factory lambda that returns a validIFaceDetectorModelFactoryinstance.
backend/SlideGenerator.Domain/Tasks/Models/OutputExtension.cs:1 - This uses the C# 'extension blocks' syntax (
extension(...) { ... }), but the project files shown don’t setLangVersionto a value that enables this syntax. This is likely a compile error. Use conventional extension methods instead (e.g.,public static string ToFileExtension(this OutputExtension extension)andpublic static PresentationDocumentType ToPresentationDocumentType(this OutputExtension extension)).
backend/SlideGenerator.Application/Scanning/Services/ScanService.cs:1 SlideGenerator.Application.Scanning.Models.Slides.SlideInfodocumentsIndexas 1-based, butresult.Countis 0-based at the time of insertion. Useresult.Count + 1(or a separate 1-based counter) to keep the contract consistent.
backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.Slides.cs:1- The return type
Presentationdoes not match the scanning models introduced inSlideGenerator.Application.Scanning.Models.Slides(which definesPresentationInfo). As written, this is likely a compile error or a type mismatch. Also, the method nameslide.scanconflicts with repo docs that referenceslides.scan; consider standardizing the JSON-RPC method name to match documentation and frontend expectations.
backend/SlideGenerator.Ipc/Endpoints/RpcEndpoint.Excel.cs:1 - The return type
Workbookdoes not match the scanning models introduced inSlideGenerator.Application.Scanning.Models.Sheets(which definesWorkbookInfo). This likely won’t compile or will return the wrong shape. Additionally, docs referenceexcel.scanwhile this exposessheet.scan; consider aligning the JSON-RPC method name with the documented contract.
backend/SlideGenerator.Domain/Configs/Services/ConfigManager.cs:1 Path.GetPathRoot(ConfigFilePath)returns only the filesystem root (e.g.,C:\\or/), not the directory that contains the config file. This means the config directory may not be created as intended. UsePath.GetDirectoryName(ConfigFilePath)(and guard for null) to ensure the actual parent directory exists before writing.
frontend/.env.example:1- This example still documents SignalR hub path variables, but the frontend now uses RPC channel env vars (
VITE_SHEET_RPC_CHANNEL,VITE_JOB_RPC_CHANNEL,VITE_CONFIG_RPC_CHANNEL) as shown infrontend/README.mdandfrontend/src/shared/services/rpc/constants.ts. Update.env.exampleto reflect the new RPC env variables to avoid misconfiguration.
backend/SlideGenerator.Domain/Download/Services/ResolveService.cs:1 - The
HttpResponseMessageis not disposed, which can delay releasing the underlying connection back to the pool. Wrap the response in ausing(orawait usingif applicable) and consider usingSendAsyncwithHttpMethod.Headif only headers are needed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| - Read and follow [Constructon](../construction.md) before making architectural decisions. | ||
| - If `copilot-instructions.md` and `Constructon` differ, prefer `Constructon` for project-specific architecture/runtime rules. |
There was a problem hiding this comment.
Correct the spelling of 'Constructon' to 'Construction' (both the link text and the later references) for clarity and professionalism.
| - Read and follow [Constructon](../construction.md) before making architectural decisions. | |
| - If `copilot-instructions.md` and `Constructon` differ, prefer `Constructon` for project-specific architecture/runtime rules. | |
| - Read and follow [Construction](../construction.md) before making architectural decisions. | |
| - If `copilot-instructions.md` and `Construction` differ, prefer `Construction` for project-specific architecture/runtime rules. |
- Replace all references from electronAPI to desktopAPI in the source code (for Tauri compatibility). - Update configuration files and add necessary files for Tauri. - Add Tauri functions to handle requests such as opening files, saving files, and window management.
- Changed launch configurations to use `node-terminal` and simplified commands. - Added new tasks for frontend and backend development in `tasks.json`. - Updated `Taskfile.yml` to define new development tasks for frontend and backend. - Modified `.env.example` to use `localhost` instead of `127.0.0.1`. - Updated version numbers in `package.json` and `package-lock.json` to `2.0.0`. - Adjusted `tauri.conf.json` to use the new build command. - Changed placeholder text in `ServerTab.tsx` from `127.0.0.1` to `localhost`. - Updated backend URL normalization logic to use `localhost`. - Added a new method in `RpcChannelClient` for backend requests. - Created a `.gitkeep` file in the backend resources directory.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 285 out of 330 changed files in this pull request and generated 14 comments.
Files not reviewed (9)
- backend/.idea/.idea.SlideGenerator/.idea/.gitignore: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/.name: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/betterCommentsSettings.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/copilot.data.migration.agent.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/copilot.data.migration.ask.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/copilot.data.migration.ask2agent.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/discord.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/encodings.xml: Language not supported
- backend/.idea/.idea.SlideGenerator/.idea/indexLayout.xml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| ]; | ||
| const handleOpenGithub = () => { | ||
| window.electronAPI.openUrl('https://github.com/thnhmai06/SlideGenerator'); | ||
| window.desktopAPI.openUrl('https://github.com/thnhmai06/SlideGenerator'); |
There was a problem hiding this comment.
window.desktopAPI is used without a guard here. In non-desktop contexts (or before the bridge is ready), this will throw at runtime. Consider using optional chaining with a safe fallback (e.g., window.open(url, '_blank', 'noopener,noreferrer')) similar to the pattern used elsewhere in the codebase.
| key={dev.name} | ||
| className="developer-link" | ||
| onClick={() => window.electronAPI.openUrl(dev.url)} | ||
| onClick={() => window.desktopAPI.openUrl(dev.url)} |
There was a problem hiding this comment.
window.desktopAPI is used without a guard here. In non-desktop contexts (or before the bridge is ready), this will throw at runtime. Consider using optional chaining with a safe fallback (e.g., window.open(url, '_blank', 'noopener,noreferrer')) similar to the pattern used elsewhere in the codebase.
| using SlideGenerator.Domain.Configs.Contracts; | ||
| using SlideGenerator.Domain.Configs.Entities; |
There was a problem hiding this comment.
There are multiple compile-time issues in DI setup/imports: (1) the repo introduces SlideGenerator.Domain.Configs.Contacts (not Contracts) and config models under SlideGenerator.Domain.Configs.Models (not Entities), so these using directives will fail; (2) AddSingleton<IFaceDetectorModelFactory, IFaceDetectorModelFactory>() registers an interface as its own implementation, which is invalid. Update the namespaces to match the new files and register IFaceDetectorModelFactory to the concrete factory implementation type.
| serviceProvider.GetRequiredService<ConfigManager>()); | ||
| services.AddSingleton<JobSnapshotWorkflowDispatcher>(); | ||
| services.AddSingleton<DownloadService>(); | ||
| services.AddSingleton<IFaceDetectorModelFactory, IFaceDetectorModelFactory>(); |
There was a problem hiding this comment.
There are multiple compile-time issues in DI setup/imports: (1) the repo introduces SlideGenerator.Domain.Configs.Contacts (not Contracts) and config models under SlideGenerator.Domain.Configs.Models (not Entities), so these using directives will fail; (2) AddSingleton<IFaceDetectorModelFactory, IFaceDetectorModelFactory>() registers an interface as its own implementation, which is invalid. Update the namespaces to match the new files and register IFaceDetectorModelFactory to the concrete factory implementation type.
| public sealed partial class RpcEndpoint | ||
| { | ||
| [JsonRpcMethod("slide.scan")] | ||
| public async Task<Presentation> ScanSlidesAsync(ScanFileRequest request, |
There was a problem hiding this comment.
The return type Presentation does not match the scanning models added in this PR (the model shown is PresentationInfo). This will not compile unless there is another Presentation type available. Consider returning PresentationInfo (or updating the model namespace/import) so the endpoint matches the actual scan payload types.
| public async Task<Presentation> ScanSlidesAsync(ScanFileRequest request, | |
| public async Task<PresentationInfo> ScanSlidesAsync(ScanFileRequest request, |
|
|
||
| private static async Task<bool> CheckImageUri(Uri uri, HttpClient httpClient) | ||
| { | ||
| var response = await httpClient.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); |
There was a problem hiding this comment.
HttpResponseMessage is not disposed here, which can leak sockets/resources under load. Wrap the response in a using (or await using where applicable) before returning the computed boolean.
| var response = await httpClient.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); | |
| using var response = await httpClient.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); |
| VITE_SHEET_HUB_PATH=/hubs/sheet | ||
| VITE_JOB_HUB_PATH=/hubs/job | ||
| VITE_CONFIG_HUB_PATH=/hubs/config |
There was a problem hiding this comment.
This env example still references SignalR hub paths, but the PR migrates the runtime to JSON-RPC channels (and frontend/README.md references VITE_*_RPC_CHANNEL). Update .env.example to reflect the new RPC/channel env vars to avoid misleading configuration guidance.
| VITE_SHEET_HUB_PATH=/hubs/sheet | |
| VITE_JOB_HUB_PATH=/hubs/job | |
| VITE_CONFIG_HUB_PATH=/hubs/config | |
| VITE_SHEET_RPC_CHANNEL=/hubs/sheet | |
| VITE_JOB_RPC_CHANNEL=/hubs/job | |
| VITE_CONFIG_RPC_CHANNEL=/hubs/config |
| const hasScheme = /^https?:\/\//i.test(trimmedHost); | ||
| const base = hasScheme ? trimmedHost : `http://${trimmedHost}`; | ||
| const normalizedHost = base.replace(/^(https?:\/\/)localhost(?=[:/]|$)/i, '$1127.0.0.1'); | ||
| const normalizedHost = base.replace(/^(https?:\/\/)localhost(?=[:/]|$)/i, '$1localhost'); |
There was a problem hiding this comment.
This replace(...) is currently a no-op (localhost → localhost), which adds cognitive overhead without changing behavior. Either remove it, or (if the original intent was to normalize localhost to an IP for consistency) update the replacement to the desired normalized host.
| if (!trimmed) return ''; | ||
| const withScheme = /^https?:\/\//i.test(trimmed) ? trimmed : `http://${trimmed}`; | ||
| const normalizedHost = withScheme.replace(/^(https?:\/\/)localhost(?=[:/]|$)/i, '$1127.0.0.1'); | ||
| const normalizedHost = withScheme.replace(/^(https?:\/\/)localhost(?=[:/]|$)/i, '$1localhost'); |
There was a problem hiding this comment.
This replace(...) is currently a no-op (localhost → localhost), which adds cognitive overhead without changing behavior. Either remove it, or (if the original intent was to normalize localhost to an IP for consistency) update the replacement to the desired normalized host.
| "updater": { | ||
| "active": false, | ||
| "endpoints": [], | ||
| "pubkey": "" | ||
| } |
There was a problem hiding this comment.
The updater plugin is configured as inactive here, but the frontend code/docs in this PR expect a Tauri updater-based flow. If update functionality is intended to work in v2, set active: true and provide endpoints/pubkey; otherwise, consider updating the docs/UI to reflect that updates are currently disabled in Tauri builds.
|
Continue on #12 |
No description provided.