Skip to content

fix(tui): stop streaming markdown/code after message completes#13854

Open
mocksoul wants to merge 5 commits intoanomalyco:betafrom
mocksoul:fix/streaming-table-last-row
Open

fix(tui): stop streaming markdown/code after message completes#13854
mocksoul wants to merge 5 commits intoanomalyco:betafrom
mocksoul:fix/streaming-table-last-row

Conversation

@mocksoul
Copy link

@mocksoul mocksoul commented Feb 16, 2026

Summary

  • TextPart passes streaming={true} unconditionally — even for completed messages
  • This causes opentui to always skip the last table row (treated as potentially incomplete)
  • Derive streaming state from message.time.completed so finished messages render all rows

Fixes #13855

Note

Full fix requires companion change in opentui (streaming setter must rebuild tables on true→false transition). See anomalyco/opentui#696

- Remove OPENCODE_EXPERIMENTAL_PLAN_MODE flag from flag.ts
- Update prompt.ts to always use plan mode logic
- Update registry.ts to always include plan tools in CLI
- Remove flag documentation from cli.mdx
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

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

Potential Duplicate Found:

Why related: This PR addresses the same issue — preventing the last table row from being truncated/skipped after streaming completes. Both PRs are fixing the same behavior where incomplete messages cause the last row to be dropped, and both likely involve adjusting the streaming state logic for completed messages.

@opencode-agent opencode-agent bot force-pushed the beta branch 13 times, most recently from 3360045 to 91aed1e Compare February 20, 2026 12:22
@mapix-etnc
Copy link

Adding a +1 from a real-world user — this bug hits every table response when using OPENCODE_EXPERIMENTAL_MARKDOWN=true. The needs:issue label might be blocking — the underlying issue is #13855 (and the original report is #13539).

This PR and #13674 cover the same root fix (streaming derived from message.time.completed instead of hardcoded true). Either one would unblock users. Is there a specific reason neither has been merged yet?

@mocksoul
Copy link
Author

Adding a +1 from a real-world user — this bug hits every table response when using OPENCODE_EXPERIMENTAL_MARKDOWN=true. The needs:issue label might be blocking — the underlying issue is #13855 (and the original report is #13539).

This PR and #13674 cover the same root fix (streaming derived from message.time.completed instead of hardcoded true). Either one would unblock users. Is there a specific reason neither has been merged yet?

I dunno. Fix in opentui part already merged in main.

@trry-hub
Copy link

trry-hub commented Mar 3, 2026

Thanks for working on this fix! I was also investigating the same issue (Bug #13855) and started implementing the same solution with createMemo(() => !props.message.time.completed). Great to see you already have a PR for this!

Looking forward to this being merged! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants