Files
kilocode/packages
kirillk 921bce7cca fix(jetbrains): harden diagram rendering fallbacks and logging
Diagram rendering degraded to the mermaid source correctly for engine
refusals, but three paths could not recover and none of them left a trace
in the log.

Log every failure. An engine crash was converted to a Fault.Internal
carrying only err.message, discarding the throwable, so a parser or layout
bug reached the user as an unactionable red label and left nothing to
report. It now logs with the stack trace, as does a failing completion
callback and a failed image allocation.

Close the fallback holes. The completion callback ran unguarded inside the
render coroutine, so a failure in it was reported as a plugin error and
left the block pending forever. Painters.of used first {}, turning a future
art type without a painter into an exception in both paint and sizing.
Painting itself was unguarded, and by the time it runs the source pane is
already hidden, so a failure left a blank surface with no way back; paint
failures now hand a fallback to the owner, which restores the source.
diagramImage allocated 2x the scene with no ceiling, and Limits caps the
model rather than the geometry, so a legal diagram could ask for a
multi-gigabyte raster on the EDT the moment someone pressed copy.

Bound the work that limits did not cover. Cancellation is only checked
between lines, so one line needed its own cap, and per-index open/quote
scanning is replaced by a single pass because it made a long line
quadratic. FlowMarks was the only phase with no cancellation point at all
and resolved frame members by recursing per cluster, rescanning every node
each time; it now resolves bounds and depth in one reverse pass. The
remaining FlowLayout phases gained per-iteration checks, and a wall clock
ceiling ends a render that outlasts its cooperative checks as a limit
fault instead of an endless "rendering" state.

Unsupported diagram types now read as a muted note rather than an error.
classDiagram, stateDiagram and friends are valid mermaid this engine does
not draw, and marking each one red reported working markdown as broken.
2026-08-27 16:27:43 -04:00
..
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 16:49:04 +02:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00
2026-08-26 17:39:00 +00:00