Skip to content

Conversation

@itsrainingmani
Copy link
Contributor

Fixes: #7633 & possibly #7634

What does this PR do?

Currently there is an issue where forking from the first message of a session causes a fatal crash since
the session route calls r.set(route.initialPrompt) immediately after receiving the ref, but theinput is not valid until the textarea component is ready later on-down in the component hierarchy.

This PR moves the Prompt props.ref logic into the onMount lifecycle component to ensure that the ref is only invoked when the component is fully ready.

How did you verify your code works?

fork-message-fix.mov

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@itsrainingmani
Copy link
Contributor Author

@rekram1-node This is the PR for the code I was talking about earlier

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit 9280db3 into anomalyco:dev Jan 11, 2026
4 checks passed
zerone0x pushed a commit to zerone0x/opencode that referenced this pull request Jan 12, 2026
zerone0x pushed a commit to zerone0x/opencode that referenced this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opentui: fatal: undefined is not an object (evaluating 'input.setText')

2 participants