/fork Throws TypeError when no valid options exist #7489

Closed
opened 2026-02-16 18:07:20 -05:00 by yindo · 1 comment
Owner

Originally created by @dollannn on GitHub (Jan 24, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

[00:16:21] [ERROR] Error: undefined is not an object (evaluating 'option.value')
TypeError: undefined is not an object (evaluating 'option.value')
at onMove (src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx:57:36)
at moveTo (src/cli/cmd/tui/ui/dialog-select.tsx:96:11)
at (src/cli/cmd/tui/ui/dialog-select.tsx:78:9)

Plugins

No response

OpenCode version

1.1.34

Steps to reproduce

  1. Create a fresh session, prompt Hello
  2. /fork is now available, use it and start searching for something that does not exist.
  3. When no valid options appear in the dropdown, TypeErrors will appear

Screenshot and/or share link

No response

Operating System

Latest macOS

Terminal

Ghostty

Originally created by @dollannn on GitHub (Jan 24, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description [00:16:21] [ERROR] Error: undefined is not an object (evaluating 'option.value') TypeError: undefined is not an object (evaluating 'option.value') at onMove (src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx:57:36) at moveTo (src/cli/cmd/tui/ui/dialog-select.tsx:96:11) at <anonymous> (src/cli/cmd/tui/ui/dialog-select.tsx:78:9) ### Plugins _No response_ ### OpenCode version 1.1.34 ### Steps to reproduce 1. Create a fresh session, prompt Hello 2. /fork is now available, use it and start searching for something that does not exist. 3. When no valid options appear in the dropdown, TypeErrors will appear ### Screenshot and/or share link _No response_ ### Operating System Latest macOS ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 18:07:20 -05:00
yindo closed this issue 2026-02-16 18:07:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 24, 2026):

This issue appears to be isolated to the /fork command when no valid messages are found. The problem is that selected() in dialog-select.tsx:152 can return undefined when the filtered options list is empty, but the code unconditionally accesses option.value without null-checking.

Related areas to investigate:

  • #10286: Dialog-related keyboard/input issues might share similar root causes with event handling
  • #10209: Selection dialog behavior improvements

This is likely a regression in how empty states are handled in selection dialogs.

@github-actions[bot] commented on GitHub (Jan 24, 2026): This issue appears to be isolated to the `/fork` command when no valid messages are found. The problem is that `selected()` in `dialog-select.tsx:152` can return `undefined` when the filtered options list is empty, but the code unconditionally accesses `option.value` without null-checking. Related areas to investigate: - #10286: Dialog-related keyboard/input issues might share similar root causes with event handling - #10209: Selection dialog behavior improvements This is likely a regression in how empty states are handled in selection dialogs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7489