From a8609aea188314ee1a0333eab76605e7349e36ec Mon Sep 17 00:00:00 2001 From: Chuck Date: Thu, 19 Feb 2026 11:35:16 -0500 Subject: [PATCH] fix(starlark): load schema from schema.json in standalone mode The standalone API endpoint was returning schema: null because it didn't load the schema.json file. Now reads schema from disk when returning app details via web service. Co-Authored-By: Claude Sonnet 4.5 --- web_interface/blueprints/api_v3.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web_interface/blueprints/api_v3.py b/web_interface/blueprints/api_v3.py index 0a7bd0fd..b3d69314 100644 --- a/web_interface/blueprints/api_v3.py +++ b/web_interface/blueprints/api_v3.py @@ -7259,6 +7259,17 @@ def get_starlark_app(app_id): app_data = manifest.get('apps', {}).get(app_id) if not app_data: return jsonify({'status': 'error', 'message': f'App not found: {app_id}'}), 404 + + # Load schema from schema.json if it exists + schema = None + schema_file = _STARLARK_APPS_DIR / app_id / 'schema.json' + if schema_file.exists(): + try: + with open(schema_file, 'r') as f: + schema = json.load(f) + except Exception as e: + logger.warning(f"Failed to load schema for {app_id}: {e}") + return jsonify({ 'status': 'success', 'app': { @@ -7266,7 +7277,7 @@ def get_starlark_app(app_id): 'name': app_data.get('name', app_id), 'enabled': app_data.get('enabled', True), 'config': app_data.get('config', {}), - 'schema': None, + 'schema': schema, 'render_interval': app_data.get('render_interval', 300), 'display_duration': app_data.get('display_duration', 15), 'has_frames': False,