Move dependency cache to Cache/SystemTools; add startup dependency checks and cleanup; simplify NextClass component#39
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ee5c070ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| return Path.GetFullPath(Path.Combine(pluginFolder, "..", "..", ExtensionsFolderName, DependencyFolderName)); | ||
| return Path.GetFullPath(Path.Combine(pluginFolder, "..", "..", CacheFolderName, DependencyFolderName)); |
There was a problem hiding this comment.
Migrate existing dependency downloads before switching cache root
GetDependencyRoot() now only resolves ../../Cache/SystemTools, but the previous DependencyPaths implementation stored ffmpeg.exe and the face-recognition pack under the old plugin-root path (../../Extensions/SystemTools, i.e. the plugin directory itself). On an in-place upgrade, EnsureOptionalDependencyState() will therefore see already-downloaded dependencies as missing on the first launch, disable EnableFfmpegFeatures/EnableFaceRecognition, and even run the face-recognition credential cleanup. Users who already had these optional features working will lose them until they manually re-download and re-enable everything, so this path switch needs a migration or fallback to the old location.
Useful? React with 👍 / 👎.
Motivation
Extensions/SystemToolsinto the global cache area so multiple plugins/installs share a predictableCache/SystemToolspath.FFmpeg, face-recognition) are enabled but required files are missing by disabling those features at startup and cleaning up stale references.下节课是component UI to a single-line layout and allow independent toggles for displaying the time range and teacher name.Description
Shared/DependencyPaths.csto use the app cache path..\..\Cache\SystemToolsand add helpersHasFfmpegDependency(),HasFaceRecognitionDependencies(), andGetFaceRecognitionRequiredPaths().Plugin.csviaEnsureOptionalDependencyState()that will disableEnableFfmpegFeaturesorEnableFaceRecognitionif required files/folders are missing, and set flags used to emit startup warnings.Shared/FaceRecognitionCredentialCleanup.csto removesystemtools.authProviders.faceRecognitionentries from ClassIsland management credential JSONs when face-recognition dependencies are not present to avoid blocking users.SettingsPage/SystemToolsSettingsViewModel.csandSettingsPage/SystemToolsSettingsPage.axaml.cs) and adjust user-facing messages to require models + runtimes for face recognition.NextClassDisplaycomponent layout and settings: remove the embedded progress/lesson control, displayPrefix / Subject / TimeRange / Teacheron a single centered line, addShowTimeRangesetting, and make the teacher field show only the name (no label). Files changed includeControls/Components/NextClassDisplayComponent.*,Models/ComponentSettings/NextClassDisplaySettings.cs, and its settings control XAML.EnableFfmpegFeaturesstate after checks by gating menu/action registration accordingly.Testing
git diff --checkandgit status --shortwith no code style errors reported.rg/sed) to verify updated call sites and settings usage succeeded.dotnet build SystemTools.csproj -p:EnableWindowsTargeting=truebut the environment does not have thedotnetSDK installed so a full build could not be executed in this session.Codex Task