Skip to content

Commit e38507c

Browse files
committed
reverting back to 0.6.3
branch 0.7 is undercooked and going back to the kitchen, you can still find it in the testing branch
1 parent e74d6fc commit e38507c

File tree

54 files changed

+2462
-7440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2462
-7440
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing Agents
2+
3+
This document defines the strict workflow for AI agents modifying the reTerminal Dashboard Designer.
4+
5+
## The 8-Step Workflow
6+
7+
1. **Read Feature Structure**:
8+
- Check `manifest.json` (if exists) or `__init__.py`.
9+
- Read `ARCHITECTURE.md` to understand where your changes fit.
10+
11+
2. **Check Dependencies**:
12+
- Does your new feature require new fonts? (Update `services/font_manager.py`)
13+
- Does it require new ESPHome components?
14+
15+
3. **Modify Schema (`schema.json`)**:
16+
- Define properties using standard JSON Schema.
17+
- Use `ui:widget` hints for the frontend editor.
18+
- **Strictly** use `"type": "object"`.
19+
20+
4. **Update Generator (`generator.py`)**:
21+
- Implement the `FeatureBase` interface.
22+
- Ensure `generate_yaml` returns valid ESPHome YAML.
23+
24+
5. **Update Renderer (`render.js`)**:
25+
- Implement the `render(widget, ctx)` function.
26+
- Ensure it handles all properties defined in `schema.json`.
27+
28+
6. **Add Test Data (`test_data.json`)**:
29+
- Provide a valid JSON object representing a configured instance of this widget.
30+
31+
7. **Validate**:
32+
- Run `python3 scripts/validate_features.py`.
33+
34+
8. **Done**:
35+
- Update `task.md` and `walkthrough.md`.
36+
37+
## Code Style
38+
- **Frontend**: ES Modules, no global variables (except `window.reTerminalApp` for debugging).
39+
- **Backend**: Python 3.9+, typed hints where possible.
40+
- **Comments**: Explain *why*, not just *what*.

custom_components/reterminal_dashboard/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
182182
frontend.async_register_built_in_panel(
183183
hass,
184184
component_name="iframe", # Use iframe panel type to load our view
185-
sidebar_title="ESPHome Designer",
185+
sidebar_title="reTerminal",
186186
sidebar_icon="mdi:tablet-dashboard",
187187
frontend_url_path="reterminal-dashboard",
188188
config={"url": "/reterminal-dashboard"},

custom_components/reterminal_dashboard/config_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@dataclass
4242
class FlowContext:
4343
"""Hold temporary flow context."""
44-
entry_title: str = "ESPHome Designer"
44+
entry_title: str = "reTerminal Dashboard Designer"
4545

4646

4747
async def _get_storage(hass: HomeAssistant) -> DashboardStorage:
@@ -129,7 +129,7 @@ async def async_step_init(self, user_input: dict[str, Any] | None = None):
129129
# Provide a textual summary; options dict not used to drive logic yet.
130130
info_text = (
131131
f"🎨 Dashboard Editor: {dashboard_url}\n\n"
132-
"ESPHome Designer is configured.\n\n"
132+
"reTerminal Dashboard Designer is configured.\n\n"
133133
"Use the following pattern in your ESPHome firmware for the reTerminal E1001:\n"
134134
f" online_image URL: {api_base}" + "/{device_id}/page/{page}/image.png?token={api_token}\n\n"
135135
"Devices and layouts are managed via the dashboard editor and HTTP API."

custom_components/reterminal_dashboard/frontend/editor.html

Lines changed: 12 additions & 246 deletions
Large diffs are not rendered by default.

custom_components/reterminal_dashboard/frontend/feature_registry.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,6 @@ class FeatureRegistry {
1515
console.log(`[FeatureRegistry] Registered: ${featureId}`);
1616
}
1717

18-
/**
19-
* Map of legacy/simple names to feature IDs.
20-
*/
21-
static aliases = {
22-
"lvgl_tabview": "lvgl_tabview",
23-
"lvgl_tileview": "lvgl_tileview",
24-
"lvgl_led": "lvgl_led",
25-
"lvgl_spinner": "lvgl_spinner",
26-
"lvgl_buttonmatrix": "lvgl_buttonmatrix",
27-
"lvgl_checkbox": "lvgl_checkbox",
28-
"lvgl_dropdown": "lvgl_dropdown",
29-
"lvgl_keyboard": "lvgl_keyboard",
30-
"lvgl_roller": "lvgl_roller",
31-
"lvgl_spinbox": "lvgl_spinbox",
32-
"lvgl_switch": "lvgl_switch",
33-
"lvgl_textarea": "lvgl_textarea",
34-
"lvgl_obj": "lvgl_obj"
35-
};
36-
3718
/**
3819
* Get a registered feature renderer.
3920
* @param {string} featureId

custom_components/reterminal_dashboard/frontend/features/calendar/render.js

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)