UI crash: Cannot read properties of undefined (reading 'tasksTotal')
Resolved 💬 2 comments Opened Jan 31, 2026 by byapparov Closed Mar 1, 2026
Bug Description
The UI crashes with a TypeError when accessing epic/task data where the progress object is undefined.
Error
index-HYFxAgcy.js:46 Uncaught TypeError: Cannot read properties of undefined (reading 'tasksTotal')
at SM (index-HYFxAgcy.js:46:126872)
at Dm (index-HYFxAgcy.js:8:48568)
at Zm (index-HYFxAgcy.js:8:71429)
at dx (index-HYFxAgcy.js:8:81820)
at Vx (index-HYFxAgcy.js:8:117684)
at XS (index-HYFxAgcy.js:8:116724)
at Np (index-HYFxAgcy.js:8:116554)
at Mx (index-HYFxAgcy.js:8:113327)
at Zx (index-HYFxAgcy.js:8:125207)
at MessagePort.L (index-HYFxAgcy.js:1:10732)
Root Cause
The code attempts to access progress.tasksTotal without first checking if progress is defined. This likely occurs when:
- A newly created epic doesn't have progress data yet
- The API returns an epic without the
progressfield populated
Expected Behavior
The UI should handle missing progress data gracefully, either by:
- Showing a loading state
- Displaying "0/0" or "No tasks" placeholder
- Defaulting to
{ tasksTotal: 0, tasksCompleted: 0 }
Suggested Fix
Following the project's error handling strategy (fail fast, inform user):
// BAD - hides the bug with defensive coding
const progress = epic.progress || { tasksTotal: 0 };
// GOOD - exposes the issue immediately
if (\!epic.progress) {
console.error('[EpicCard] Missing progress:', { epicId: epic.id });
throw new Error(\`Epic "${epic.title}" missing progress. Server-side issue.\`);
}
Or ensure the API always returns the progress field for epics.
Reproduction
- Create a new epic via MCP
- Navigate to the epic in the UI
- Observe crash
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗