Polish: per-route titles and a way to sign out

There was no sign-out control anywhere. Easy to miss when you develop
permanently signed in, and a stranded feeling for anyone on a shared machine.
Clearing the identity provider's session is sufficient — PIG holds no session
of its own — and the auth listener returns to sign-in without a reload. A hard
redirect follows regardless, so a failed provider call cannot leave a
half-signed-out interface.

Every route now sets its own document title. A single static title makes
browser history and a wall of tabs useless: every entry reads "pig" and nobody
can tell the margin view from the pipeline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-12 19:49:32 -07:00
parent 46d7d80f1b
commit d154a78d48
7 changed files with 78 additions and 2 deletions
+2
View File
@@ -10,6 +10,7 @@ import { AlertTriangle, ArrowRight, Server, TrendingUp } from 'lucide-react';
import { Link } from 'react-router-dom';
import { compactNumber, get, money, percent, relativeTime } from '@/lib/api';
import { Badge, Card, CardContent, CardHeader, CardTitle, EmptyState, Skeleton, Stat } from '@/components/ui';
import { usePageTitle } from '@/lib/title';
interface Dashboard {
me: { name: string; teams: { team: string; role: string }[] };
@@ -44,6 +45,7 @@ interface Dashboard {
}
export function Overview() {
usePageTitle('Overview');
const { data, isLoading, error } = useQuery({
queryKey: ['dashboard'],
queryFn: () => get<Dashboard>('/api/dashboard'),