Skip to content

refactor(tui): use native fenced-code highlighting - #1219

Open
TheGreatAxios wants to merge 2 commits into
mainfrom
cl-9009-highlight-swap
Open

TheGreatAxios wants to merge 2 commits into
mainfrom
cl-9009-highlight-swap

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • route fenced-code colour through OpenTUI’s native tree-sitter renderer while keeping the synchronous parser geometry plain
  • pin settled and streaming assistant fences to the production transcript syntax style, with unsupported Python remaining visible and plain
  • own fetch and RequestInfo types at the root TypeScript boundary and keep blank fenced lines to gutter-only geometry
  • remove highlight.js and reduce the bundled dist artifact by 313,352 bytes and the compiled binary by 180,576 bytes

Verification

  • bun test ./src/tui/syntax-highlight.test.ts ./src/tui/markdown-parser.test.ts passes (79 tests)
  • removing markdownBodyOptions().syntaxStyle makes only the settled and streaming production transcript keeper cases fail; restoring it makes all 10 highlighting tests pass
  • bun run typecheck passes with DOM in tsconfig.base.json and no leaf DOM triple-reference
  • bun run check passes (8,596 tests across 551 files)
  • bun run build:bin passes
  • a temporary production-seam smoke compiled with bun build --compile --minify --external '@opentui/core-*', executed as a native artifact, and exited 0 with javascriptHighlighted=true, pythonVisible=true, and pythonHighlighted=false; its source and binary are removed after the run

Fixes CL-9009

@linear-code

linear-code Bot commented Sep 28, 2026

Copy link
Copy Markdown

CL-9009

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.

1 participant