From 7aeb4dbb388f2f7ecc74eae506950015692301a7 Mon Sep 17 00:00:00 2001 From: wusumac <736139669@qq.com> Date: Sun, 2 Aug 2026 20:49:33 +0800 Subject: [PATCH] feat(web): show project name on pinned running session rows --- web/src/components/SessionList.tsx | 5 ++++- web/src/components/SessionRowSummary.tsx | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/src/components/SessionList.tsx b/web/src/components/SessionList.tsx index d1bb1e48..b0deca9f 100644 --- a/web/src/components/SessionList.tsx +++ b/web/src/components/SessionList.tsx @@ -765,9 +765,10 @@ function SessionItem(props: { selected?: boolean showDetailedStatus?: boolean inRunningSection?: boolean + projectLabel?: string }) { const { t } = useTranslation() - const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false } = props + const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false, projectLabel } = props const { haptic } = usePlatform() const [menuOpen, setMenuOpen] = useState(false) const [menuAnchorPoint, setMenuAnchorPoint] = useState<{ x: number; y: number }>({ x: 0, y: 0 }) @@ -861,6 +862,7 @@ function SessionItem(props: { attentionTooltipId={attentionId} scheduleTooltipId={scheduleId} inRunningSection={inRunningSection} + projectLabel={projectLabel} /> @@ -1431,6 +1433,7 @@ export function SessionList(props: { selected={s.id === selectedSessionId} showDetailedStatus={showDetailedStatus} inRunningSection + projectLabel={getGroupDisplayName(s.metadata?.worktree?.basePath ?? s.metadata?.path ?? 'Other')} /> ))} diff --git a/web/src/components/SessionRowSummary.tsx b/web/src/components/SessionRowSummary.tsx index 72641dff..25b36ce0 100644 --- a/web/src/components/SessionRowSummary.tsx +++ b/web/src/components/SessionRowSummary.tsx @@ -113,6 +113,8 @@ export function SessionRowSummary(props: { className?: string /** Rows inside the pinned "in progress" section skip the text label (dot only). */ inRunningSection?: boolean + /** Short project name shown under the title (pinned "in progress" rows). */ + projectLabel?: string }) { const { session: s, @@ -124,6 +126,7 @@ export function SessionRowSummary(props: { scheduleTooltipId: scheduleTooltipIdProp, className, inRunningSection = false, + projectLabel, } = props const { t } = useTranslation() const sessionName = getSessionTitle(s) @@ -242,7 +245,11 @@ export function SessionRowSummary(props: { ) : null} - {showPath || worktreeLabel ? ( + {projectLabel ? ( +
+ {projectLabel} +
+ ) : showPath || worktreeLabel ? (