feat(web): show machine label on pinned running session rows

This commit is contained in:
2026-08-02 22:27:04 +08:00
parent 240bf8affe
commit da59a0011a
2 changed files with 10 additions and 4 deletions
+4 -1
View File
@@ -766,9 +766,10 @@ function SessionItem(props: {
showDetailedStatus?: boolean
inRunningSection?: boolean
projectLabel?: string
machineLabel?: string
}) {
const { t } = useTranslation()
const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false, projectLabel } = props
const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false, projectLabel, machineLabel } = props
const { haptic } = usePlatform()
const [menuOpen, setMenuOpen] = useState(false)
const [menuAnchorPoint, setMenuAnchorPoint] = useState<{ x: number; y: number }>({ x: 0, y: 0 })
@@ -863,6 +864,7 @@ function SessionItem(props: {
scheduleTooltipId={scheduleId}
inRunningSection={inRunningSection}
projectLabel={projectLabel}
machineLabel={machineLabel}
/>
</button>
@@ -1453,6 +1455,7 @@ export function SessionList(props: {
showDetailedStatus={showDetailedStatus}
inRunningSection
projectLabel={getGroupDisplayName(s.metadata?.worktree?.basePath ?? s.metadata?.path ?? 'Other')}
machineLabel={resolveMachineLabel(s.metadata?.machineId ?? null)}
/>
))}
</div>
+6 -3
View File
@@ -115,6 +115,8 @@ export function SessionRowSummary(props: {
inRunningSection?: boolean
/** Short project name shown under the title (pinned "in progress" rows). */
projectLabel?: string
/** Machine label shown next to the project name (pinned "in progress" rows). */
machineLabel?: string
}) {
const {
session: s,
@@ -127,6 +129,7 @@ export function SessionRowSummary(props: {
className,
inRunningSection = false,
projectLabel,
machineLabel,
} = props
const { t } = useTranslation()
const sessionName = getSessionTitle(s)
@@ -245,9 +248,9 @@ export function SessionRowSummary(props: {
) : null}
</div>
</div>
{projectLabel ? (
<div className="truncate text-xs text-[var(--app-hint)]" title={projectLabel}>
{projectLabel}
{projectLabel || machineLabel ? (
<div className="truncate text-xs text-[var(--app-hint)]" title={[projectLabel, machineLabel].filter(Boolean).join(' · ')}>
{[projectLabel, machineLabel].filter(Boolean).join(' · ')}
</div>
) : showPath || worktreeLabel ? (
<div