Skip to content

Size a figure's MXP picture in the cells laid out for it - #52

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

Copy link
Copy Markdown
Member

Before: a figure's <IMAGE> carried no size, so an MXP client drew the picture at its own size under the line it was named on. Inside a box, the picture landed below the box and the box lost its edges beside it.

After: the tag says how many cells the picture covers, W=7c H=3c for a 7×3 art, or the PictureCells a host gave a figure with no art. A client that honours cell sizes draws the picture in those cells, which the emitter already leaves blank.

A figure with neither art nor cells only has its [description] row. That row is now marked PictureRow.IsDescription and gets no cell size, since a picture squeezed into one line of text would be a strip. The flag round-trips through the serialiser as dsc.

How: ElementMxpEmitter writes W/H from ImageMarkup.Row (columns and rows, suffixed c) unless the row is a description; otherwise the pixel sizes as before. Figure.Marked sets IsDescription on the described path.

Companion changes: SharpMUSH lays figures out with picture cells for MXP clients, and SharpMUTerm draws into reserved cells instead of adding rows.

🤖 Generated with Claude Code

https://claude.ai/code/session_018ztDNVgzxM8V5WKWBRs2EW


Generated by Claude Code

A figure's <IMAGE> carried no size, so a client drew the picture at its own
size under the line, outside any box round the figure. The tag now says how
many cells the picture covers (W=12c H=5c), the art's or the PictureCells a
host gave it, so a client can draw it there.

A row that is only the picture's description is marked
PictureRow.IsDescription and gets no cell size: a picture squeezed into one
line of its description would be a strip.

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

Warning

Review paused — included plan limit reached

Keep your review moving with free on-demand reviews.

  • Run this review for free

On-demand reviews are free for the next 2 days.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Promotion and pricing details

On-demand reviews are free for the next 2 days. After that, they cost $0.25 per reviewed file.

Review limit details

Or wait 37 minutes for your next included review.

Check out review usage here.

Limit details: You’ve used the included review currently available. Your 83 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: f04af6f4-df39-48f6-919f-3e4e0036bc7b
📥 Commits

Reviewing files that changed from the base of the PR and between 62345a3 and 70cacf2.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • MarkupString.Mxp/Emitters/ElementMxpEmitter.cs
  • MarkupString.Tests/Layout/FigurePictureTests.cs
  • MarkupString/Elements/ElementCodecs.cs
  • MarkupString/Elements/ImageMarkup.cs
  • MarkupString/Elements/PictureRow.cs
  • MarkupString/Layout/Blocks/Figure.cs
  • MarkupString/PublicAPI.Unshipped.txt
  • 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 ba0ce27 into main Oct 8, 2026
7 checks passed
@HarryCordewener
HarryCordewener deleted the claude/mxp-terminal-images-4fnuyf branch October 8, 2026 02:11
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