diff --git a/frontend/index.html b/frontend/index.html
index 6c27723..df210e7 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -222,24 +222,12 @@ textarea { resize: vertical; min-height: 120px; }
} catch (e) {
console.error('context failed', e);
liveMode = false;
- setStatus('Mock');
- qs('#context').innerHTML = '
User
Timmy Jr
Repos
3
Issues
—
PRs
—
';
- qs('#view-hint').textContent = 'Active view: dashboard';
- const mockIssues = [
- { number: 1, title: 'Kickoff issue', state: 'open', labels: ['epic'], url: '#1' },
- { number: 8, title: 'Live UI implementation', state: 'open', labels: ['frontend'], url: '#8' },
- { number: 37, title: 'Docker build and push', state: 'open', labels: ['devops'], url: '#37' },
- ];
- qs('#issues-content').innerHTML = mockIssues.map(i => '').join('');
- const mockPrs = [
- { number: 4, title: 'Agent UI delta binding', state: 'open', user: 'turdbot', url: '#4' },
- ];
- qs('#prs-content').innerHTML = mockPrs.map(p => '').join('');
- paintDeltas([
- {panel:'triage', action:'open', target:'#1', priority:'high'},
- {panel:'review', action:'review', target:'#4', priority:'medium'},
- {panel:'layout', action:'highlight', target:'issues', priority:'low'},
- ]);
+ setStatus('Unavailable');
+ qs('#context').innerHTML = 'Context unavailable.
';
+ qs('#view-hint').textContent = 'Active view unavailable.';
+ qs('#issues-content').innerHTML = 'Work items unavailable.
';
+ qs('#prs-content').innerHTML = 'Work items unavailable.
';
+ paintDeltas([]);
}
}
diff --git a/tests/test_widgets.py b/tests/test_widgets.py
index 6fd68f6..a01811d 100644
--- a/tests/test_widgets.py
+++ b/tests/test_widgets.py
@@ -25,6 +25,17 @@ async def test_dashboard_marks_fallback_context_as_degraded_instead_of_live():
assert "data.error ? 'Degraded · ' + data.error : 'Live · updated just now'" in html
+@pytest.mark.anyio
+async def test_dashboard_does_not_offer_fabricated_work_when_context_fetch_fails():
+ html = await dashboard()
+
+ assert "Work items unavailable." in html
+ assert "Kickoff issue" not in html
+ assert "Live UI implementation" not in html
+ assert "Docker build and push" not in html
+ assert "Agent UI delta binding" not in html
+
+
def test_repo_mix_reports_unavailable_for_failed_context_response():
script = f"""
const updateRepoMix = require({json.dumps(str(WIDGETS))});