I’ve started using MCP Server heavily (amazing) and the design of a grid-layout based table was not able to be completed by what I think was a bug. The report was generated by Claude.ai:
Primary bug — setting layoutCell.columnSpan on a populated grid auto-appends phantom columns (observed 7→9) and re-assigns existing cells’ column into them, breaking alignment and overflowing the board.
-
Environment — Penpot 2.16.1, plugin API, grid via
board.addGridLayout(). -
Minimal repro — a clean 3×2 snippet that distills the confirmed real case (with the note that the real incident was a 7-column table → 9).
-
Expected vs actual.
-
Secondary bug — remediation (
removeColumn/ re-assigninglayoutCell.columnon out-of-range cells) hangs the runtime and crashes the editor tab — i.e. no safe programmatic recovery. -
Workaround — the transparent-grid + background-stripes-behind technique we landed on.
-
Minor related observation —
bringToFront()was a no-op in a no-layout board whilesetParentIndex(n)worked. -
Suggested fix — clamp
columnSpan/rowSpanto existing tracks (no side-effects on other cells), and harden grid reconciliation so recovery can’t hang.
