fix(settings): use store installation path in diagnostics - #13
Conversation
The manifest id is aiOverviewControl, but DMS plugin-store installs place the plugin directory under that id. The Settings diagnostic commands hardcoded the display-name casing (AiOverviewControl) instead, which does not exist on a store install and fails with "no such file or directory" on case-sensitive filesystems. Settings now resolves its own plugin directory the same way the widget already does (PluginService.getPluginPath, falling back to Qt.resolvedUrl), so every diagnostic command matches the actual on-disk path regardless of install method. Adds a CI check that fails if any QML hardcodes the plugins/AiOverviewControl or plugins/aiOverviewControl path again, and a note in the troubleshooting doc's manual PLUGIN= snippet about store-install casing.
|
Hey @emmsixx — fantastic catch, and thank you! 🎉 This is exactly the class of bug that's invisible until it bites a store-install user on a case-sensitive filesystem: every Settings diagnostic quietly A few things I specifically appreciate:
All checks are green and it merges clean — landing it now. As a small follow-up I'm tightening that same CI gate (making the grep recursive so it still fires if QML ever moves into a subdirectory) and adding a structural check that every Welcome aboard as a contributor — the plugin is genuinely better for this. 🙇 |
Follow-up to #13. Tighten the 'No hardcoded install path in QML' gate introduced in #13: the grep is now recursive with --include='*.qml' so it still fires if QML ever moves into a subdirectory. Add a new structural check mirroring the shell job's 'Provider dispatch coverage' style: every providers/<script> referenced from any .qml must exist and be executable, so a renamed/removed helper can't silently produce a broken copy-to-clipboard command. Verified the gate fails on both a dangling reference and a non-executable file. Recognize @emmsixx for #13 (the plugin's first external contribution) with a Contributors section in README.md and a Colaboradores section in docs/README.pt-BR.md. No QML changed; qmllint (all 4 files) and the new checks pass.
Summary
plugin.json's manifest id isaiOverviewControl, and that's the directory name DMS's plugin store installs the plugin under. The Settings diagnostic commands ("Test selected providers", "Test Codex app-server adapter", "Test pi session analytics adapter", "Check provider prerequisites", "Validate QML") instead hardcoded the display-name casing,AiOverviewControl. On a case-sensitive filesystem that path doesn't exist for a store install, so every copied command fails withno such file or directoryuntil the user manually fixes the casing (or lets Zsh tab-completion do it for them).The widget (
AiOverviewControlWidget.qml) already solved this in 1.2.2 viaPluginService.getPluginPath(pluginId)with aQt.resolvedUrlfallback — Settings never got the same treatment. This PR applies the identical, already-proven pattern toAiOverviewControlSettings.qmland rebuilds every diagnostic command from the resolved_pluginDirinstead of a literal path.docs/installation.md,README.md, anddocs/README.pt-BR.mdare left as-is: they document a manual checkout/archive install where the user themselves creates theAiOverviewControl-cased directory, so that casing is correct there.docs/troubleshooting.md's manualPLUGIN=snippet, since a store-installed user could otherwise hit the same casing mismatch when following it..github/workflows/ci.yml, QML lint job) that fails if any.qmlfile hardcodesplugins/AiOverviewControlorplugins/aiOverviewControlagain — confirmed it fails against the pre-fix file and passes against this branch.Test plan
qmllint AiOverviewControlWidget.qml AiOverviewControlSettings.qml AiOverviewControlI18n.qml ProviderLogo.qml— exit 0~/.config/DankMaterialShell/plugins/AiOverviewControl/providers/get-codex-usage→no such file or directory(exit 127) on a store install atplugins/aiOverviewControl~/.config/DankMaterialShell/plugins/aiOverviewControl/providers/get-codex-usage | jq .→ succeeds~/.config/DankMaterialShell/plugins/aiOverviewControl/providers/get-provider-health "codex,claude,copilot" | jq .→ succeedsrg -n 'plugins/AiOverviewControl|plugins/aiOverviewControl' .reviewed — only manual-install docs remain