Skip to content

plugin architecture#8430

Draft
systemcrash wants to merge 2 commits intoopenwrt:masterfrom
systemcrash:plugins2
Draft

plugin architecture#8430
systemcrash wants to merge 2 commits intoopenwrt:masterfrom
systemcrash:plugins2

Conversation

@systemcrash
Copy link
Contributor

  • This PR is not from my main or master branch 💩, but a separate branch ✅
  • Each commit has a valid ✒️ Signed-off-by: <my@email.address> row (via git commit --signoff)
  • Each commit and PR title has a valid 📝 <package name>: title first line subject for packages
  • Incremented 🆙 any PKG_VERSION in the Makefile
  • Tested on: (architecture, openwrt version, browser) ✅
  • ( Preferred ) Mention: @ the original code author for feedback
  • ( Preferred ) Screenshot or mp4 of changes:
  • ( Optional ) Closes: e.g. openwrt/luci#issue-number
  • ( Optional ) Depends on: e.g. openwrt/packages#pr-number in sister repo
  • Description: (describe the changes proposed in this PR)

Global enable for all plugins and enable for specific plugin classes
Screenshot 2026-03-16 at 21 19 42

Screenshot 2026-03-16 at 21 20 17 Screenshot 2026-03-16 at 21 20 06

This introduces a plugin system for the UI - primarily to configure the behaviour of ucode plugins - and some example plugins.

This should cover the user-case for @josteink in #8161.

Some additional hook points are necessary to take care of 2FA type plugins for @Tokisaki-Galaxy and #8280 and #8281, I think.

include some example plugins also.
JS files are to provide UI to configure behaviour of
ucode plugins which live in

/usr/share/ucode/luci/plugins/class/type

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This implements the injection of custom http headers via
the new plugin architecture.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
@Tokisaki-Galaxy
Copy link
Contributor

Hi systemcrash,
Amazing design! Iam happy to help add the auth mechanism hooks once the UI/UX part is settled.
One question: since UCI configs aren't removed when a plugin file is deleted, how should we handle "ghost" configurations? Currently, if a plugin file is missing but the config remains, it might lead to orphaned entries or even UI rendering errors (like in s.sectiontitle).

@systemcrash
Copy link
Contributor Author

If the js plugin is gone - the UI portion doesn't show. You can take this PR for a test-drive to see how it behaves. So remaining config isn't a problem to worry about. Users might notice it when they look in the config files tho.

@stangri
Copy link
Member

stangri commented Mar 17, 2026

Thanks for this — the architecture itself looks interesting and the HTTP header example is a solid use case.

One naming concern worth raising: LuCI already has a well-established term for optional, independently installable UI components — "applications" (luci-app-*). In many other ecosystems (browsers, VS Code, WordPress), "plugin" is the common word for exactly that same concept, which already causes occasional confusion when people come to OpenWrt from those environments.

Introducing "plugins" as a new term here — even for a technically distinct thing — risks compounding that confusion rather than resolving it. Would it make sense to stay within the existing "applications" vocabulary and perhaps qualify it (e.g. "system applications", "core applications") rather than adding a second term that overlaps with what users already call luci-app-* packages?

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.

3 participants