Repository navigation
Description
Problem
When an agent modifies its dashboard.yaml and introduces errors (YAML syntax, missing fields, etc.), the Dashboard tab immediately shows a red error screen with the raw validation message. The previously working dashboard disappears entirely.
This is a common scenario — agents update their own dashboards and sometimes break them.
Desired Behavior
When dashboard.yaml fails validation, show the last known good dashboard with a yellow/amber banner indicating the current version is broken, along with the error details. Once the agent fixes the YAML, the banner disappears and the live version resumes.
Current Architecture
- Agent-server (
docker/base-image/agent_server/routers/dashboard.py) reads and validatesdashboard.yaml, returnshas_dashboard: false+erroron failure - Backend (
src/backend/services/agent_service/dashboard.py) passes the error through — no fallback agent_dashboard_valuestable stores historical widget values only (metric/progress/status), not the full config structure- Frontend (
src/frontend/src/components/DashboardPanel.vue) shows error state whenhas_dashboard: false
Implementation Plan
1. New DB table: agent_dashboard_configs
Single-row-per-agent cache of the last valid config:
CREATE TABLE IF NOT EXISTS agent_dashboard_configs (
agent_name TEXT PRIMARY KEY,
config_json TEXT NOT NULL,
dashboard_mtime TEXT NOT NULL,
captured_at TEXT NOT NULL
);2. Backend service changes
File: src/backend/services/agent_service/dashboard.py + src/backend/db/dashboard_history.py
- On successful dashboard read (
has_dashboard: true): upsert the full config intoagent_dashboard_configs - On error (
has_dashboard: false+error): queryagent_dashboard_configsfor cached config. If found, return it with:stale: truestale_error: "<validation error from broken version>"
3. Frontend banner
File: src/frontend/src/components/DashboardPanel.vue
- When
dashboardData.stale === true: render the cached dashboard normally but show an amber banner at the top with the error message - Auto-refresh continues polling — banner disappears once the agent fixes the YAML
Files touched
| Layer | File | Change |
|---|---|---|
| DB Schema | src/backend/db/schema.py |
Add agent_dashboard_configs table |
| DB Ops | src/backend/db/dashboard_history.py |
Add save_good_config() + get_last_good_config() |
| Backend | src/backend/services/agent_service/dashboard.py |
Save on success, fallback on error |
| Frontend | src/frontend/src/components/DashboardPanel.vue |
Amber stale banner |
No changes needed to agent-server side.
Activity
vybe commentedon Jun 15, 2026
Grooming triage: verified shipped —
src/backend/services/agent_service/dashboard.py:298returns cached stale-data fallback when the live dashboard breaks. Closing as done.feat(brain-orb): Brain tab UI — post-voice-processing config (enable …
Merge pull request #1407 from Abilityai/feature/61-brain-orb-actions