[PR #5520] fix(tui): resolve session_status TypeError #11449

Closed
opened 2026-02-16 18:16:17 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5520

State: closed
Merged: Yes


Problem

TypeError: undefined is not an object (evaluating 'sync.data.session_status[props.sessionID]')

SessionStatus.list() was returning an array instead of a Record object, causing session status lookups by ID to fail.

Solution

  • Changed SessionStatus.list() to return state() instead of Object.values(state()) to match the API schema
  • Added optional chaining for defensive access during initial sync

Fixes : #5487

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5520 **State:** closed **Merged:** Yes --- ## Problem TypeError: undefined is not an object (evaluating 'sync.data.session_status[props.sessionID]') `SessionStatus.list()` was returning an array instead of a Record object, causing session status lookups by ID to fail. ## Solution - Changed `SessionStatus.list()` to return `state()` instead of `Object.values(state())` to match the API schema - Added optional chaining for defensive access during initial sync Fixes : #5487
yindo added the pull-request label 2026-02-16 18:16:17 -05:00
yindo closed this issue 2026-02-16 18:16:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11449