feat(KB-238): remove "Using" prefix from pace indicator messages

- Remove "Using " prefix from pace calculation messages in usage.ts

- Update message format from "Using X% over/under pace" to "X% over/under pace"

- Update all UsageIndicator tests to match new message format

- Add changeset for patch release of @dustinbyrne/kb
This commit is contained in:
gsxdsm
2026-03-30 19:16:48 -07:00
parent a3b4d2db95
commit a07d83d615
3 changed files with 14 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
---
"@dustinbyrne/kb": patch
---
Remove "Using" prefix from pace indicator messages in usage dropdown for cleaner UI.

View File

@@ -589,7 +589,7 @@ describe("UsageIndicator", () => {
pace: { pace: {
status: "behind", status: "behind",
percentElapsed: 57, percentElapsed: 57,
message: "Using 27% under pace", message: "27% under pace",
}, },
}, },
], ],
@@ -694,7 +694,7 @@ describe("UsageIndicator", () => {
pace: { pace: {
status: "ahead", status: "ahead",
percentElapsed: 50, percentElapsed: 50,
message: "Using 20% over pace", message: "20% over pace",
}, },
}, },
], ],
@@ -731,7 +731,7 @@ describe("UsageIndicator", () => {
pace: { pace: {
status: "behind", status: "behind",
percentElapsed: 50, percentElapsed: 50,
message: "Using 30% under pace", message: "30% under pace",
}, },
}, },
], ],
@@ -805,7 +805,7 @@ describe("UsageIndicator", () => {
pace: { pace: {
status: "behind", status: "behind",
percentElapsed: 50, percentElapsed: 50,
message: "Using 20% under pace", message: "20% under pace",
}, },
}, },
], ],
@@ -855,7 +855,7 @@ describe("UsageIndicator", () => {
pace: { pace: {
status: "ahead", status: "ahead",
percentElapsed: 50, percentElapsed: 50,
message: "Using 20% over pace", message: "20% over pace",
}, },
}, },
], ],
@@ -879,7 +879,7 @@ describe("UsageIndicator", () => {
// The message comes from backend, so it doesn't change based on view mode // The message comes from backend, so it doesn't change based on view mode
paceRow = screen.getByTestId("pace-row"); paceRow = screen.getByTestId("pace-row");
expect(paceRow).toHaveTextContent("Using 20% over pace"); expect(paceRow).toHaveTextContent("20% over pace");
}); });
it("verifies pace appears for weekly windows with valid backend timing data", () => { it("verifies pace appears for weekly windows with valid backend timing data", () => {
@@ -903,7 +903,7 @@ describe("UsageIndicator", () => {
pace: { pace: {
status: "behind", status: "behind",
percentElapsed: 43, percentElapsed: 43,
message: "Using 3% under pace", message: "3% under pace",
}, },
}, },
], ],

View File

@@ -91,13 +91,13 @@ export function calculatePace(
return { return {
status: "ahead", status: "ahead",
percentElapsed: Math.round(percentElapsed), percentElapsed: Math.round(percentElapsed),
message: `Using ${Math.abs(Math.round(paceDelta))}% over pace`, message: `${Math.abs(Math.round(paceDelta))}% over pace`,
}; };
} else if (paceDelta < -PACE_THRESHOLD) { } else if (paceDelta < -PACE_THRESHOLD) {
return { return {
status: "behind", status: "behind",
percentElapsed: Math.round(percentElapsed), percentElapsed: Math.round(percentElapsed),
message: `Using ${Math.abs(Math.round(paceDelta))}% under pace`, message: `${Math.abs(Math.round(paceDelta))}% under pace`,
}; };
} else { } else {
return { return {