feat(dashboard-editor): add WebSocket config, HITL proposals, and structured preview#30
Merged
feat(dashboard-editor): add WebSocket config, HITL proposals, and structured preview#30
Conversation
…ype safety - Extract BaseAgent and AgentContext from agents/__init__.py into agents/base.py (reduces __init__.py from 502 to ~50 lines of re-exports) - Extract LibrarianAgent into agents/librarian.py alongside LibrarianWorkflow - Extract get_all_tools/get_architect_tools from tools/__init__.py into tools/registry.py (reduces __init__.py from 212 to ~100 lines) - Fix circular imports: 5 agent submodules now import BaseAgent from agents.base - Centralize test auth helpers (make_test_settings, make_test_jwt) in tests/helpers/auth.py (deduplicates ~360 lines across 12 test files) - Replace unsafe asyncio.sleep(10) with Event.wait() in timeout tests - Fix mypy errors in tools/registry.py and reduce mypy override list by 5 modules - Fix import sorting and missing __all__ exports Co-authored-by: Cursor <cursoragent@cursor.com>
…uctured preview - Add lightweight WebSocket client (ws_command) for HA one-shot commands - Implement dashboard config read via WS with REST fallback, write via WS - Add DASHBOARD proposal type with dashboard_config JSONB column + migration - Extend seek_approval tool and deploy route for dashboard proposals - Wire editor submit to create HITL dashboard proposals - Add collapsible structure preview panel (views -> sections -> cards) - Add dashboard icon/type to Proposals page - Close lovelace/config read/write gap in gaps registry Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
ws_command()helper for one-shot HA WebSocket operations (connect, auth, command, close). Used for Lovelace dashboard config where REST API returns 404 but WebSocket works.get_dashboard_config()now uses WebSocket as primary with REST fallback; newsave_dashboard_config()deploys via WebSocketlovelace/config/save.DASHBOARDproposal type withdashboard_configJSONB column, Alembic migration,seek_approval+ deploy route support. Dashboard edits go through approval workflow before deployment.POST /proposals. Inline success/error feedback.LayoutDashboard), type label, anddashboard_configfield added to Proposals page components.lovelace/configread/write gap removed fromsrc/ha/gaps.py.Test plan
_get_ws_url)dashboard_configfixture field (41 tests pass)make ci-localpasses (2741 tests, ruff, mypy, bandit all green)Made with Cursor