Desktop: decorations on $.prompt.fill are not painted (the terminal paints them)

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

On Claude Code Desktop (Code tab, Local session, Windows, Claude Code 2.1.293), a mod's $.prompt.fill({ text, mode, decorations }) fills the box (isFilled: true) but the runs are never painted, in every mode (replace, append, insert). The same decorations returned from a prompt.edit answer are painted, and the same fill in the terminal paints them.

Repro: a mod whose prompt.edit hook, on the draft filltest, calls after 500 ms $.prompt.fill({ text: 'FILLED', mode: 'replace', decorations: [{ start: 0, end: 6, color: 'yellow', underline: true }] }). Terminal: FILLED shows yellow and underlined. Desktop: plain, until the next key's prompt.edit answer repaints.

import type { On } from 'claude-code'

export function register(on: On): void {
  on('prompt.edit', async ($, e, next) => {
    const r = await next(e)
    if (r.text === 'filltest') setTimeout(() => {
      void $.prompt.fill({ text: 'FILLED', mode: 'replace', decorations: [{ start: 0, end: 6, color: 'yellow', underline: true }] })
    }, 500)
    return r
  })
}

Why it matters: a mod that paints between keystrokes (a note that arrives after a pause, an answer that lands) can only do it with a fill, so on Desktop its paint lags one keystroke behind. Related: the paint-only call asked for in #91870 (comment).

View original on GitHub ↗

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