Skip to content

Fix Razor build errors and address PR review comments#510

Merged
aurelianware merged 3 commits intomainfrom
copilot/sub-pr-507
Mar 18, 2026
Merged

Fix Razor build errors and address PR review comments#510
aurelianware merged 3 commits intomainfrom
copilot/sub-pr-507

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

Fixes 13 Razor compiler errors introduced in the portal UI build (b8bb463) and addresses five review comments from PR #507.

Build fixes

CS0246 — missing [Authorize] namespace (Reports, PaymentRuns, Workflows, PremiumBilling)
Added @using Microsoft.AspNetCore.Authorization to _Imports.razor rather than repeating it per-file.

RZ9986 — mixed C# and markup in Style attributes (AssignPcpDialog, ClaimDetailsNew)
Razor disallows interleaving literal text with @(...) in attribute values. Converted to single expressions:

- Style="color: @(bc.DeductibleMet ? "#00ff88" : "#ffaa00");"
+ Style="@(bc.DeductibleMet ? "color: #00ff88;" : "color: #ffaa00;")"

RZ9999 — shadowed context in nested RowTemplate (EdiOperations)
Inner MudTable RowTemplate inside ChildRowContent conflicted with the outer context. Fixed with an explicit Context="record" rename.

Review comment fixes

  • solutions-payers.html — escaped <1&lt;1 so <1 hour deployment renders rather than being treated as a tag
  • cho-assessment.md + assessment.html — removed duplicate "Lengthy implementation timelines" bullet from the Traditional Vendors list (copy/paste leftover)
  • Apis.razor — Patient Access API "Try in Demo" now deep-links to /demo/members instead of the generic /demo landing, consistent with all other API cards

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Base automatically changed from claude/update-trial-links-explore-JgAAb to main March 18, 2026 15:57
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
Copilot AI changed the title [WIP] Update trial links to navigate into demo areas for a more realistic experience Fix Razor build errors and address PR review comments Mar 18, 2026
Copilot AI requested a review from aurelianware March 18, 2026 16:05
@aurelianware
Copy link
Owner

@copilot Error: buildx failed with: ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet build -c Release -o /app/build" did not complete successfully: exit code: 1

@github-actions github-actions bot added size/S documentation Improvements or additions to documentation github-config labels Mar 18, 2026
…x invalid icon

Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 18, 2026

@copilot Error: buildx failed with: ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet build -c Release -o /app/build" did not complete successfully: exit code: 1

Fixed in commit 85d9205. Two root causes:

  1. CS0101 namespace conflictPages/Error.razor generated class Error in namespace CloudHealthOffice.Portal.Pages, while Pages/Error/AdminConsentRequired.razor created a sub-namespace CloudHealthOffice.Portal.Pages.Error. C# (via Roslyn) treats having a class and a sub-namespace with the same name as a duplicate definition. Fixed by renaming Error.razorAppError.razor; the @page "/error" route is unchanged so all Navigation.NavigateTo("/error") calls continue to work.

  2. CS0117 invalid iconIcons.Material.Filled.CalculateOutlined doesn't exist in MudBlazor 6.x (line 614 of ClaimDetailsNew.razor). This error was previously masked by earlier compile failures. Fixed by using Icons.Material.Filled.Calculate.

Both dotnet build (Debug) and dotnet build -c Release now succeed locally.

@aurelianware aurelianware marked this pull request as ready for review March 18, 2026 16:55
Copilot AI review requested due to automatic review settings March 18, 2026 16:55
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
CloudHealthOffice.Portal 2% 2%
CloudHealthOffice.Portal 2% 2%
Summary 2% (390 / 20508) 2% (96 / 5156)

@aurelianware aurelianware merged commit 6112b6e into main Mar 18, 2026
62 checks passed
@aurelianware aurelianware deleted the copilot/sub-pr-507 branch March 18, 2026 16:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes Razor build breaks in the Portal UI and applies a few small content/UI updates that address prior review feedback (notably around demo deep-links and static site copy).

Changes:

  • Added a shared Razor import for Microsoft.AspNetCore.Authorization to resolve missing [Authorize]/[AllowAnonymous] compile errors across pages.
  • Fixed Razor compiler issues in MudBlazor templates/attributes (nested context shadowing; mixed markup/C# in Style attributes).
  • Applied small UI/content fixes: corrected HTML escaping, removed duplicate bullets, and deep-linked the Patient Access API “Try in Demo” button to /demo/members.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/site/solutions-payers.html Escapes <1 to &lt;1 so the text renders correctly in HTML.
src/site/assets/cho-assessment.md Removes a duplicated bullet in the “Traditional Vendors” list.
src/site/assessment.html Removes the same duplicated bullet in the rendered HTML version.
src/portal/CloudHealthOffice.Portal/_Imports.razor Adds Microsoft.AspNetCore.Authorization to resolve Razor attribute namespace errors globally.
src/portal/CloudHealthOffice.Portal/Pages/EdiOperations.razor Renames the inner MudTable row context to avoid context shadowing (RZ9999).
src/portal/CloudHealthOffice.Portal/Pages/ClaimDetailsNew.razor Fixes Style attribute Razor parsing (RZ9986) and updates the tab icon constant.
src/portal/CloudHealthOffice.Portal/Pages/AppError.razor Adds an anonymous-accessible /error page for account-load failure messaging.
src/portal/CloudHealthOffice.Portal/Pages/Apis.razor Updates the Patient Access API demo button to deep-link to /demo/members.
src/portal/CloudHealthOffice.Portal/Dialogs/AssignPcpDialog.razor Converts mixed text/expression Style attribute to a single expression (RZ9986).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github-config size/S size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants