diff --git a/.github/workflows/model-quality.yml b/.github/workflows/model-quality.yml index d5650ca3..a7980040 100644 --- a/.github/workflows/model-quality.yml +++ b/.github/workflows/model-quality.yml @@ -17,6 +17,7 @@ jobs: REAL_DATA_MIN_DAYS: 7 LEARNED_KFOLDS: 5 LEARNED_MAX_VAL_LOSS: 0.2 + FORECAST_BACKTEST_STALE_DAYS: 7 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/scripts/run-forecast-backtests.ts b/scripts/run-forecast-backtests.ts index 4abe1dd5..e34c1441 100644 --- a/scripts/run-forecast-backtests.ts +++ b/scripts/run-forecast-backtests.ts @@ -154,7 +154,9 @@ async function main() { } else { const lastEventAt = await fetchLatestEventTimestamp(orgId, 'slack_signal') const staleCutoff = Date.now() - STALE_DAYS * 24 * 60 * 60 * 1000 - if (!lastEventAt || lastEventAt < staleCutoff) { + if (!lastEventAt) { + fallbackReason = 'No events found.' + } else if (new Date(lastEventAt).getTime() < staleCutoff) { fallbackReason = 'Event history is too old for a reliable backtest.' } } diff --git a/src/components/nav/topbar.tsx b/src/components/nav/topbar.tsx index 9d1d921c..268b00bb 100644 --- a/src/components/nav/topbar.tsx +++ b/src/components/nav/topbar.tsx @@ -4,6 +4,7 @@ import React from 'react' import { Search, Bell, User, Settings as SettingsIcon, Command } from 'lucide-react' import { cn } from '@/lib/utils' import { Button } from '@/components/ui/button' +import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from '@/components/ui/tooltip' import { DropdownMenu, DropdownMenuContent, @@ -51,61 +52,84 @@ export function Topbar() { {/* Right Side - Actions */} -
Notifications
+Settings
+