Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/model-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion scripts/run-forecast-backtests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
}
}
Expand Down
128 changes: 76 additions & 52 deletions src/components/nav/topbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -51,61 +52,84 @@ export function Topbar() {
</div>

{/* Right Side - Actions */}
<div className="flex items-center gap-2">
{/* Notifications */}
<Button
variant="ghost"
size="icon"
className="text-neutral-medium hover:text-[var(--foreground)] hover:bg-[var(--surface)] transition-colors duration-150"
aria-label="Notifications"
>
<Bell className="size-4" />
</Button>
<TooltipProvider>
<div className="flex items-center gap-2">
{/* Notifications */}
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="icon"
className="text-neutral-medium hover:text-[var(--foreground)] hover:bg-[var(--surface)] transition-colors duration-150"
aria-label="Notifications"
>
<Bell className="size-4" />
</Button>
</TooltipTrigger>
<TooltipContent>
<p>Notifications</p>
</TooltipContent>
</Tooltip>

{/* User Menu */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon"
className="text-neutral-medium hover:text-[var(--foreground)] hover:bg-[var(--surface)] transition-colors duration-150"
aria-label="User menu"
{/* User Menu */}
<DropdownMenu>
<Tooltip>
<TooltipTrigger asChild>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon"
className="text-neutral-medium hover:text-[var(--foreground)] hover:bg-[var(--surface)] transition-colors duration-150"
aria-label="User menu"
>
<User className="size-4" />
</Button>
</DropdownMenuTrigger>
</TooltipTrigger>
<TooltipContent>
<p>User account</p>
</TooltipContent>
</Tooltip>
<DropdownMenuContent
align="end"
className="bg-[var(--background)] border border-[var(--border)] text-[var(--foreground)]"
>
<User className="size-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent
align="end"
className="bg-[var(--background)] border border-[var(--border)] text-[var(--foreground)]"
>
<DropdownMenuLabel className="text-[var(--foreground)]">My Account</DropdownMenuLabel>
<DropdownMenuSeparator className="bg-[var(--border)]" />
<DropdownMenuItem className="text-[var(--foreground)] hover:bg-[var(--surface)]">
Profile
</DropdownMenuItem>
<DropdownMenuItem className="text-[var(--foreground)] hover:bg-[var(--surface)]">
Settings
</DropdownMenuItem>
<DropdownMenuSeparator className="bg-[var(--border)]" />
<DropdownMenuItem className="text-[var(--foreground)] hover:bg-[var(--surface)]">
Logout
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<DropdownMenuLabel className="text-[var(--foreground)]">My Account</DropdownMenuLabel>
<DropdownMenuSeparator className="bg-[var(--border)]" />
<DropdownMenuItem className="text-[var(--foreground)] hover:bg-[var(--surface)]">
Profile
</DropdownMenuItem>
<DropdownMenuItem className="text-[var(--foreground)] hover:bg-[var(--surface)]">
Settings
</DropdownMenuItem>
<DropdownMenuSeparator className="bg-[var(--border)]" />
<DropdownMenuItem className="text-[var(--foreground)] hover:bg-[var(--surface)]">
Logout
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>

{/* Settings Link */}
<Button
variant="ghost"
size="icon"
className="text-neutral-medium hover:text-[var(--foreground)] hover:bg-[var(--surface)] transition-colors duration-150"
aria-label="Settings"
asChild
>
<a href="/settings">
<SettingsIcon className="size-4" />
</a>
</Button>
</div>
{/* Settings Link */}
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="ghost"
size="icon"
className="text-neutral-medium hover:text-[var(--foreground)] hover:bg-[var(--surface)] transition-colors duration-150"
aria-label="Settings"
asChild
>
<a href="/settings">
<SettingsIcon className="size-4" />
</a>
</Button>
</TooltipTrigger>
<TooltipContent>
<p>Settings</p>
</TooltipContent>
</Tooltip>
</div>
</TooltipProvider>
</header>
)
}
Loading