[Mods] Code with format: 'diff' draws as plain text in the Desktop app (terminal draws it correctly)

Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 1 comment · opened Oct 5, 2026

What's Wrong?

In a mod's Pane, a Code element with format: 'diff' is drawn as a plain code block in the Desktop app's Code tab. You see the raw @@ -1,3 +1,3 @@ line, +/- characters in color, no line-number gutter, no red/green row shading and no word highlights.

The same mod in the terminal (claude CLI) draws it as the docs show: line numbers in place of the @@ line, shaded removed/added rows and stronger shading on the changed words.

This uses the exact sample from the interface gallery.

What Should Happen?

The Desktop app should draw Code({ format: 'diff', source }) the way the terminal does: a diff with line numbers, add/remove shading and word highlights. The elements reference lists Code as drawn on Desktop.

Error Messages/Logs

None. The tree validates, and nothing is logged in ~/Library/Logs/Claude/main.log.

Steps to Reproduce

  1. Create the gallery mod from the interface gallery and return this sample from its ui.render hook:

``js
Code({
format: 'diff',
source: '@@ -1,3 +1,3 @@\n # Mods\n-A mod is a plugin.\n+A mod is a plugin that runs code.\n Read on.',
})
``

  1. Load it in the terminal (claude --plugin-dir ./gallery) and run /gallery. The diff draws correctly.
  2. Load the same folder in the Desktop app's Code tab (CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json) and run /gallery. The diff draws as plain text.

Is this a regression?

I don't know.

Claude Code Version

  • Terminal: 2.1.289
  • Desktop app: 2.19675.0, running Claude Code engine 2.1.286 (from main.log: session spawn on required_version:2.1.286)

Platform

Anthropic API (Claude subscription), macOS (Darwin 25.6.0), Desktop app Code tab.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗