Bug
When OpenCode v1.15.13 serves the V2 session list API, it returns:
{ "items": [...], "cursor": {...} }
But CodeNomad's session accessor function (getV2SessionItems / compiled name Qc) expects:
function Qc(e) { return e.data }
Since the response has no .data key, the session list is never populated. UI shows "Start a conversation" (empty state) despite having 75+ sessions in the database.
Root Cause
The response.data access in packages/ui/src/stores/session-api.ts:145-147:
function getV2SessionItems(response: V2SessionsResponse): SessionV2Info[] {
return response.data
}
The actual server response is { items: [...], cursor: {...} } — the key is .items, not .data.
Fix
Change to check both formats:
function getV2SessionItems(response: V2SessionsResponse): SessionV2Info[] {
return (response as any).items ?? response.data
}
Impact
Session listing across ALL workspaces returns empty. No error displayed — UI just shows the blank "Start a conversation" state. User has no indication the fetch failed.
Confirmed on OpenCode binary v1.15.13. Possibly related to #525 (format change in 1.16.0+).
Environment
- CodeNomad v0.17.0 (Tauri) and v0.17.1 (web)
- OpenCode binary v1.15.13
Bug
When OpenCode v1.15.13 serves the V2 session list API, it returns:
{ "items": [...], "cursor": {...} }But CodeNomad's session accessor function (
getV2SessionItems/ compiled nameQc) expects:Since the response has no
.datakey, the session list is never populated. UI shows "Start a conversation" (empty state) despite having 75+ sessions in the database.Root Cause
The
response.dataaccess inpackages/ui/src/stores/session-api.ts:145-147:The actual server response is
{ items: [...], cursor: {...} }— the key is.items, not.data.Fix
Change to check both formats:
Impact
Session listing across ALL workspaces returns empty. No error displayed — UI just shows the blank "Start a conversation" state. User has no indication the fetch failed.
Confirmed on OpenCode binary v1.15.13. Possibly related to #525 (format change in 1.16.0+).
Environment