fix(web): prioritize session names in narrow sidebar (#1029)

This commit is contained in:
SSU-WEI HUANG
2026-07-31 18:17:23 +01:00
committed by GitHub
parent da921821ee
commit 7ad454f9a2
+9 -6
View File
@@ -150,10 +150,13 @@ export function SessionRowSummary(props: {
return (
<div className={`flex w-full min-w-0 flex-col gap-1 ${className ?? ''}`}>
<div className={`flex items-center justify-between gap-3 ${!s.active ? 'opacity-50' : ''}`}>
<div className={`grid grid-cols-[minmax(9rem,1fr)_minmax(0,max-content)] items-center gap-2 ${!s.active ? 'opacity-50' : ''}`}>
<div className="flex min-w-0 items-center gap-2">
<AgentFlavorIcon flavor={s.metadata?.flavor} className="h-4 w-4 shrink-0 -translate-y-px" />
<div className={`truncate text-sm font-medium ${s.active ? 'text-[var(--app-fg)]' : 'text-[var(--app-hint)]'}`}>
<div
className={`min-w-0 flex-1 truncate text-sm font-medium ${s.active ? 'text-[var(--app-fg)]' : 'text-[var(--app-hint)]'}`}
title={sessionName}
>
{sessionName}
</div>
{s.active && s.thinking ? (
@@ -194,20 +197,20 @@ export function SessionRowSummary(props: {
</span>
) : null}
</div>
<div className="flex shrink-0 items-center gap-2 text-xs">
<div className="flex min-w-0 items-center justify-end gap-2 overflow-hidden text-xs">
{todoProgress ? (
<span className="flex items-center gap-1 text-[var(--app-hint)]">
<span className="flex shrink-0 items-center gap-1 text-[var(--app-hint)]">
<BulbIcon className="h-3 w-3" />
{todoProgress.completed}/{todoProgress.total}
</span>
) : null}
{!attention && s.pendingRequestsCount > 0 ? (
<span className="text-[var(--app-badge-warning-text)]">
<span className="shrink-0 text-[var(--app-badge-warning-text)]">
{t('session.item.pending')} {s.pendingRequestsCount}
</span>
) : null}
{timeLabel ? (
<span className="tabular-nums text-[var(--app-hint)]">{timeLabel}</span>
<span className="min-w-0 truncate whitespace-nowrap tabular-nums text-[var(--app-hint)]">{timeLabel}</span>
) : null}
</div>
</div>