Skip to content

A figure's rows carry its picture alone - #50

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/mxp-terminal-images-4fnuyf
Oct 8, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/mxp-terminal-images-4fnuyf

Conversation

@HarryCordewener

@HarryCordewener HarryCordewener commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Before: a Figure whose art is the picture's own placeholder, already wrapped in the same ImageMarkup inline, carried two picture marks on each row. This is how SharpMUSH lays out a lone Markdown image (RenderFigure wraps [image: alt] in the image and passes that as the art). MXP, Pueblo and BBCode then wrote the picture twice or lost its cells, so the words floated beside it moved. In Pueblo, for example, 32 blank cells came before the text instead of 16.

After: one picture element on the first row, and the text beside it starts in the same column as in the plain text.

How: Figure.Marked removes ImageMarkup layers from each row before wrapping it in the figure's mark, so a picture's rows hold only that picture. The new ArtMarkedAsThePictureIsStillOnePicture test covers MXP, Pueblo and BBCode, and fails on all three without the fix.

Tests: 1098/1098; dotnet format whitespace --verify-no-changes clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_018ztDNVgzxM8V5WKWBRs2EW


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed figure rendering in MXP, Pueblo, and BBCode when a figure’s art uses its own image placeholder. The picture now appears once, and adjacent text stays correctly positioned.

Art that is the picture's own placeholder, already marked as the picture
inline (how SharpMUSH lays out a lone Markdown image), carried both marks
under the figure's. MXP, Pueblo and BBCode then wrote the picture twice or
lost its cells, and the text beside it moved. The figure now strips
pictures from its rows before marking them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ztDNVgzxM8V5WKWBRs2EW
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: c756af72-e8e4-4b84-bc8b-5cd88215c45b
📥 Commits

Reviewing files that changed from the base of the PR and between d7f62ea and b901da1.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • MarkupString.Tests/Layout/FigurePictureTests.cs
  • MarkupString/Layout/Blocks/Figure.cs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.


Walkthrough

Figure rendering removes inline image markup from rows before applying the figure’s picture markup. Parameterized tests cover MXP, Pueblo, and BBCode, including picture count and beside-text positioning.

Changes

Figure placeholder image handling

Layer / File(s) Summary
Filter figure rows and verify rendering
MarkupString/Layout/Blocks/Figure.cs, MarkupString.Tests/Layout/FigurePictureTests.cs, CHANGELOG.md
Figure.Marked removes inline ImageMarkup from picture rows before applying figure picture markup. Tests check that each format renders one picture and preserves beside-text positioning relative to plain-text layout. The changelog records the fix.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to b901d

Figures whose art is already marked as an image now render a single picture, and adjacent text keeps its position. No actionable merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: figure rows now carry only the figure's picture markup.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1 u…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@HarryCordewener
HarryCordewener merged commit 51d3c51 into main Oct 8, 2026
7 checks passed
@HarryCordewener
HarryCordewener deleted the claude/mxp-terminal-images-4fnuyf branch October 8, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants