Skip to content

Show deployed MiniPdf NuGet version - #147

Merged
shps951023 merged 1 commit into
mainfrom
feat/show-web-nuget-version
Sep 7, 2026
Merged

shps951023 merged 1 commit into
mainfrom
feat/show-web-nuget-version

Conversation

@shps951023

@shps951023 shps951023 commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary

  • show the deployed MiniPdf version beside the web converter title
  • link the badge to the matching NuGet package version
  • resolve the latest stable MiniPdf version from NuGet during GitHub Pages deployment and stamp it into the WASM build

Validation

  • dotnet build MiniPdf.Web/MiniPdf.Web.Client/MiniPdf.Web.Client.csproj -c Release -p:Version=0.41.1
  • verified desktop and 375px mobile layouts
  • confirmed the badge renders NuGet v0.41.1 and links to the matching package page

Summary by CodeRabbit

  • New Features

    • Added a NuGet package version link to the converter page.
    • Added styling for the version badge, including hover states.
  • Bug Fixes

    • Deployment builds now automatically use the latest stable MiniPdf NuGet package version.
    • Builds fail when no stable package version is available.

Copilot AI lite review requested due to automatic review settings September 7, 2026 05:05
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 804f7ae7-4b32-492b-b09d-5cc59c6dd56d

📥 Commits

Reviewing files that changed from the base of the PR and between 7aad934 and 8075610.

📒 Files selected for processing (3)
  • .github/workflows/pages.yml
  • MiniPdf.Web/MiniPdf.Web.Client/Pages/Converter.razor
  • MiniPdf.Web/MiniPdf.Web.Client/wwwroot/app.css

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Pages workflow resolves the latest stable MiniPdf NuGet version and passes it to publishing. The converter page reads the assembly version, displays it as a NuGet link, and applies package-version styling.

Changes

Package version flow

Layer / File(s) Summary
Stable version resolution and publish wiring
.github/workflows/pages.yml
The workflow queries NuGet for the latest stable MiniPdf version, fails when none is found, and passes the version to dotnet publish.
Converter version display
MiniPdf.Web/MiniPdf.Web.Client/Pages/Converter.razor, MiniPdf.Web/MiniPdf.Web.Client/wwwroot/app.css
The converter page resolves the assembly version, displays a NuGet package link, and styles the link as a version badge.

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

Merge Risk: ⚪ Minimal · up to 80756

The Pages build now stamps the deployed MiniPdf version into the web application, which displays it as a NuGet package link. No active merge-blocking risk is established.

🚥 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: displaying the deployed MiniPdf NuGet version in the web application.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/show-web-nuget-version

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

@shps951023
shps951023 merged commit c6c2b8c into main Sep 7, 2026
3 of 4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Pages workflow’s NuGet version resolution step should be made resilient to transient NuGet API/network failures to avoid flaky deployments.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Blazor WebAssembly converter UI to display the deployed MiniPdf package version next to the title, and adjusts the GitHub Pages deployment workflow to resolve the latest stable MiniPdf version from NuGet and stamp it into the published build metadata.

Changes:

  • Add a “NuGet vX.Y.Z” badge beside the MiniPdf title that links to the corresponding NuGet package version page.
  • Add CSS styling for the version badge to match the site’s header styling.
  • Resolve the latest stable MiniPdf version from NuGet during Pages deployment and pass it into dotnet publish via -p:Version=....
File summaries
File Description
MiniPdf.Web/MiniPdf.Web.Client/wwwroot/app.css Adds .package-version styles for the new NuGet version badge.
MiniPdf.Web/MiniPdf.Web.Client/Pages/Converter.razor Renders the NuGet badge and derives the displayed version from the MiniPdf assembly metadata.
.github/workflows/pages.yml Fetches the latest stable NuGet version during deploy and stamps it into the WASM publish step.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment on lines +45 to +52
$index = Invoke-RestMethod 'https://api.nuget.org/v3-flatcontainer/minipdf/index.json'
$version = $index.versions |
Where-Object { $_ -notmatch '-' } |
Select-Object -Last 1
if (-not $version) {
throw 'Could not resolve the latest stable MiniPdf version from NuGet.'
}
"version=$version" >> $env:GITHUB_OUTPUT
@shps951023
shps951023 deleted the feat/show-web-nuget-version branch September 16, 2026 08:23
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