-
-
Notifications
You must be signed in to change notification settings - Fork 254
Refactor bit Boilerplate AppEnvironment (#11092) #11093
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
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe codebase refactors the environment detection logic by renaming environment constants and methods in the Changes
Sequence Diagram(s)sequenceDiagram
participant App as Application Code
participant Env as AppEnvironment
App->>Env: AppEnvironment.IsDevelopment()
Env-->>App: Returns true if current environment is Development
App->>Env: AppEnvironment.IsProduction()
Env-->>App: Returns true if current environment is Production
Note right of Env: Internal logic uses PascalCase constants and updated preprocessor directives.
Assessment against linked issues
Poem
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Pull Request Overview
This PR refactors AppEnvironment to use clear PascalCase identifiers (Development, Test, Staging, Production) and updates all related environment checks, build defines, and workflow references accordingly.
- Renamed environment constants and methods (
DEV→Development,IsDev()→IsDevelopment(), etc.) - Updated all call sites to use the new
IsDevelopment(),IsTest(),IsStaging(), andIsProduction()methods - Adjusted MSBuild define constants in
Directory.Build.propsand renamed GitHub workflow files and references to match the new environment names
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs | Renamed constants and methods to PascalCase, updated default Current assignment |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/SharedExceptionHandler.cs | Replaced AppEnvironment.IsDev() with IsDevelopment() |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Services/SimpleJwtSecureDataFormat.cs | Updated environment check to IsDevelopment() |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs | Updated exception display kind check to IsDevelopment() |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.Services.cs | Updated diagnostic logger registration to IsDevelopment() |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Services/Identity/AppJwtSecureDataFormat.cs | Updated environment check to IsDevelopment() |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/ServerApiSettings.cs | Replaced IsDev() in JWT key validation with IsDevelopment() |
| src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props | Removed .ToUpper() around $(Environment) in DefineConstants |
Multiple client and core files (e.g., Program.cs, AuthManager.cs, CacheDelegatingHandler.cs) |
Updated all AppEnvironment.IsDev() and negations to IsDevelopment() |
src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.slnx and .sln |
Renamed workflow references from cd-prod.yml to cd-production.yml |
| .github/workflows/cd-test.yml and cd-production.yml | Updated ENV_NAME from lowercase to PascalCase (Test / Production) |
Comments suppressed due to low confidence (3)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IClientCoreServiceCollectionExtensions.cs:131
- Add or update unit tests for the renamed 'IsDevelopment()' (and other environment checks) to ensure features like sensitive data logging and detailed errors toggle correctly in different environments.
optionsBuilder.EnableSensitiveDataLogging(AppEnvironment.IsDevelopment())
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-test.yml:13
- [nitpick] Update any project documentation or README sections that reference the old lowercase 'test' environment name so they reflect the new 'Test' identifier.
ENV_NAME: Test
src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props:35
- Removing 'ToUpper()' on '$(Environment)' may introduce case-sensitivity issues with preprocessor symbols. Verify that the environment values passed here exactly match the symbol names used in the '#if' directives.
<DefineConstants>$(DefineConstants);$(Environment);$(Configuration)</DefineConstants>
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs
Show resolved
Hide resolved
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/SharedExceptionHandler.cs (1)
14-16: Consider also surfacing full details in Test & StagingRight now verbose messages are shown only in Development. During automated test runs or staging deployments, detailed stack-traces are often equally valuable.
-if (AppEnvironment.IsDevelopment()) +if (AppEnvironment.IsDevelopment() || AppEnvironment.IsTest() || AppEnvironment.IsStaging()) return exception.ToString();Optional, but would save time when triaging issues outside dev boxes.
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Services/Identity/AppJwtSecureDataFormat.cs (1)
48-52: Console.WriteLine is fine for bootstrap, but wire up ILogger when availableOnce DI is ready this handler should delegate to
ILogger<AppJwtSecureDataFormat>rather than rawConsole.WriteLineto ensure log routing works in containers & cloud hosts.No change required for this PR.
src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.slnx (1)
31-33: Mirror the rename in other tooling (Rider, Resharper, etc.)If team members use rider/resharper solution filters, update those artifacts too so they don’t reference the deleted
cd-prod.yml.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting
📒 Files selected for processing (32)
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-production.yml(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-test.yml(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.sln(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.slnx(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/ClientCoreSettings.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppErrorBoundary.razor(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Diagnostic/AppDiagnosticModal.razor.Utils.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Diagnostic/AppDiagnosticModal.razor.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/SignIn/SignInPanel.razor.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/PasswordlessTab.razor.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IClientCoreServiceCollectionExtensions.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IConfigurationExtensions.cs(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs(3 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthManager.cs(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/ClientExceptionHandlerBase.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/CultureService.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/CacheDelegatingHandler.cs(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/MauiProgram.cs(3 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/ClientWebSettings.cs(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.cs(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsLocalHttpServer.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/ServerApiSettings.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Services/Identity/AppJwtSecureDataFormat.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.Services.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Services/SimpleJwtSecureDataFormat.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/SharedExceptionHandler.cs(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (19)
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Services/SimpleJwtSecureDataFormat.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.Services.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Services/Identity/AppJwtSecureDataFormat.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsLocalHttpServer.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Diagnostic/AppDiagnosticModal.razor.Utils.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/ClientCoreSettings.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs (2)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/HttpRequestExtensions.cs (1)
HasNoRetryPolicyAttribute(20-23)src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IClientCoreServiceCollectionExtensions.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Diagnostic/AppDiagnosticModal.razor.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/ClientExceptionHandlerBase.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthManager.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/SharedExceptionHandler.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/MauiProgram.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/CultureService.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/ClientWebSettings.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/ServerApiSettings.cs (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (2)
AppEnvironment(11-58)IsDevelopment(29-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build and test
🔇 Additional comments (39)
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-production.yml (1)
13-13: No lowercaseprod/testchecks found incd-template.yml– change is safe to mergeRan a case-sensitive search in
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-template.yml
and found no hard-coded lowercaseprodortestliterals. The reusable workflow doesn’t depend on a lowercaseENV_NAME, so switching toProductionwon’t break the deploy job.src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.Services.cs (1)
21-24: Change aligns with newAppEnvironmentAPI – LGTM
AppEnvironment.IsDev()➜AppEnvironment.IsDevelopment()compiles against the refactored helper and keeps behaviour identical. No additional concerns.src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-test.yml (1)
13-13: Ignore branch-name casing—ENV_NAME is passed verbatimThe
cd-template.ymlinvoked bycd-test.ymldoes not referencegithub.ref_nameor branch names, so it will use whatever you pass toENV_NAMEas-is. The lowercase branch trigger (test) and the uppercaseENV_NAME: Testare independent.Please ensure your GitHub environment is named exactly
Test(case-sensitive). If your environment is calledtest, update line 13 in
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-test.yml:- ENV_NAME: Test + ENV_NAME: testsrc/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs (1)
67-71: Updated guard toIsDevelopment()– no further actionThe new method name matches the shared
AppEnvironmentrefactor; the exception display logic remains intact. 👍src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Services/SimpleJwtSecureDataFormat.cs (1)
33-36: Minor rename applied correctlyThe catch-block now uses
AppEnvironment.IsDevelopment(). Functionality unchanged and still avoids noisy logging outside dev.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsLocalHttpServer.cs (1)
131-134: Environment-check rename correctly appliedOnly the method name changed, behaviour stays intact. No further action required.
src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.sln (1)
55-57: Make sure the new workflow file actually exists and old references are goneThe solution item now points to
cd-production.yml. Double-check that:
.github/workflows/cd-production.ymlis committed.- The removed
cd-prod.ymlis deleted from both repo and any CI config referring to it.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Diagnostic/AppDiagnosticModal.razor.Utils.cs (1)
132-132: LGTM! Method name updated for better readability.The refactoring from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()improves code readability while maintaining the same logical behavior for cookie security settings.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/CacheDelegatingHandler.cs (1)
13-13: LGTM! Method name updated for better readability.The refactoring from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()improves code readability while maintaining the correct logic for cache control in different environments.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs (1)
23-23: LGTM! Method name updated for better readability.The refactoring from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()improves code readability while maintaining the correct logic for retry policies in different environments.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/AppErrorBoundary.razor (1)
5-5: LGTM! Method name updated for better readability.The refactoring from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()improves code readability while maintaining the correct logic for exception display in different environments.src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs (1)
65-65: All old environment helper methods have been replacedVerification confirms there are no remaining calls to
AppEnvironment.IsDev(),IsProd(),IsTest(), orIsStaging().Great work—this refactoring is complete and safe to merge.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/App.xaml.cs (1)
45-45: LGTM! Improved method naming for better readability.The change from
IsDev()toIsDevelopment()makes the code more self-documenting and follows better naming conventions.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Settings/Account/PasswordlessTab.razor.cs (1)
54-54: LGTM! Consistent with the environment method refactoring.The change maintains the same logic while using the more descriptive method name for environment detection.
src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props (1)
35-35: LGTM! MSBuild configuration aligned with PascalCase environment constants.Removing the
.ToUpper()transformation is correct since the environment constants are now PascalCase (Development,Production) instead of uppercase (DEV,PROD).src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/SignIn/SignInPanel.razor.cs (1)
280-280: LGTM! Consistent environment method refactoring.The change maintains the same exception handling logic while using the more descriptive method name for environment detection.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.cs (2)
108-108: LGTM! Consistent environment method refactoring.The change maintains the same WebView2 configuration logic while using the more descriptive method name for environment detection.
136-136: LGTM! Improved method naming in exception handling.The change maintains the same exception display logic while using the more descriptive method name for environment detection.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/CultureService.cs (1)
27-27: LGTM! Clean refactoring to more descriptive method name.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()improves code readability while maintaining the same logic for setting the cookie's Secure flag.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Diagnostic/AppDiagnosticModal.razor.cs (1)
48-50: LGTM! Consistent refactoring for better code clarity.The update from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same logic for setting environment-specific log filter levels while using a more descriptive method name.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/ClientExceptionHandlerBase.cs (1)
41-41: LGTM! Method name refactoring improves code readability.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()is consistent with the refactoring pattern and maintains the same logic for environment-based exception handling.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/MauiProgram.cs (3)
137-137: LGTM! Environment method name refactoring for WebView settings.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same logic for enabling/disabling WebView zoom and accelerator keys based on environment while using a more descriptive method name.
176-176: LGTM! Consistent refactoring for Android WebView settings.The update from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()preserves the logic for enabling mixed content mode on Android in development environments while improving code readability.
215-215: LGTM! Environment-based exception display refactoring.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same conditional logic for exception display behavior while using a more descriptive method name.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs (2)
19-19: LGTM! Debug logging environment check refactoring.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same logic for conditionally adding debug logging while using a more descriptive method name.
34-34: LGTM! Sentry debug flag environment check refactoring.The update from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()preserves the logic for setting Sentry's debug flag based on environment while improving code readability.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/ClientCoreSettings.cs (1)
31-31: LGTM! Clean refactoring to improve method naming.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()improves code readability while maintaining the same validation logic.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IConfigurationExtensions.cs (1)
14-14: LGTM! Consistent method naming improvement.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same Android emulator localhost handling logic while improving code readability.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IClientCoreServiceCollectionExtensions.cs (2)
126-126: LGTM! Consistent method naming in EF Core configuration.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same logic for conditionally using the compiled model in non-development environments.
131-132: LGTM! Improved method naming for development-specific logging.The changes from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()preserve the same behavior of enabling sensitive data logging and detailed errors only in development environments.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthManager.cs (2)
65-65: LGTM! Improved method naming in cookie security configuration.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same security logic - setting cookies as secure (HTTPS-only) except in development environments.
227-227: LGTM! Consistent method naming for cookie security.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()preserves the same security behavior when clearing authentication cookies.src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/ServerApiSettings.cs (1)
93-93: LGTM! Consistent method naming in security validation.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()maintains the same security validation logic - ensuring default placeholder values are replaced in non-development environments.src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/ClientWebSettings.cs (2)
1-1: Question: Is the BOM marker intentional?The addition of the Unicode BOM marker (
) at the beginning of the file seems unusual. This could be an unintentional artifact from the editor or tooling. Please verify if this was intentional or if it should be removed.
21-21: LGTM: Method name change is consistent with refactoring.The change from
AppEnvironment.IsDev()toAppEnvironment.IsDevelopment()aligns perfectly with the refactoring inAppEnvironment.cswhere methods were renamed to use full descriptive names instead of abbreviations.src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/AppEnvironment.cs (4)
13-16: Excellent refactoring: Using nameof() for string constants.The change from
const stringtoprivate static readonly stringwithnameof()is a great improvement. This ensures that the string values always match the field names, reducing the risk of typos and making the code more maintainable.
19-26: LGTM: Preprocessor directives updated consistently.The preprocessor directive changes from uppercase to PascalCase (e.g.,
#if Developmentinstead of#if DEVELOPMENT || DEV) are consistent with the field name changes and improve readability.
29-32: Excellent improvement: Descriptive method naming.The renaming from
IsDev()toIsDevelopment()significantly improves code readability by using full descriptive names instead of abbreviations. This makes the code more self-documenting and easier to understand.
44-47: LGTM: Consistent method renaming.The renaming from
IsProd()toIsProduction()follows the same pattern as the other method renames, maintaining consistency throughout the class.
closes #11092
Summary by CodeRabbit
Refactor
IsDev()→IsDevelopment(),IsProd()→IsProduction()).Chores