Description
The StatusChart component incorrectly renders feedback items marked as completed using a fallback gray color, rather than the expected resolved color (green). This visual discrepancy makes the chart appear disconnected from the real data state.
Technical Details
- File:
components/dashboard/status-chart.tsx
- Root Cause: The
normalizeStatus function lacks a mapping for the completed status returned by the database. The STATUS_COLORS object only expects new, in-progress, resolved, or closed.
- Impact:
completed tasks fall through to the default color.
Proposed Fix
Update components/dashboard/status-chart.tsx to map completed to resolved:
const normalizeStatus = (status: string) => {
if (status === "in_progress") return "in-progress";
if (status === "completed") return "resolved"; // Added mapping
return status;
};
Reproduction
- Create a feedback item with status
completed.
- View the Dashboard.
- Observe the Status Chart slice for this item is gray instead of the expected color.
Description
The
StatusChartcomponent incorrectly renders feedback items marked ascompletedusing a fallback gray color, rather than the expectedresolvedcolor (green). This visual discrepancy makes the chart appear disconnected from the real data state.Technical Details
components/dashboard/status-chart.tsxnormalizeStatusfunction lacks a mapping for thecompletedstatus returned by the database. TheSTATUS_COLORSobject only expectsnew,in-progress,resolved, orclosed.completedtasks fall through to the default color.Proposed Fix
Update
components/dashboard/status-chart.tsxto mapcompletedtoresolved:Reproduction
completed.