mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-24 13:38:43 +02:00
fix: let the new-session button replace the empty state text
When no sessions exist and a creation button is available, show only the button — it already communicates emptiness and provides the CTA. The old 'No sessions yet' text is kept as fallback only when no button is present. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -400,11 +400,7 @@ function ProjectGroup({
|
||||
|
||||
{expanded && (
|
||||
<div className="ml-2 mt-0.5 space-y-0.5 border-l border-zinc-800/60 pl-2">
|
||||
{visibleSessions.length === 0 ? (
|
||||
<div className="px-3 py-3 text-center text-[12px] text-zinc-600">
|
||||
{isScratchpad ? 'No scratchpad chats yet' : 'No sessions yet'}
|
||||
</div>
|
||||
) : (
|
||||
{visibleSessions.length > 0 &&
|
||||
visibleSessions.map((session) => (
|
||||
<SessionItem
|
||||
isActive={selectedSessionId === session.id}
|
||||
@@ -417,9 +413,8 @@ function ProjectGroup({
|
||||
pattern={patternMap.get(session.patternId)}
|
||||
session={session}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
{onNewSession && (
|
||||
))}
|
||||
{onNewSession ? (
|
||||
<button
|
||||
className="flex w-full items-center justify-center gap-1.5 rounded-md border border-dashed border-zinc-700/60 bg-zinc-800/20 px-2.5 py-1.5 text-[12px] font-medium text-zinc-500 transition hover:border-indigo-500/40 hover:bg-indigo-500/5 hover:text-indigo-300"
|
||||
onClick={onNewSession}
|
||||
@@ -428,6 +423,12 @@ function ProjectGroup({
|
||||
<Plus className="size-3.5" />
|
||||
{newSessionLabel ?? 'New Session'}
|
||||
</button>
|
||||
) : (
|
||||
visibleSessions.length === 0 && (
|
||||
<div className="px-3 py-3 text-center text-[12px] text-zinc-600">
|
||||
{isScratchpad ? 'No scratchpad chats yet' : 'No sessions yet'}
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user