Skip to content

Fix slow build process of BlazorUI projects (#12649)#12650

Open
msynk wants to merge 7 commits into
bitfoundation:developfrom
msynk:12649-blazorui-slow-build
Open

Fix slow build process of BlazorUI projects (#12649)#12650
msynk wants to merge 7 commits into
bitfoundation:developfrom
msynk:12649-blazorui-slow-build

Conversation

@msynk

@msynk msynk commented Jul 13, 2026

Copy link
Copy Markdown
Member

closes #12649

Summary by CodeRabbit

  • New Features
    • Demo can now run in server-only or WebAssembly-enabled mode via build configuration, automatically adjusting render mode and the boot flow.
    • Added a shared browser-only client project to centralize shared web assets and services.
  • Developer Experience
    • Improved dotnet watch asset handling for Sass and TypeScript with more reliable include/exclude behavior.
    • Added development-only real-time SCSS compilation with automatic hot CSS updates for the demo.
  • Documentation
    • Updated demo docs with clearer guidance for debugging Server vs WebAssembly.
    • Refreshed PDF viewer documentation wording for consistency.

@msynk
msynk requested a review from yasmoradi July 13, 2026 09:46
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The changes update frontend watch rules, add shared web-client wiring, make demo WebAssembly hosting conditional, introduce development SCSS watching, and normalize punctuation in PDF viewer documentation and comments.

Changes

BlazorUI build and hosting

Layer / File(s) Summary
Frontend source watch configuration
src/BlazorUI/*/*.csproj, src/BlazorUI/Demo/Client/...
Rooted SCSS, TypeScript, and Razor CSS watch entries now exclude generated and dependency directories.
Shared web client project
src/BlazorUI/Bit.BlazorUI.slnx, src/BlazorUI/Demo/Client/...
Adds the shared Razor project, relocates web services into shared namespaces, updates progress markup, and references the shared project.
Conditional WebAssembly hosting
src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/*, src/BlazorUI/Demo/Client/.../AppRenderMode.cs
WebAssembly build constants, references, middleware, render modes, launch settings, and boot assets are conditional on IncludeWasm.
Development SCSS watcher
src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs, src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
Starts and manages a development Sass watcher alongside the server, including logging and shutdown cleanup.

PDF documentation punctuation

Layer / File(s) Summary
PDF documentation punctuation
src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/*
PDF viewer comments, XML documentation, and stylesheet comments receive punctuation-only edits without functional changes.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant DemoServer
  participant ScssCompilerService
  participant Sass
  participant Browser
  Developer->>DemoServer: Start development server
  DemoServer->>ScssCompilerService: Start WatchScssFiles
  ScssCompilerService->>Sass: Launch Sass watch process
  Sass->>Browser: Update compiled CSS
  DemoServer->>Browser: Serve Server or WebAssembly boot assets
Loading

Suggested reviewers: yasmoradi

Poem

A rabbit watched the Sass leaves flow,
While WASM learned when it should go.
Shared web paths hopped into place,
PDF dashes softened their face.
Build-time carrots, neatly grown! 🐇

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes unrelated PdfViewer comment and punctuation-only edits that do not support the build-time issue. Remove the PdfViewer documentation-only changes or split them into a separate PR focused on the build-performance fix.
Docstring Coverage ⚠️ Warning Docstring coverage is 26.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main goal of reducing slow BlazorUI builds.
Linked Issues check ✅ Passed The PR conditions the WebAssembly Web project out of non-Release builds, directly addressing the reported always-built WASM slowdown.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj (1)

75-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Centralize the Bit.BlazorES2019 version to avoid silent breakage.

The version 10.5.0-pre-08 is hardcoded in the glob path at line 76 and must manually match the PackageReference at line 27. If the package is updated without updating the glob, the copy target silently matches zero files and the dev server 404s on _framework/bit.blazor.*.es2019.js.

♻️ Suggested refactor: use a shared MSBuild property
 <!-- Add to the PropertyGroup near the top -->
+<BitBlazorES2019Version>10.5.0-pre-08</BitBlazorES2019Version>

Then reference it in both locations:

-<PackageReference Include="Bit.BlazorES2019" Version="10.5.0-pre-08" />
+<PackageReference Include="Bit.BlazorES2019" Version="$(BitBlazorES2019Version)" />
-<!-- The version here must match the Bit.BlazorES2019 PackageReference above. -->
-<_BitBlazorES2019Scripts Include="$(NuGetPackageRoot)bit.blazores2019\10.5.0-pre-08\contentFiles\any\net10.0\wwwroot\_framework\*.js" />
+<_BitBlazorES2019Scripts Include="$(NuGetPackageRoot)bit.blazores2019\$(BitBlazorES2019Version)\contentFiles\any\net10.0\wwwroot\_framework\*.js" />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj`
around lines 75 - 76, Centralize the Bit.BlazorES2019 version used by the
project by defining one shared MSBuild property and referencing it from both the
PackageReference and the _BitBlazorES2019Scripts Include path. Remove the
hardcoded 10.5.0-pre-08 value from the glob so package updates cannot leave the
script path out of sync.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor`:
- Around line 11-13: Update the normal render-mode selection in App.razor to
honor includeWasm, falling back to the prerender-enabled Blazor Server mode when
WebAssembly is disabled; expose that server mode publicly in AppRenderMode
alongside the existing no-prerender modes. Preserve AppRenderMode.Current only
when includeWasm is enabled.

In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs`:
- Around line 14-96: Handle startup exceptions within WatchScssFiles instead of
allowing them to fault the background task until shutdown. Wrap the process
setup and watcher startup flow, including Process.Start, job assignment,
output-reader initialization, and app.WaitForShutdownAsync, in exception
handling that logs the failure and returns because SCSS watching is best-effort
development tooling.

---

Nitpick comments:
In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj`:
- Around line 75-76: Centralize the Bit.BlazorES2019 version used by the project
by defining one shared MSBuild property and referencing it from both the
PackageReference and the _BitBlazorES2019Scripts Include path. Remove the
hardcoded 10.5.0-pre-08 value from the glob so package updates cannot leave the
script path out of sync.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 16cd81c3-77c8-4cc4-957c-2298b161bd7d

📥 Commits

Reviewing files that changed from the base of the PR and between 3371af2 and 8e817e4.

📒 Files selected for processing (20)
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  • src/BlazorUI/Bit.BlazorUI.slnx
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  • src/BlazorUI/Demo/.gitignore
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Startup/Middlewares.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Services/AppRenderMode.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Bit.BlazorUI.Demo.Client.Web.Shared.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebDeviceCoordinator.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebExceptionHandler.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj

Comment thread src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor Outdated
@msynk

msynk commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

@msynk Sure, I'll do a full review of all the changes in this PR.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (3)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor (2)

67-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Avoid self-closing non-void HTML elements.

Although the Blazor compiler correctly handles self-closing div tags, standard HTML5 considers div a normal (non-void) element. Using explicit closing tags (<div></div>) aligns better with standard HTML practices and avoids potential issues with other parsers or tools.

♻️ Proposed refactor
-        <div class="bswup-progress-text" />
+        <div class="bswup-progress-text"></div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor`
at line 67, Replace the self-closing bswup-progress-text div in
AppBswupProgressBar with an explicit opening and closing div pair, preserving
its class and surrounding markup.

66-66: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider using standard boolean syntax for component parameters.

For component parameters, it is more idiomatic and less prone to parsing ambiguity to use strings ("false", "true") or explicit C# expressions (@false, @true) instead of unquoted values.

♻️ Proposed refactor
-    <BswupProgress AppContainer="`#app-container`" HideApp=false AutoReload=true ShowLogs=false>
+    <BswupProgress AppContainer="`#app-container`" HideApp="false" AutoReload="true" ShowLogs="false">
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor`
at line 66, Update the BswupProgress component invocation to use explicit
boolean parameter syntax for HideApp, AutoReload, and ShowLogs, such as quoted
values or explicit C# expressions, while preserving their current true/false
settings.
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs (1)

5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Rename the static class to follow standard C# naming conventions.

Static classes should not be prefixed with I, as that convention is strictly reserved for interfaces. Consider renaming this class to ClientWebServiceCollectionExtensions.

♻️ Proposed refactor
-public static class IClientWebServiceCollectionExtensions
+public static class ClientWebServiceCollectionExtensions
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs`
at line 5, Rename the static class IClientWebServiceCollectionExtensions to
ClientWebServiceCollectionExtensions and update all references to the class
while preserving its existing extension methods and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor`:
- Line 67: Replace the self-closing bswup-progress-text div in
AppBswupProgressBar with an explicit opening and closing div pair, preserving
its class and surrounding markup.
- Line 66: Update the BswupProgress component invocation to use explicit boolean
parameter syntax for HideApp, AutoReload, and ShowLogs, such as quoted values or
explicit C# expressions, while preserving their current true/false settings.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs`:
- Line 5: Rename the static class IClientWebServiceCollectionExtensions to
ClientWebServiceCollectionExtensions and update all references to the class
while preserving its existing extension methods and behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b82f5fe8-b515-471e-8b1f-04bfee18d609

📥 Commits

Reviewing files that changed from the base of the PR and between 3371af2 and cc29215.

📒 Files selected for processing (19)
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  • src/BlazorUI/Bit.BlazorUI.slnx
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Startup/Middlewares.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Services/AppRenderMode.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Bit.BlazorUI.Demo.Client.Web.Shared.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebDeviceCoordinator.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebExceptionHandler.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj

@msynk

msynk commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

@msynk Sure, I'll do a full review of all the changes in this PR again.

✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 12 seconds.

@msynk

msynk commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

@msynk Sure, I'll do a full review of all the changes in this PR again.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs (1)

5-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the I prefix from the static class name.

Naming a static class with an I prefix violates standard C# naming conventions, as it makes the class appear to be an interface.

♻️ Proposed refactor
-public static class IClientWebServiceCollectionExtensions
+public static class ClientWebServiceCollectionExtensions
 {
     public static IServiceCollection AddClientWebServices(this IServiceCollection services)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs`
around lines 5 - 8, Rename the static class
IClientWebServiceCollectionExtensions to ClientWebServiceCollectionExtensions,
preserving the existing AddClientWebServices method and all behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfString.cs`:
- Line 61: Update the PDFDocEncoding mapping table in BitPdfString so byte 0x84
maps to the EM DASH character U+2014, while preserving the existing mappings for
adjacent bytes and the AsText decoding behavior.

In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs`:
- Line 49: Update the watch command construction in ScssCompilerService to
include the Dart Sass --load-path=. option alongside the existing arguments,
ensuring the project root is treated as a configured load path while preserving
the current watch behavior.

---

Nitpick comments:
In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs`:
- Around line 5-8: Rename the static class IClientWebServiceCollectionExtensions
to ClientWebServiceCollectionExtensions, preserving the existing
AddClientWebServices method and all behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ab3ab1e0-6455-4a3f-be24-4ea10e6edb16

📥 Commits

Reviewing files that changed from the base of the PR and between 3371af2 and 76604d4.

📒 Files selected for processing (39)
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfRenderMode.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.razor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.scss
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.ts
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfDocument.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfString.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfStructTree.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfUnsupportedEncryptionException.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfXRef.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Content/BitPdfTextExtractor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Filters/BitPdfJpegDecoder.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfCffFontParser.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfFont.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfSfntGlyphMapper.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfTrueTypeSanitizer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfType1Font.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfCanvasRenderResult.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfHtmlRenderer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfImage.cs
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  • src/BlazorUI/Bit.BlazorUI.slnx
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Startup/Middlewares.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Services/AppRenderMode.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Bit.BlazorUI.Demo.Client.Web.Shared.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebDeviceCoordinator.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebExceptionHandler.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj

Comment thread src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfString.cs Outdated
Comment thread src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs Outdated
@msynk

msynk commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

@msynk Sure, I'll do a full review of all the changes in this PR again.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs`:
- Around line 24-26: Update the startup flow around app.RunAsync and
Bit.BlazorUI.Demo.Server.Services.ScssCompilerService.WatchScssFiles so the host
is started before awaiting the SCSS watcher, rather than invoking both
concurrently in Task.WhenAll. Preserve watcher behavior while allowing startup
failures from app.RunAsync to propagate immediately.

In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json`:
- Around line 4-6: Remove the explanatory comment from launchSettings.json so
the file remains valid JSON, and move the Blazor Server/WASM debugging guidance
to the relevant README.md or other documentation file. Preserve the
instructions, including the IncludeWasm build option, in the documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: db1cdf18-0585-4cde-9cdc-a2a9afe4ad8c

📥 Commits

Reviewing files that changed from the base of the PR and between 3371af2 and 28d9ca9.

📒 Files selected for processing (38)
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfRenderMode.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.razor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.scss
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.ts
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfDocument.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfStructTree.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfUnsupportedEncryptionException.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfXRef.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Content/BitPdfTextExtractor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Filters/BitPdfJpegDecoder.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfCffFontParser.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfFont.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfSfntGlyphMapper.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfTrueTypeSanitizer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfType1Font.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfCanvasRenderResult.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfHtmlRenderer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfImage.cs
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  • src/BlazorUI/Bit.BlazorUI.slnx
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Startup/Middlewares.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Services/AppRenderMode.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Bit.BlazorUI.Demo.Client.Web.Shared.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/ClientWebServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebDeviceCoordinator.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebExceptionHandler.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj

Comment thread src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
Comment thread src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json Outdated
@msynk

msynk commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

@msynk Sure, I'll do a full review of all the changes in this PR again.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs`:
- Line 24: Update the SCSS compiler process setup around the toolPath
construction to invoke the Windows sass.cmd through cmd.exe (or the system
ComSpec) with /c, while preserving direct execution of sass on non-Windows
platforms. Ensure the redirected-output ProcessStartInfo receives the correct
executable and arguments so the watcher starts successfully on Windows.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 50b17789-c347-4252-abcb-99be99f7cebd

📥 Commits

Reviewing files that changed from the base of the PR and between 3371af2 and 958fd5e.

📒 Files selected for processing (39)
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfRenderMode.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.razor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.scss
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.ts
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfDocument.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfStructTree.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfUnsupportedEncryptionException.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfXRef.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Content/BitPdfTextExtractor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Filters/BitPdfJpegDecoder.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfCffFontParser.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfFont.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfSfntGlyphMapper.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfTrueTypeSanitizer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfType1Font.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfCanvasRenderResult.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfHtmlRenderer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfImage.cs
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  • src/BlazorUI/Bit.BlazorUI.slnx
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Startup/Middlewares.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Services/AppRenderMode.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Bit.BlazorUI.Demo.Client.Web.Shared.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/ClientWebServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebDeviceCoordinator.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebExceptionHandler.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj
  • src/BlazorUI/Demo/README.md
💤 Files with no reviewable changes (1)
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json

@msynk

msynk commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

@msynk I’ll perform a fresh full review of all changes in this PR.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj`:
- Around line 42-49: Remove the SCSS Watch item from the project files at
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj:42-49,
src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj:33-39,
src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj:32-38,
src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj:20-23, and
src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj:34-37. Keep the
existing TypeScript and generated .razor.css Watch items unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 57d4716e-2e2f-4881-8f5d-3c5eb881a90d

📥 Commits

Reviewing files that changed from the base of the PR and between 633bf5c and 5f8a435.

📒 Files selected for processing (39)
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfRenderMode.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.razor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.scss
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/BitPdfViewer.ts
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfDocument.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfStructTree.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfUnsupportedEncryptionException.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/BitPdfXRef.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Content/BitPdfTextExtractor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Filters/BitPdfJpegDecoder.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfCffFontParser.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfFont.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfSfntGlyphMapper.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfTrueTypeSanitizer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Fonts/BitPdfType1Font.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfCanvasRenderResult.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfHtmlRenderer.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/PdfViewer/Core/Render/BitPdfImage.cs
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  • src/BlazorUI/Bit.BlazorUI.slnx
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Extensions/IServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Startup/Middlewares.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Services/AppRenderMode.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Bit.BlazorUI.Demo.Client.Web.Shared.csproj
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Components/AppBswupProgressBar.razor
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Extensions/ClientWebServiceCollectionExtensions.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebDeviceCoordinator.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web.Shared/Services/WebExceptionHandler.cs
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj
  • src/BlazorUI/Demo/README.md
💤 Files with no reviewable changes (1)
  • src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Properties/launchSettings.json

Comment on lines +42 to +49
<!-- dotnet watch: watch the scss/ts sources (so edits trigger the sass/tsc targets on rebuilds) AND
the generated .razor.css files (so dotnet watch's scoped-css hot reload pushes style changes to
the browser when the in-app scss compiler regenerates them - see ScssCompilerService in the demo
server project). Paths are rooted with $(MSBuildProjectDirectory) because dotnet watch resolves
relative Watch items of referenced projects against the startup project's directory. -->
<Watch Include="$(MSBuildProjectDirectory)\**\*.scss" Exclude="$(MSBuildProjectDirectory)\node_modules\**;$(MSBuildProjectDirectory)\bin\**;$(MSBuildProjectDirectory)\obj\**" />
<Watch Include="$(MSBuildProjectDirectory)\**\*.ts" Exclude="$(MSBuildProjectDirectory)\node_modules\**;$(MSBuildProjectDirectory)\bin\**;$(MSBuildProjectDirectory)\obj\**;$(MSBuildProjectDirectory)\**\*.d.ts" />
<Watch Include="$(MSBuildProjectDirectory)\**\*.razor.css" Exclude="$(MSBuildProjectDirectory)\node_modules\**;$(MSBuildProjectDirectory)\bin\**;$(MSBuildProjectDirectory)\obj\**" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant project files with line numbers, focusing on the watch entries and nearby targets.
for f in \
  src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj \
  src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj \
  src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj \
  src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj \
  src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
do
  echo "===== $f ====="
  nl -ba "$f" | sed -n '1,220p'
  echo
done

# Search for relevant targets and comments that explain the watch/build behavior.
echo "===== SEARCH: Watch / dotnet watch / ScssCompilerService / sass / tsc ====="
rg -n --hidden -S \
  -e 'ScssCompilerService' \
  -e 'dotnet watch' \
  -e '<Watch ' \
  -e 'sass' \
  -e 'tsc' \
  -e 'ScopedCss' \
  -e 'Target Name=' \
  src/BlazorUI

Repository: bitfoundation/bitplatform

Length of output: 308


🏁 Script executed:

#!/bin/bash
set -euo pipefail

files=(
  src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj
  src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj
  src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj
  src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj
  src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj
)

for f in "${files[@]}"; do
  echo "===== $f ====="
  sed -n '1,220p' "$f" | cat -n
  echo
done

echo "===== SEARCH ====="
rg -n -S \
  -e 'ScssCompilerService' \
  -e 'dotnet watch' \
  -e '<Watch ' \
  -e 'sass' \
  -e 'tsc' \
  -e 'ScopedCss' \
  -e 'Target Name=' \
  src/BlazorUI

Repository: bitfoundation/bitplatform

Length of output: 43852


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "===== ScssCompilerService ====="
sed -n '1,220p' src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Services/ScssCompilerService.cs | cat -n

echo "===== Demo server Program ====="
sed -n '1,120p' src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Program.cs | cat -n

echo "===== Windows client project ====="
sed -n '1,120p' src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Windows/Bit.BlazorUI.Demo.Client.Windows.csproj | cat -n

Repository: bitfoundation/bitplatform

Length of output: 12325


🌐 Web query:

dotnet watch <Watch> item rebuilds custom watch items behavior hot reload documentation

💡 Result:

In.NET, dotnet watch manages file tracking and build triggers through the Watch item group in project files [1][2]. Adding custom files to be watched To include additional files for watching, you can add them to the Watch item group in your.csproj file using glob patterns [1][3]. For example, to add JavaScript files: Excluding files from being watched To prevent specific files or folders from triggering a rebuild or hot reload, you can use the Watch="false" attribute on Compile, EmbeddedResource, or ProjectReference items [1][4]. For broader exclusions of folders or file patterns, you can modify the DefaultItemExcludes property [1][5]. Behavior and Hot Reload When a file change is detected, dotnet watch assesses whether the change can be applied via Hot Reload, a technology that updates the running application without a full rebuild [6]. 1. Successful Hot Reload: For supported file types (such as.cs,.razor, or.cshtml), dotnet watch attempts to generate a patch and apply it to the running process [6]. If successful, the application updates immediately without a restart. 2. Rude Edits: If a change cannot be hot-reloaded (a "rude edit"), dotnet watch automatically falls back to a full rebuild and application restart [6]. 3. Advanced Configuration: dotnet watch performs a design-time build with the property DotNetWatchBuild set to true [1][4]. You can use this property to conditionally include items in your project file only when the watcher is active [1][2]:

Citations:


🌐 Web query:

site:learn.microsoft.com dotnet watch Watch Include triggers rebuild restart custom file changes

💡 Result:

To include custom files or file types in the dotnet watch process, you must add them to the Watch item group in your project file (.csproj). By default, dotnet watch tracks Compile and EmbeddedResource items, along with common content files (like.json,.config, and those in wwwroot) [1][2][3]. You can extend this behavior by adding an ItemGroup to your project file. Use the Include attribute to specify the files (supporting glob patterns) and the Exclude attribute to filter out unwanted files [1][3]. Example configuration: When a file in the Watch group changes, dotnet watch will trigger a rebuild and restart of your application [1][4]. Additional tips for control: 1. Opting out: If you want to prevent specific files from triggering a watch event, you can add Watch="false" to an item's definition in the project file [1][3]. 2. Global exclusions: Starting in.NET 10, you can use the DefaultItemExcludes property to globally exclude entire folders or patterns from being watched, which applies to all default item types [1]. 3. Manual trigger: While dotnet watch handles changes automatically, you can also manually force a rebuild and restart by pressing Ctrl+R in the terminal where the command is running [4][5]. For complex scenarios where you need to watch projects or files outside the standard project structure, you can create a custom project file that defines a custom target and an ItemGroup for the files or projects you wish to monitor, then execute it using dotnet watch msbuild /t:TargetName [2][3].

Citations:


Remove *.scss from these Watch items. ScssCompilerService already recompiles these SCSS sources during development, so keeping them in dotnet watch only adds an extra rebuild/restart on every style edit. Keep the .ts and generated .razor.css watchers where they’re still needed.

  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj#L42-L49
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj#L33-L39
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj#L32-L38
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj#L20-L23
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj#L34-L37
📍 Affects 5 files
  • src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj#L42-L49 (this comment)
  • src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj#L33-L39
  • src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj#L32-L38
  • src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj#L20-L23
  • src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj#L34-L37
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj`
around lines 42 - 49, Remove the SCSS Watch item from the project files at
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj:42-49,
src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj:33-39,
src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj:32-38,
src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj:20-23, and
src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj:34-37. Keep the
existing TypeScript and generated .razor.css Watch items unchanged.

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.

The build process of the BlazorUI projects is too slow

1 participant