Skip to content

fix(samples): remove ImageSharp from ChatRoom - #11445

Merged
ReubenBond merged 5 commits into
dotnet:mainfrom
ReubenBond:rb-fix-samples-remove-imagesharp
Oct 8, 2026
Merged

ReubenBond merged 5 commits into
dotnet:mainfrom
ReubenBond:rb-fix-samples-remove-imagesharp

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

The Documentation sample build fails because NuGet audit flags the ChatRoom client's pinned ImageSharp version. ImageSharp is used only to render the startup logo, so the sample can preserve its appearance using pre-rendered terminal markup and eliminate image processing dependencies.

Embed logo.markup.gz, containing plain UTF-8 Spectre.Console markup compressed with gzip, and retain logo.png as the source artwork. The 3,887-byte resource includes 25 pre-rendered sizes separated by form feeds, preserving the existing colors and two-column layout as the terminal narrows. Loading uses built-in .NET GZipStream and StreamReader, with no JSON serialization.

Remove both ImageSharp package references and central version pins. Add a README example for regenerating the resource from the PNG using a one-off converter. The converter's ImageSharp license terms apply; building and running the sample require only its remaining dependencies. NuGet audit and warning-as-error enforcement remain enabled.

Fixes: #11437

Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 8, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused dependency removal is complete and preserves the sample’s documented functionality.

0 open findings

What changed in this PR

Removes the vulnerable, decorative ImageSharp dependency from the ChatRoom sample while preserving its Spectre.Console instructions.

Changes:

  • Removes ImageSharp packages, logo resource, and rendering code.
  • Simplifies startup output to a single-column text layout.
  • Updates README wording for the retained legacy screenshot.
File Description
samples/​ChatRoom/​ChatRoom.Client/​ChatRoom.Client.csproj Removes ImageSharp references and logo embedding.
samples/​ChatRoom/​ChatRoom.Client/​Program.cs Removes image loading and simplifies startup rendering.
samples/​ChatRoom/​ChatRoom.Client/​logo.png Deletes the unused decorative logo.
samples/​ChatRoom/​Directory.Packages.props Removes ImageSharp version pins.
samples/​ChatRoom/​README.md Documents the text display and legacy screenshot.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 16:48
@ReubenBond
ReubenBond force-pushed the rb-fix-samples-remove-imagesharp branch from 09755b0 to f475108 Compare October 8, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Logo rendering crashes when a narrow table column provides fewer than two cells.

1 open finding

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 8, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency removal is complete and the replacement preserves the previous responsive rendering behavior.

1 open finding

🧠 Review effort: Balanced

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 83.31% (118,028 / 141,666)
Branches 72.83% (35,024 / 48,092)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 165acd0, not current main 7566978.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Rendering can index the logo array with -1 when fewer than two terminal cells are available.

1 open finding

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency removal and replacement rendering path are complete and structurally consistent.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@ReubenBond
ReubenBond merged commit 7566978 into dotnet:main Oct 8, 2026
89 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-samples-remove-imagesharp branch October 8, 2026 17:48
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
(cherry picked from commit 7566978)

Upstream-PR: dotnet#11445
Upstream-Commit: 7566978
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
(cherry picked from commit 7566978)

Upstream-PR: dotnet#11445
Upstream-Commit: 7566978
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 23, 2026
(cherry picked from commit 7566978)

Upstream-PR: dotnet#11445
Upstream-Commit: 7566978
ReubenBond added a commit that referenced this pull request Oct 23, 2026
(cherry picked from commit 7566978)

Upstream-PR: #11445
Upstream-Commit: 7566978
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(samples): update ImageSharp to restore documentation builds

2 participants