fix: normalize project session payloads

The sidebar had to understand cursorSessions, codexSessions,
and other provider buckets because /api/projects exposed
provider-shaped arrays.

That leaked backend adapter storage into project state and made
frontend behavior drift each time a provider needed another bucket
or exception.

Return one sessions list with provider metadata instead. Project
state, search, and running-session filtering now share one contract,
while provider-specific storage remains behind the backend boundary.
This commit is contained in:
Haileyesus
2026-06-15 13:43:18 +03:00
parent 2abb45636b
commit d0adddbbda
9 changed files with 72 additions and 234 deletions

View File

@@ -179,7 +179,7 @@ export default function SidebarSessionItem({
</div>
</div>
{!isProcessing && !sessionView.isCursorSession && (
{!isProcessing && (
<button
className="ml-1 flex h-5 w-5 items-center justify-center rounded-md bg-red-50 opacity-70 transition-transform active:scale-95 dark:bg-red-900/20"
onClick={(event) => {
@@ -309,7 +309,7 @@ export default function SidebarSessionItem({
>
<Edit2 className="h-3 w-3 text-gray-600 dark:text-gray-400" />
</button>
{!isProcessing && !sessionView.isCursorSession && (
{!isProcessing && (
<button
className="flex h-6 w-6 items-center justify-center rounded bg-red-50 hover:bg-red-100 dark:bg-red-900/20 dark:hover:bg-red-900/40"
onClick={(event) => {