diff --git a/src/components/dashboard/data-panel.test.tsx b/src/components/dashboard/data-panel.test.tsx
index 3c77e63..58f1703 100644
--- a/src/components/dashboard/data-panel.test.tsx
+++ b/src/components/dashboard/data-panel.test.tsx
@@ -142,10 +142,10 @@ describe("DataPanel", () => {
expect(screen.getByText(/Remaining: 0 min/)).toBeInTheDocument();
});
- it("displays negative remaining minutes", () => {
+ it("displays goal exceeded message for negative remaining minutes", () => {
render();
- expect(screen.getByText(/Remaining: -50 min/)).toBeInTheDocument();
+ expect(screen.getByText(/Goal exceeded by 50 min/)).toBeInTheDocument();
});
});
diff --git a/src/components/dashboard/data-panel.tsx b/src/components/dashboard/data-panel.tsx
index 04812b9..2379d9a 100644
--- a/src/components/dashboard/data-panel.tsx
+++ b/src/components/dashboard/data-panel.tsx
@@ -76,7 +76,11 @@ export function DataPanel({
/>
-
Remaining: {remainingMinutes} min
+
+ {remainingMinutes >= 0
+ ? `Remaining: ${remainingMinutes} min`
+ : `Goal exceeded by ${Math.abs(remainingMinutes)} min`}
+
);