Format code and comments (#12442)#12443
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis pull request standardizes punctuation formatting across the bitplatform codebase by systematically replacing em-dashes (—) with regular hyphens (-) in comments, documentation, and demo placeholder text. One functional change adds error handling for interop calls in the Cesium map provider. ChangesPunctuation Standardization and Error Handling
🎯 1 (Trivial) | ⏱️ ~3 minutes
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Dialog/BitDialogDemo.razor.cs (1)
536-604:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPreserve readable prose when normalizing punctuation.
These replacements turn several sentences into malformed compounds like
beginning-a,new-an, andbegins-your, which will show up in the rendered demos and copied sample code. Consider rephrasing the sentences or keeping a spaced dash separator instead.🤖 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/Pages/Components/Surfaces/Dialog/BitDialogDemo.razor.cs` around lines 536 - 604, The demo Razor string example6RazorCode contains prose where normalizing punctuation produced malformed compounds like "beginning-a", "new-an", and "begins-your"; update the string content inside example6RazorCode to either rephrase those sentences or replace hyphenated fragments with a spaced dash or space (e.g., "beginning - a" or "beginning a") so the rendered demo and copied sample code show readable prose; search for the problematic substrings "beginning-a", "new-an", and "begins-your" inside example6RazorCode and apply the fixes consistently.src/Websites/WikiDocs/OData.md (1)
76-99:⚠️ Potential issue | 🟡 MinorKeep the OData sample typed before materializing.
ODataQueryOptions<T>.ApplyTo(...)returns a non-genericIQueryable, but EF Core’sToListAsyncrequiresIQueryable<T>, so the sample won’t compile as written.♻️ Proposed fix
- var result = await options.ApplyTo(query).ToListAsync(); + var result = await options.ApplyTo(query) + .Cast<ProductDto>() + .ToListAsync();🤖 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/Websites/WikiDocs/OData.md` around lines 76 - 99, The sample calls ODataQueryOptions<T>.ApplyTo(query) which returns a non-generic IQueryable, so ToListAsync on EF Core will not compile; update the Get example to cast the result of options.ApplyTo(query) back to IQueryable<ProductDto> (or use Queryable.Cast<ProductDto>() on the returned IQueryable) before calling ToListAsync. Specifically locate the ApplyTo call in the Get method and ensure the result is converted to IQueryable<ProductDto> (e.g., assign to a variable like appliedQuery of type IQueryable<ProductDto>) and then call ToListAsync on that typed query.
🤖 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/Map/Providers/BitMapCesium.ts`:
- Around line 673-676: The current try/catch around
dotnet.invokeMethodAsync('OnViewChanged', view) doesn't catch Promise
rejections; change the invocation to handle async rejection by attaching a
.catch handler (e.g., call dotnet.invokeMethodAsync('OnViewChanged',
view).catch(() => {/* ignore - handle was disposed mid-flight */})), and keep
the existing guard that s.dotnetObj === dotnet to avoid invoking when the dotnet
object changed.
In `@src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/SignalR/AppHub.cs`:
- Line 150: In AppHub.cs fix the shared typo in both chatbot system prompt
strings by replacing "help-would" with a grammatical phrase such as "help —
would you" (or "help, would you") in the two system prompt string literals;
locate the prompt definitions in the AppHub class (the system prompt strings
used for confusion/ frustration handling) and update both occurrences so the
messages read e.g. "I'm sorry if this is confusing. I'm here to help — would you
like me to explain it again?" to keep them consistent and predictable.
In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Notifications/Message/BitMessageDemo.razor.samples.cs`:
- Around line 365-374: Update the sample text in BitMessageDemo.razor.samples.cs
so it exactly matches the rendered demo copy: change the phrase "to craft,
inspire, and to create" to "to craft, inspire, and create" within the
string/block used by the BitMessageDemo samples (locate the multi-line sample
text in BitMessageDemo.razor.samples.cs and replace the extra "to"). Ensure the
rest of the paragraph remains unchanged.
In
`@src/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/BitDropdownPerf.razor`:
- Around line 52-53: The comment incorrectly references
OnAfterRenderAsync(firstRender=true) while the component actually implements
OnAfterRender(bool firstRender); update the comment above the lifecycle hook in
BitDropdownPerf.razor to mention OnAfterRender(bool firstRender) (or simply
"OnAfterRender (firstRender=true)") so it matches the implemented method and
clarifies that only the first-render OnAfterRender transition sets the state to
"Ready" for Playwright.
In `@src/Butil/Bit.Butil/Publics/Cookie/SameSite.cs`:
- Line 7: Update the XML comment for SameSite.None to correct punctuation and
wording: replace "The cookie will be sent in all requests-both cross-site and
same-site." with "The cookie will be sent in all requests, both cross-site and
same-site." (fix the hyphen to a comma and ensure proper spacing) so the comment
on the SameSite.None enum/field is clear and grammatical.
---
Outside diff comments:
In
`@src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Dialog/BitDialogDemo.razor.cs`:
- Around line 536-604: The demo Razor string example6RazorCode contains prose
where normalizing punctuation produced malformed compounds like "beginning-a",
"new-an", and "begins-your"; update the string content inside example6RazorCode
to either rephrase those sentences or replace hyphenated fragments with a spaced
dash or space (e.g., "beginning - a" or "beginning a") so the rendered demo and
copied sample code show readable prose; search for the problematic substrings
"beginning-a", "new-an", and "begins-your" inside example6RazorCode and apply
the fixes consistently.
In `@src/Websites/WikiDocs/OData.md`:
- Around line 76-99: The sample calls ODataQueryOptions<T>.ApplyTo(query) which
returns a non-generic IQueryable, so ToListAsync on EF Core will not compile;
update the Get example to cast the result of options.ApplyTo(query) back to
IQueryable<ProductDto> (or use Queryable.Cast<ProductDto>() on the returned
IQueryable) before calling ToListAsync. Specifically locate the ApplyTo call in
the Get method and ensure the result is converted to IQueryable<ProductDto>
(e.g., assign to a variable like appliedQuery of type IQueryable<ProductDto>)
and then call ToListAsync on that typed query.
🪄 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: 7e32f6bf-c691-4855-9f46-cfd49e830b42
📒 Files selected for processing (68)
.github/agents/contribute-to-bitplatform.agent.mdsrc/Besql/Demo/Bit.Besql.Demo/wwwroot/bootstrap/bootstrap.min.csssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMap.razor.cssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMapLatLngBounds.cssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMapMarker.cssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMapValidation.cssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/Providers/BitMapArcGis.tssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/Providers/BitMapCesium.tssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/Providers/BitMapGlBase.tssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/Providers/BitMapLeaflet.tssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/Providers/BitMapOpenLayers.tssrc/BlazorUI/Bit.BlazorUI.Extras/Components/Map/Providers/BitMapboxMapProvider.cssrc/BlazorUI/Bit.BlazorUI.Extras/README.mdsrc/BlazorUI/Bit.BlazorUI.Extras/wwwroot/openlayers/bit-map-ol-loader.jssrc/BlazorUI/Bit.BlazorUI.SourceGenerators/AutoInject/AutoInjectSourceGenerator.cssrc/BlazorUI/Bit.BlazorUI/Components/Inputs/TagsInput/BitTagsInput.tssrc/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor.cssrc/BlazorUI/Bit.BlazorUI/README.mdsrc/BlazorUI/Bit.BlazorUI/Utils/Theme/BitThemeSerialization.cssrc/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/SignalR/AppHub.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/DataGrid/BitDataGridDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/DataGrid/BitDataGridDemo.razor.samples.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/Map/BitMapDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProModal/BitProModalDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProModal/BitProModalDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProPanel/BitProPanelDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProPanel/BitProPanelDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/Pivot/BitPivotDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Navs/Pivot/BitPivotDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Notifications/Message/BitMessageDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Notifications/Message/BitMessageDemo.razor.samples.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Notifications/Persona/BitPersonaDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Accordion/BitAccordionDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Accordion/BitAccordionDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Collapse/BitCollapseDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Collapse/BitCollapseDemo.razor.samples.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Dialog/BitDialogDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Dialog/BitDialogDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Modal/BitModalDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Modal/BitModalDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/ScrollablePane/BitScrollablePaneDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/ScrollablePane/BitScrollablePaneDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor.samples.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Overlay/BitOverlayDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Overlay/BitOverlayDemo.razor.cssrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Sticky/BitStickyDemo.razorsrc/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Sticky/BitStickyDemo.razor.cssrc/BlazorUI/Tests/Bit.BlazorUI.Tests/Components/Extras/Map/BitMapTests.cssrc/BlazorUI/Tests/Bit.BlazorUI.Tests/Utils/Theme/BitThemeColorDerivationTests.cssrc/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Components/Pages/BitDropdownPerf.razorsrc/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance.TestHost/Program.cssrc/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/BitDropdownBrowserTests.cssrc/BlazorUI/Tests/Performance/Bit.BlazorUI.Tests.Performance/PerformanceTestBase.cssrc/Butil/Bit.Butil/Publics/Cookie/SameSite.cssrc/Butil/Bit.Butil/Publics/Screen.cssrc/SourceGenerators/Bit.SourceGenerators/AutoInject/AutoInjectSourceGenerator.cssrc/SourceGenerators/Bit.SourceGenerators/HttpClientProxy/ControllerEntry.cssrc/Templates/Boilerplate/Bit.Boilerplate/.github/agents/ai-dlc.agent.mdsrc/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/bitify.prompt.mdsrc/Templates/Boilerplate/Bit.Boilerplate/.github/prompts/scaffold.prompt.mdsrc/Templates/Boilerplate/Bit.Boilerplate/AGENTS.mdsrc/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Infrastructure/Services/TwilioHealthCheck.cssrc/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil18ScreenPage.razorsrc/Websites/Platform/src/Bit.Websites.Platform.Server/SignalR/AppHub.cssrc/Websites/WikiDocs/BlazorModesOverview.mdsrc/Websites/WikiDocs/MS.Ext.AI-Integration.mdsrc/Websites/WikiDocs/OData.md
closes #12442
Summary by CodeRabbit
Documentation
Bug Fixes
Style