Skip to content

plugins: explain the restart a stale file list needs - #4077

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
bernardopg:plugins/explain-stale-file-list
Nov 2, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
bernardopg:plugins/explain-stale-file-list

Conversation

@bernardopg

Copy link
Copy Markdown
Contributor

Description

When a plugin fails with Qt's File name case mismatch, add a hint under the error in the plugin's details. Qt reports it when a file exists on disk but isn't in the directory list it cached the first time the running shell used that directory. In practice that means a plugin update added a new QML/JS file, and the plugin stays disabled until dms restart. The hint says to restart DMS, or to check the import's capitalization if the plugin wasn't updated, because the real case mismatch produces the same message.

The Plugins page and the plugin's own page already show title + details, so nothing else in the UI changes. The string is new because no existing term fit. It has translator context, and the term freeze is not active. PLUGINS/README.md also gets a line under "Versioning" so plugin authors know to put new files in a new subdirectory, or to tell users the update needs a restart.

There's no real fix on the shell side for the cache itself: Qt only clears it with clearComponentCache(), and that isn't exposed to QML. So this makes the failure understandable rather than removing it.

The test checks that this error gets the hint and that a different load error doesn't. It fails on master.

This touches the same lines as #4076, so whichever is merged second needs a small rebase. I'll do it.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Fixes #4075

Screenshots / video

A plugin update that adds DemoHelper.js next to the widget, followed by the rescan that the update runs.

Before:

before

After:

after

After dms restart the updated plugin loads, as the hint says. Tested live on v2.0.0 with this patch on Hyprland.

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean (no Go changes)
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: dms: warn plugin authors about files added in an update dux-docs#191

python3 quickshell/tests/run-qml.py passes (logic, qt, lock), and so do the prek hooks on the changed files, including the i18n checks.

A good part of this change was written with an AI assistant, and it helped write this description. I reviewed and tested all of it and can explain every line.

@github-actions github-actions Bot added docs fix ui Quickshell UI under quickshell/ labels Nov 2, 2026
@bbedward

bbedward commented Nov 2, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: the File name case mismatch hint in PluginService.loadPlugin (error path, _setLoadError consumers, toast/settings display), the I18n usage and translator context, the test mock changes and new test, and the README note. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 28ae734 into duxlabs-dev:master Nov 2, 2026
3 checks passed
@bernardopg
bernardopg deleted the plugins/explain-stale-file-list branch November 2, 2026 15:39
purian23 pushed a commit that referenced this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin update that adds a QML/JS file fails with "File name case mismatch" until restart

2 participants