Skip to content

fix(mihomo-control): restore service load in v0.1.3 - #420

Open
mdj2812 wants to merge 1 commit into
noctalia-dev:mainfrom
mdj2812:fix/mihomo-control-service-load-v0.1.3
Open

fix(mihomo-control): restore service load in v0.1.3#420
mdj2812 wants to merge 1 commit into
noctalia-dev:mainfrom
mdj2812:fix/mihomo-control-service-load-v0.1.3

Conversation

@mdj2812

@mdj2812 mdj2812 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Plugin

  • Id: mdj2812/mihomo-control
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

Hotfix for a v0.1.2 regression where the Mihomo Control service entry failed to load, leaving the widget stuck offline even when the external controller was reachable.

  • Remove invalid trailing commas in run_self_test() that made service.luau fail luau_load
  • Load shared helpers with require("./group_logic.luau") instead of sandbox-unavailable load()
  • Rename group_logic.luagroup_logic.luau so Noctalia can require the module
  • Bump plugin version to 0.1.3

External dependencies

None — same HTTP-only Mihomo external controller integration as before.

Testing

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Noctalia version tested against: v5.0.0 (v5.0.0-beta.8-138-gb5c1bfaace0c)
  • Plugin API level: 9
cd mihomo-control
noctalia plugins lint .
lua5.4 tests/group_order_test.lua
noctalia msg plugin mdj2812/mihomo-control:service all self-test
noctalia msg plugin mdj2812/mihomo-control:service all refresh

Verified the service log reports self-test passed (4 checks) and the widget tooltip shows online against a remote HTTPS controller (openclash.home.mdj2812.top:443).

Screenshots / Videos

N/A — service-only hotfix. Connection status verified via widget tooltip and service logs after reload.

Checklist

Ready-for-review requirement: Every box in this section must be checked. If any statement is not true, keep the
pull request as Draft. An explanation does not replace a required check.

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the
    README template, documents
    every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and
    understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
Ready-for-review requirement: Every attestation below must be checked.

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

Made with Cursor

Fix Luau syntax errors in self-test calls and load group helpers via
require() so the service entry starts and publishes online state again.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mdj2812
mdj2812 marked this pull request as ready for review August 20, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant