fix(admin): align admin.dashboard factory with HTTP plugin patterns, remove duplicated merge logic#144
Merged
intel352 merged 2 commits intofeat/issue-89-admin-pluginfrom Feb 23, 2026
Conversation
…tion Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add admin plugin to serve admin UI and config
fix(admin): align admin.dashboard factory with HTTP plugin patterns, remove duplicated merge logic
Feb 23, 2026
intel352
added a commit
that referenced
this pull request
Feb 23, 2026
…) (#132) * feat: admin as plugin — serve admin UI and config as engine plugin (#89) Create plugins/admin/ EnginePlugin that encapsulates admin concerns: - admin.dashboard module type: serves admin UI static files via StaticFileServer - admin.config_loader module type: dependency anchor for admin config loading - Wiring hook merges embedded admin/config.yaml into the engine config - WithUIDir() overrides static file root (replaces --admin-ui-dir flag logic) - Capability contracts: admin-ui, admin-config - Module schemas for UI palette integration - Register plugin in cmd/server/main.go alongside existing 17 plugins - 15 tests covering plugin interface, factories, schemas, wiring, and config merge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(admin): align admin.dashboard factory with HTTP plugin patterns, remove duplicated merge logic (#144) * Initial plan * fix: address review comments on admin plugin factory and code duplication Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
admin.dashboardmodule factory was incomplete compared to the HTTP plugin'sstaticFileServerFactory: missingspaFallback,cacheMaxAge,routersupport, andconfig.ResolvePathInConfigpath resolution. Additionally,mergeAdminConfig/injectUIRootwere duplicated betweencmd/server/main.goand the admin plugin's wiring hook, resulting in double execution with a defensive skip.Changes
plugins/admin/plugin.goadmin.dashboardfactory: addconfig.ResolvePathInConfigfor relative path resolution;spaFallback(defaultstrue),cacheMaxAge, androuterconfig params — matchingstaticFileServerFactoryin the HTTP plugininjectUIRoot: extend to also override root onadmin.dashboardmodules (previously onlystatic.fileserver)plugins/admin/plugin_test.goTestWiringHookInjectsUIDirForAdminDashboard: verifies UIDir override applies toadmin.dashboardmodulescmd/server/main.gomergeAdminConfig+injectUIRootfunctions and their call insetup()— the admin plugin's wiring hook is now the single merge point💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.