fix(tui): fix markdown table rendering and dialog dimmer color issues#15814
fix(tui): fix markdown table rendering and dialog dimmer color issues#15814trry-hub wants to merge 2 commits intoanomalyco:devfrom
Conversation
…nomalyco#13855) - Derive streaming state from message.time.completed in TextPart component - Fixed issue where last table row was missing after message streaming - Changed streaming from fixed value to reactive: streaming={true} -> streaming={isStreaming()} - Ensures OpenTUI renders all table rows when message is complete Closes anomalyco#13855
…alyco#13363) - Changed dimmer background from hardcoded black to use theme.background - Fixed dialog visibility issue on light terminal themes - Now dimmer uses theme's background color with 0.6 opacity - Improves contrast and readability across all terminal color schemes Closes anomalyco#13363
|
The following comment was made by an LLM, it may be inaccurate: Found potential related PRs:
These PRs appear to address the same issues covered in PR #15814, particularly around markdown table rendering during streaming and dialog dimmer colors on light themes. You may want to verify if these have already been merged or closed, or if PR #15814 supersedes them. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
I just discovered that this PR duplicates existing work already in progress: Markdown table streaming fix (Bug #13855):
Dialog dimmer color fix (Bug #13363):
I apologize for not checking existing PRs before submitting. I'm closing this PR to avoid wasting the maintainers' time and to prevent duplication. Great work to @mocksoul, @dylan-conlin, and the author of #14686 for already working on these fixes! 🎉 |
Issue for this PR
Closes #13855, #13363
Type of change
What does this PR do?
This PR fixes two TUI rendering bugs:
Bug #13855 - Markdown table last row missing
The last row of markdown tables was missing after message streaming completed. The TextPart component passed streaming={true} unconditionally to markdown and code elements, even for completed messages. OpenTUI skips the last table row during streaming (thinking it's incomplete), and doesn't re-render when streaming changes because tokenRaw hasn't changed.
Fixed by deriving streaming state from message.time.completed using createMemo(). Added const isStreaming = createMemo(() => !props.message.time.completed) and changed streaming={true} to streaming={isStreaming()}. This ensures OpenTUI renders all table rows when the message is complete.
Bug #13363 - Dialog dimmer color on light themes
Dialog backgrounds were rendering incorrectly on light terminal themes since PR #8467 introduced background transparency. The dimmer rendered against a black buffer rather than the terminal background, breaking contrast.
The dialog dimmer used hardcoded black semi-transparent background RGBA.fromInts(0, 0, 0, 150). Fixed by using the theme's background color with 0.6 opacity: new RGBA(theme.background.r, theme.background.g, theme.background.b, 0.6). This ensures proper contrast on both light and dark terminal themes.
How did you verify your code works?
Bug #13855:
Bug #13363:
Screenshots / recordings
Not applicable - both are TUI rendering fixes
Checklist