feat(session-manager): show source file name in session detail header (#4113)

* feat(session-manager): show source file name in session detail header

Display the session log file name (with full path on hover) alongside
the project directory, so users can locate and copy the underlying
JSONL file directly from the UI.

* fix(session-manager): truncate long source file name in detail header

Long, space-less JSONL basenames (e.g. Codex rollout files at ~70 chars)
overflowed the flex meta row and bled into the action-button area on
narrow windows. Mirror the sibling project-dir span by capping the
filename at max-w-[200px] with truncation; the full path stays available
via the hover tooltip and click-to-copy.

---------

Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
Xu Song
2026-06-16 12:08:48 +08:00
committed by GitHub
parent 36b557b2e6
commit de0a149df5
@@ -13,6 +13,7 @@ import {
MessageSquare,
Clock,
FolderOpen,
FileText,
X,
CheckSquare,
} from "lucide-react";
@@ -897,6 +898,38 @@ export function SessionManagerPage({ appId }: { appId: string }) {
</TooltipContent>
</Tooltip>
)}
{selectedSession.sourcePath && (
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={() =>
void handleCopy(
selectedSession.sourcePath!,
t("sessionManager.sourcePathCopied"),
)
}
className="flex items-center gap-1 hover:text-foreground transition-colors"
>
<FileText className="size-3 shrink-0" />
<span className="font-mono truncate max-w-[200px]">
{getBaseName(selectedSession.sourcePath)}
</span>
</button>
</TooltipTrigger>
<TooltipContent
side="bottom"
className="max-w-xs"
>
<p className="font-mono text-xs break-all">
{selectedSession.sourcePath}
</p>
<p className="text-muted-foreground mt-1">
{t("sessionManager.clickToCopyPath")}
</p>
</TooltipContent>
</Tooltip>
)}
</div>
</div>