add Panel ABC and entry-point discovery for panels and tools#2
Draft
Jepson2k wants to merge 1 commit into
Draft
Conversation
Lets third-party packages register additional frontend tabs and tool specs purely via Python entry points - the frontend stays oblivious. - panels.py: Panel ABC + PanelSlot + PanelContext (NiceGUI-free so waldoctl stays import-light). - discovery.py: list_panels / load_panel_class / iter_plugin_panels for the waldoctl.panels group, and list_tool_specs / load_tool_spec_class for waldoctl.tools - parallel to the existing waldoctl.robots helpers. - tools.py: ToolType flipped to StrEnum and ToolSpec.tool_type / ToolsSpec.by_type widened to str | ToolType so third-party tools can introduce categories without extending the enum; existing ToolType.GRIPPER == "gripper" checks keep working. https://claude.ai/code/session_01SxLY5QswPFprNvxDfDhwMU
4 tasks
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.
Summary
Lets third-party packages register additional frontend tabs and tool specs purely via Python entry points - the frontend stays oblivious.
panels.py(new):PanelABC +PanelSlot+PanelContext. NiceGUI-free so waldoctl stays import-light - plugin implementations import their UI toolkit themselves insidebuild().discovery.py:list_panels/load_panel_class/iter_plugin_panelsfor thewaldoctl.panelsgroup, andlist_tool_specs/load_tool_spec_classforwaldoctl.tools. Mirrors the existingwaldoctl.robotshelper trio atdiscovery.py:25-67.tools.py:ToolTypeflipped toStrEnum;ToolSpec.tool_typeandToolsSpec.by_typewidened tostr | ToolTypeso third-party tools can introduce categories beyond the built-in enum. Existing== ToolType.GRIPPERequality andisinstance(tool, GripperTool)checks keep working.__init__.py: re-exports the new public surface.Test plan
pytest tests/- 12/12 pass (test_discovery_panels.py,test_discovery_tools.py)claude/modular-gui-middleware-Z8j1C); CI's branch-matching will use this waldoctl revision for that PR's jobCompanion PR
The frontend wiring that consumes these new entry-point groups lives in jepson2k/Waldo-Commander#… on the matching branch.
https://claude.ai/code/session_01SxLY5QswPFprNvxDfDhwMU
Generated by Claude Code