Feature Request: Fix table border rendering - box-drawing characters appear disconnected #8537

Open
opened 2026-02-16 18:10:13 -05:00 by yindo · 1 comment
Owner

Originally created by @onesuit on GitHub (Feb 4, 2026).

Originally assigned to: @rekram1-node on GitHub.

Summary

Fix markdown table border rendering where box-drawing characters appear disconnected/broken instead of forming clean connected lines.

Problem

Currently, OpenCode renders markdown tables with box-drawing characters (┌│┐─┼) via Glamour. However, these characters render as disconnected segments in many terminal environments, making tables very difficult to read.

Current Rendering (Broken/Disconnected)

Table rendering issue

The box-drawing characters appear as separate fragments:

┌ ─ ─ ─ ┬ ─ ─ ─ ┐
│       │       │
├ ─ ─ ─ ┼ ─ ─ ─ ┤

Instead of properly connected lines like this:

┌───────┬───────┐
│       │       │
├───────┼───────┤

Desired: Rich-style Connected Borders

Python's Rich library renders tables with properly connected borders that look clean:

┌─────────┬──────┬─────────┐
│ Name    │ Age  │ Status  │
├─────────┼──────┼─────────┤
│ Alice   │ 30   │ Active  │
│ Bob     │ 25   │ Pending │
└─────────┴──────┴─────────┘

Root Cause Analysis

This appears to be related to how Glamour renders table borders - possibly:

  1. Character spacing issues between box-drawing characters
  2. Font rendering inconsistencies with Unicode box-drawing
  3. ANSI escape sequence handling that breaks character connections

Proposed Solutions

Option 1: Fix Glamour Integration

Ensure box-drawing characters are rendered adjacently without spacing issues.

Option 2: Alternative Table Renderer

Consider using a table rendering approach similar to:

  • Rich (Python) - uses rich.table.Table with proper border handling
  • Lipgloss tables - Charm's Go library with proper border rendering

Option 3: Configuration Option

Add a tui.table_renderer option:

{
  "$schema": "https://opencode.ai/config.json",
  "tui": {
    "table_renderer": "rich"  // or "glamour", "lipgloss"
  }
}

Use Cases

  1. Data-heavy workflows: DevOps/SA work involves many comparison tables
  2. Readability: Connected borders are essential for distinguishing columns
  3. Professional output: Current broken rendering looks unprofessional

Environment

  • OpenCode version: Latest
  • OS: macOS
  • Terminal: Various (WezTerm, iTerm2, etc.)
  • The issue persists across different terminal emulators

References

Additional Context

This significantly impacts user experience when working with LLM outputs containing structured data tables. The disconnected borders make it hard to follow rows and columns, especially in multi-column tables.

Originally created by @onesuit on GitHub (Feb 4, 2026). Originally assigned to: @rekram1-node on GitHub. ## Summary Fix markdown table border rendering where box-drawing characters appear **disconnected/broken** instead of forming clean connected lines. ## Problem Currently, OpenCode renders markdown tables with box-drawing characters (`┌│┐─┼`) via Glamour. However, **these characters render as disconnected segments** in many terminal environments, making tables very difficult to read. ### Current Rendering (Broken/Disconnected) ![Table rendering issue](https://github.com/user-attachments/assets/example) The box-drawing characters appear as separate fragments: ``` ┌ ─ ─ ─ ┬ ─ ─ ─ ┐ │ │ │ ├ ─ ─ ─ ┼ ─ ─ ─ ┤ ``` Instead of properly connected lines like this: ``` ┌───────┬───────┐ │ │ │ ├───────┼───────┤ ``` ### Desired: Rich-style Connected Borders Python's Rich library renders tables with **properly connected borders** that look clean: ``` ┌─────────┬──────┬─────────┐ │ Name │ Age │ Status │ ├─────────┼──────┼─────────┤ │ Alice │ 30 │ Active │ │ Bob │ 25 │ Pending │ └─────────┴──────┴─────────┘ ``` ## Root Cause Analysis This appears to be related to how Glamour renders table borders - possibly: 1. **Character spacing issues** between box-drawing characters 2. **Font rendering** inconsistencies with Unicode box-drawing 3. **ANSI escape sequence handling** that breaks character connections ## Proposed Solutions ### Option 1: Fix Glamour Integration Ensure box-drawing characters are rendered adjacently without spacing issues. ### Option 2: Alternative Table Renderer Consider using a table rendering approach similar to: - **Rich (Python)** - uses `rich.table.Table` with proper border handling - **Lipgloss tables** - Charm's Go library with proper border rendering ### Option 3: Configuration Option Add a `tui.table_renderer` option: ```json { "$schema": "https://opencode.ai/config.json", "tui": { "table_renderer": "rich" // or "glamour", "lipgloss" } } ``` ## Use Cases 1. **Data-heavy workflows**: DevOps/SA work involves many comparison tables 2. **Readability**: Connected borders are essential for distinguishing columns 3. **Professional output**: Current broken rendering looks unprofessional ## Environment - OpenCode version: Latest - OS: macOS - Terminal: Various (WezTerm, iTerm2, etc.) - The issue persists across different terminal emulators ## References - [Rich Tables](https://rich.readthedocs.io/en/latest/tables.html) - Python library with proper table rendering - [Lipgloss Tables](https://github.com/charmbracelet/lipgloss#rendering-tables) - Go library by Charm ## Additional Context This significantly impacts user experience when working with LLM outputs containing structured data tables. The disconnected borders make it hard to follow rows and columns, especially in multi-column tables.
yindo added the opentui label 2026-02-16 18:10:13 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 4, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11223: Add user-friendly display for markdown tables (active discussion on improving table readability)
  • #7671: Markdown table formatting (closed issue about column alignment in tables)
  • #3845: Markdown tables display as plain text instead of formatted tables (closed issue about table rendering)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 4, 2026): This issue might be a duplicate of existing issues. Please check: - #11223: Add user-friendly display for markdown tables (active discussion on improving table readability) - #7671: Markdown table formatting (closed issue about column alignment in tables) - #3845: Markdown tables display as plain text instead of formatted tables (closed issue about table rendering) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8537