diff --git a/src/renderer/components/chat/ChatHistory.tsx b/src/renderer/components/chat/ChatHistory.tsx
index 25d5555a..45929946 100644
--- a/src/renderer/components/chat/ChatHistory.tsx
+++ b/src/renderer/components/chat/ChatHistory.tsx
@@ -64,6 +64,7 @@ export const ChatHistory = ({ tabId }: ChatHistoryProps): JSX.Element => {
syncSearchMatchesWithRendered,
selectSearchMatch,
setTabVisibleAIGroup,
+ openSessionReport,
} = useStore(
useShallow((s) => ({
searchQuery: s.searchQuery,
@@ -76,6 +77,7 @@ export const ChatHistory = ({ tabId }: ChatHistoryProps): JSX.Element => {
syncSearchMatchesWithRendered: s.syncSearchMatchesWithRendered,
selectSearchMatch: s.selectSearchMatch,
setTabVisibleAIGroup: s.setTabVisibleAIGroup,
+ openSessionReport: s.openSessionReport,
}))
);
@@ -872,6 +874,7 @@ export const ChatHistory = ({ tabId }: ChatHistoryProps): JSX.Element => {
onNavigateToUserGroup={handleNavigateToUserGroup}
totalSessionTokens={lastAiGroupTotalTokens}
sessionMetrics={sessionDetail?.metrics}
+ onViewReport={effectiveTabId ? () => openSessionReport(effectiveTabId) : undefined}
phaseInfo={sessionPhaseInfo ?? undefined}
selectedPhase={selectedContextPhase}
onPhaseChange={setSelectedContextPhase}
diff --git a/src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx b/src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx
index f3a8ca00..ef69d539 100644
--- a/src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx
+++ b/src/renderer/components/chat/SessionContextPanel/components/SessionContextHeader.tsx
@@ -29,6 +29,7 @@ interface SessionContextHeaderProps {
totalSessionTokens?: number;
sessionMetrics?: SessionMetrics;
onClose?: () => void;
+ onViewReport?: () => void;
phaseInfo?: ContextPhaseInfo;
selectedPhase: number | null;
onPhaseChange: (phase: number | null) => void;
@@ -42,6 +43,7 @@ export const SessionContextHeader = ({
totalSessionTokens,
sessionMetrics,
onClose,
+ onViewReport,
phaseInfo,
selectedPhase,
onPhaseChange,
@@ -132,6 +134,22 @@ export const SessionContextHeader = ({
{formatCostUsd(sessionMetrics.costUsd)}
+ (parent only
+ {onViewReport ? (
+
+ ยท
+
+ )
+
+ ) : (
+ )
+ )}
)}
diff --git a/src/renderer/components/chat/SessionContextPanel/index.tsx b/src/renderer/components/chat/SessionContextPanel/index.tsx
index 73274c31..68a200db 100644
--- a/src/renderer/components/chat/SessionContextPanel/index.tsx
+++ b/src/renderer/components/chat/SessionContextPanel/index.tsx
@@ -49,6 +49,7 @@ export const SessionContextPanel = ({
onNavigateToUserGroup,
totalSessionTokens,
sessionMetrics,
+ onViewReport,
phaseInfo,
selectedPhase,
onPhaseChange,
@@ -193,6 +194,7 @@ export const SessionContextPanel = ({
totalSessionTokens={totalSessionTokens}
sessionMetrics={sessionMetrics}
onClose={onClose}
+ onViewReport={onViewReport}
phaseInfo={phaseInfo}
selectedPhase={selectedPhase}
onPhaseChange={onPhaseChange}
diff --git a/src/renderer/components/chat/SessionContextPanel/types.ts b/src/renderer/components/chat/SessionContextPanel/types.ts
index 009629e1..df4b7f88 100644
--- a/src/renderer/components/chat/SessionContextPanel/types.ts
+++ b/src/renderer/components/chat/SessionContextPanel/types.ts
@@ -27,6 +27,8 @@ export interface SessionContextPanelProps {
totalSessionTokens?: number;
/** Full session metrics (input, output, cache tokens, cost) */
sessionMetrics?: SessionMetrics;
+ /** Open the Session Report to see full cost breakdown */
+ onViewReport?: () => void;
/** Phase information for phase selector */
phaseInfo?: ContextPhaseInfo;
/** Currently selected phase (null = current/latest) */