-
Notifications
You must be signed in to change notification settings - Fork 30
Release v1.7.3 — visible web viewer version #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ on: | |
| paths: | ||
| - 'src/PlanViewer.Core/**' | ||
| - 'src/PlanViewer.Web/**' | ||
| - 'src/PlanViewer.App/PlanViewer.App.csproj' | ||
| - '.github/workflows/deploy-web.yml' | ||
| workflow_dispatch: | ||
|
|
||
|
|
@@ -36,6 +37,17 @@ jobs: | |
| - name: Install WASM workload | ||
| run: dotnet workload install wasm-tools | ||
|
|
||
| - name: Sync web version with app version | ||
| shell: pwsh | ||
| run: | | ||
| $appVersion = ([xml](Get-Content src/PlanViewer.App/PlanViewer.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ } | ||
| Write-Host "App version: $appVersion" | ||
| $webCsproj = 'src/PlanViewer.Web/PlanViewer.Web.csproj' | ||
| $content = Get-Content $webCsproj -Raw | ||
| $content = [regex]::Replace($content, '<Version>[^<]+</Version>', "<Version>$appVersion</Version>") | ||
| Set-Content -Path $webCsproj -Value $content -NoNewline | ||
| Write-Host "Synced web csproj to $appVersion" | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The regex Generated by Claude Code |
||
|
|
||
| - name: Publish Blazor WASM | ||
| run: dotnet publish src/PlanViewer.Web/PlanViewer.Web.csproj -c Release -o publish | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| <div class="landing-content"> | ||
| <h2>Free SQL Server Query Plan Analysis</h2> | ||
| <p class="privacy">Paste or upload a .sqlplan file. Your plan XML never leaves your browser.</p> | ||
| <p class="powered-by">Powered by the same analysis engine in the <a href="https://github.com/erikdarlingdata/PerformanceStudio" target="_blank" rel="noopener">Performance Studio</a> app.</p> | ||
| <p class="powered-by">Powered by the same analysis engine in the <a href="https://github.com/erikdarlingdata/PerformanceStudio" target="_blank" rel="noopener">Performance Studio</a> app. <span class="app-version">@AppVersion</span></p> | ||
|
|
||
| @if (errorMessage != null) | ||
| { | ||
|
|
@@ -57,6 +57,7 @@ else | |
| { | ||
| <span class="toolbar-version">@result.SqlServerBuild</span> | ||
| } | ||
| <span class="toolbar-app-version" title="Performance Studio web viewer version">@AppVersion</span> | ||
| @if (shareUrl != null) | ||
| { | ||
| <span class="share-url"><a href="@shareUrl" target="_blank">@shareUrl</a></span> | ||
|
|
@@ -1664,6 +1665,13 @@ else | |
| @code { | ||
| private const string ShareApiBase = "https://stats.erikdarling.com"; | ||
|
|
||
| private static readonly string AppVersion = GetAppVersion(); | ||
| private static string GetAppVersion() | ||
| { | ||
| var v = typeof(Index).Assembly.GetName().Version; | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Generated by Claude Code |
||
| return v == null ? "?" : $"v{v.Major}.{v.Minor}.{v.Build}"; | ||
| } | ||
|
|
||
| private string activeTab = "paste"; | ||
| private string planXml = ""; | ||
| private string? errorMessage; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <RootNamespace>PlanViewer.Web</RootNamespace> | ||
| <Version>1.4.0</Version> | ||
| <Version>1.7.3</Version> | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that the workflow rewrites this value at publish time, the committed value is purely decorative. Worth a one-line comment here (or in the sync step) noting that the source of truth is Generated by Claude Code |
||
| <Authors>Erik Darling</Authors> | ||
| <Company>Darling Data LLC</Company> | ||
| <Product>SQL Performance Studio</Product> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -451,6 +451,23 @@ textarea::placeholder { | |
| color: var(--text-muted); | ||
| } | ||
|
|
||
| .toolbar-app-version { | ||
| font-size: 0.75rem; | ||
| font-weight: 600; | ||
| color: var(--text-muted); | ||
| padding: 0.1rem 0.4rem; | ||
| border-radius: 3px; | ||
| background: rgba(0, 0, 0, 0.05); | ||
|
Comment on lines
+454
to
+460
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both badges bind Generated by Claude Code |
||
| margin-left: auto; | ||
| } | ||
|
|
||
| .app-version { | ||
| font-size: 0.8rem; | ||
| font-weight: 600; | ||
| color: var(--text-muted); | ||
| margin-left: 0.25rem; | ||
| } | ||
|
|
||
| /* === Statement Tabs === */ | ||
| .statement-tabs { | ||
| display: flex; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.Project.PropertyGroup.Versionis fragile: when a csproj has multiple<PropertyGroup>blocks (e.g. a Debug/Release conditional group),PropertyGroupbecomes an array and.Versionreturns an array of values.Where-Object { $_ }filters empty strings but not duplicates — if a future PropertyGroup also declares<Version>,$appVersionbecomes an array and the regex replacement below interpolates something likeSystem.Object[]into the web csproj. ConsiderSelect-Xml -XPath '/Project/PropertyGroup/Version' | Select-Object -First 1 -ExpandProperty Node | ForEach-Object InnerTextor similar, and assert a single scalar result before proceeding.Generated by Claude Code