BlockRenderer, postContent: parse plain-text markdown tables in messages #5839
Claude / Claude Code Review
completed
May 13, 2026 in 11m 6s
Code review found 1 important issue
Found 6 candidates, confirmed 4. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | packages/app/ui/components/PostContent/BlockRenderer.tsx:698-715 |
TableBlock measurement state not reset when block prop changes |
| 🟡 Nit | packages/shared/src/logic/markdown/extractTables.ts:56-65 |
inlineDataToMarkdown round-trip loses group mentions and tasks, and skips escaping for link characters |
Annotations
Check failure on line 715 in packages/app/ui/components/PostContent/BlockRenderer.tsx
claude / Claude Code Review
TableBlock measurement state not reset when block prop changes
TableBlock holds measurement state (`phase`, `columnWidths`, `rowHeights`, and the three refs) that initializes once and never resets when the `block` prop changes. Since `ContentRenderer` keys children by array index, editing a post so a table appears at the same index reuses this component instance — the new table renders with the previous table's stale column widths and row heights, and `handleCellLayout` silently drops the new `onLayout` events. Fix by attaching a key derived from block cont
Check warning on line 65 in packages/shared/src/logic/markdown/extractTables.ts
claude / Claude Code Review
inlineDataToMarkdown round-trip loses group mentions and tasks, and skips escaping for link characters
`inlineDataToMarkdown` is lossy for three inline types when they appear inside table cells: (1) group mentions are serialized as `@${group}` but `tableProcessor` only loads `remarkShipMentions` (which matches `~ship` only), so they re-parse as plain text and drop their `GroupMentionInlineData` type; (2) inline tasks are emitted as `[x] ...` / `[ ] ...` but remark-gfm only recognizes those markers at the start of a list item, so inside a cell they come back as literal bracketed text; (3) links ar
Loading