mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(web): show project name on pinned running session rows
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
</button>
|
||||
|
||||
@@ -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')}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -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}
|
||||
</div>
|
||||
</div>
|
||||
{showPath || worktreeLabel ? (
|
||||
{projectLabel ? (
|
||||
<div className="truncate text-xs text-[var(--app-hint)]" title={projectLabel}>
|
||||
{projectLabel}
|
||||
</div>
|
||||
) : showPath || worktreeLabel ? (
|
||||
<div
|
||||
className="truncate text-xs text-[var(--app-hint)]"
|
||||
title={worktreeLabel
|
||||
|
||||
Reference in New Issue
Block a user