anomalyco / anomalyco/opencode
Prompt text is lost when the composer store is empty but the DOM editor still holds it
Open
@Brendonovich is already working on this.
Since Sep 11, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Submitting a prompt can silently lose the text the user typed.
The prompt composer keeps its text in two places: the DOM editor element and the store-backed prompt state. When the store is empty but the DOM editor still holds text (for example after a navigation or state reset), createPromptSubmit sees text.trim().length === 0 and returns early without sending anything. The typed message is lost and the user has to retype it.
Plugins
n/a
OpenCode version
latest dev
Steps to reproduce
- Type a message in the composer so the DOM editor contains text but the store-backed prompt state is empty.
- Press Enter to submit.
- Nothing is sent and the typed text is discarded.
Screenshot and/or share link
n/a
Operating System
n/a (all)
Terminal
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.