fix(panel): session links target the owning task — /work-sessions/<id> never existed

This commit is contained in:
Renn F
2026-07-18 05:41:07 +02:00
parent e3ec24f58f
commit 29b375f1b5
2 changed files with 8 additions and 21 deletions
@@ -16,7 +16,6 @@ import {
XCircle, XCircle,
FileCode, FileCode,
} from "lucide-react"; } from "lucide-react";
import Link from "next/link";
import { formatDistanceToNow } from "date-fns"; import { formatDistanceToNow } from "date-fns";
import { formatAbsoluteTimestamp } from "@/lib/utils"; import { formatAbsoluteTimestamp } from "@/lib/utils";
import { WorkSessionStatus } from "@/types"; import { WorkSessionStatus } from "@/types";
@@ -273,18 +272,6 @@ export function WorkSessionCard({ taskId }: WorkSessionCardProps) {
</div> </div>
</HelpTip> </HelpTip>
</div> </div>
{/* View Full Session Link */}
<div className="flex justify-end pt-2">
<HelpTip label="Opens the full work-session record — branch, every commit, and status history">
<Link href={`/work-sessions/${session.id}`} prefetch={false}>
<Button variant="outline" size="sm" className="gap-2">
<ExternalLink className="h-3 w-3" />
View Details
</Button>
</Link>
</HelpTip>
</div>
</CardContent> </CardContent>
</Card> </Card>
); );
@@ -148,10 +148,10 @@ export function WorkSessionTable({
<TableCell> <TableCell>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<GitBranch className="h-4 w-4 text-muted-foreground" /> <GitBranch className="h-4 w-4 text-muted-foreground" />
<HelpTip label="Open this session's detail page."> <HelpTip label="Open the owning task — the session's branch, commits, and PR live on its detail tabs.">
<Link <Link
prefetch={false} prefetch={false}
href={`/work-sessions/${session.id}`} href={`/tasks/${session.task_id}`}
className="font-medium hover:underline font-mono text-sm" className="font-medium hover:underline font-mono text-sm"
> >
{session.branch_name} {session.branch_name}
@@ -191,7 +191,7 @@ export function WorkSessionTable({
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>
<Link <Link
href={`/work-sessions/${session.id}`} href={`/tasks/${session.task_id}`}
prefetch={false} prefetch={false}
> >
<Button variant="ghost" size="icon"> <Button variant="ghost" size="icon">
@@ -199,7 +199,7 @@ export function WorkSessionTable({
</Button> </Button>
</Link> </Link>
</TooltipTrigger> </TooltipTrigger>
<TooltipContent>Open work session</TooltipContent> <TooltipContent>Open the owning task</TooltipContent>
</Tooltip> </Tooltip>
</TableCell> </TableCell>
</TableRow> </TableRow>
@@ -216,11 +216,11 @@ export function WorkSessionTable({
<div className="flex min-w-0 items-center gap-2"> <div className="flex min-w-0 items-center gap-2">
<GitBranch className="h-4 w-4 shrink-0 text-muted-foreground" /> <GitBranch className="h-4 w-4 shrink-0 text-muted-foreground" />
<HelpTip <HelpTip
label={`Open this session's detail page — ${session.branch_name}`} label={`Open the owning task for ${session.branch_name} — commits and PR live on its detail tabs.`}
> >
<Link <Link
prefetch={false} prefetch={false}
href={`/work-sessions/${session.id}`} href={`/tasks/${session.task_id}`}
className="truncate font-mono text-sm font-medium hover:underline" className="truncate font-mono text-sm font-medium hover:underline"
> >
{session.branch_name} {session.branch_name}
@@ -230,7 +230,7 @@ export function WorkSessionTable({
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>
<Link <Link
href={`/work-sessions/${session.id}`} href={`/tasks/${session.task_id}`}
prefetch={false} prefetch={false}
> >
<Button variant="ghost" size="icon" className="shrink-0"> <Button variant="ghost" size="icon" className="shrink-0">
@@ -238,7 +238,7 @@ export function WorkSessionTable({
</Button> </Button>
</Link> </Link>
</TooltipTrigger> </TooltipTrigger>
<TooltipContent>Open work session</TooltipContent> <TooltipContent>Open the owning task</TooltipContent>
</Tooltip> </Tooltip>
</div> </div>
<div className="mt-3 divide-y"> <div className="mt-3 divide-y">