mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(ui): show reused ROI estimates after sync
Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
This commit is contained in:
parent
a8679be705
commit
8f0d8bbe25
2 changed files with 5 additions and 1 deletions
|
|
@ -227,7 +227,7 @@ describe("ROICalculatorView", () => {
|
|||
stage: "Estimating pull requests",
|
||||
total: 1,
|
||||
};
|
||||
const completedStatus = { ...idleStatus, phase: "complete", done: 1, total: 1 };
|
||||
const completedStatus = { ...idleStatus, phase: "complete", done: 57, total: 57, reused: 57 };
|
||||
vi.mocked(apiClient.get)
|
||||
.mockResolvedValueOnce(settings)
|
||||
.mockResolvedValueOnce({ report: null })
|
||||
|
|
@ -247,6 +247,7 @@ describe("ROICalculatorView", () => {
|
|||
expect(await screen.findByText("Spend per estimated engineering hour", {}, { timeout: 5000 })).toBeInTheDocument();
|
||||
expect(screen.queryByRole("heading", { name: "Connect GitHub to get started" })).not.toBeInTheDocument();
|
||||
expect(screen.getByRole("status")).toHaveTextContent("Up to date · Last synced Sep 30, 2026, 12:00 PM UTC");
|
||||
expect(screen.getByRole("status")).toHaveTextContent("57 of 57 estimates reused");
|
||||
});
|
||||
|
||||
it("shows the sync error returned by the status endpoint", async () => {
|
||||
|
|
|
|||
|
|
@ -192,6 +192,9 @@ export default function ROICalculatorView({
|
|||
{syncedAt && (
|
||||
<span className="mt-1 block text-xs text-muted-foreground" role="status">
|
||||
Up to date · Last synced {formatSyncedAt(syncedAt)}
|
||||
{!status.running && status.phase === "complete" && status.reused > 0
|
||||
? ` · ${status.reused} of ${status.total} estimates reused`
|
||||
: ""}
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue