Skip to content

Conversation

@ysmoradi
Copy link
Member

@ysmoradi ysmoradi commented Jul 11, 2025

closes #11092

Summary by CodeRabbit

  • Refactor

    • Unified environment naming conventions to use PascalCase (e.g., "Development", "Production") across the application.
    • Renamed environment check methods to more descriptive names (e.g., IsDev()IsDevelopment(), IsProd()IsProduction()).
    • Updated all environment checks throughout the app to use the new method names and naming conventions.
    • Adjusted build and deployment configurations to align with the new environment naming.
  • Chores

    • Minor updates to comments and workflow references for consistency with new naming standards.

@ysmoradi ysmoradi requested a review from Copilot July 11, 2025 11:14
@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The codebase refactors the environment detection logic by renaming environment constants and methods in the AppEnvironment class, changing from abbreviated forms (e.g., IsDev(), DEV) to fully descriptive PascalCase names (e.g., IsDevelopment(), Development). All usages across the solution are updated accordingly, with related workflow, solution, and build configuration adjustments.

Changes

File(s) Change Summary
.../src/Shared/Services/AppEnvironment.cs Refactored environment constants from uppercase abbreviations to PascalCase; renamed methods to IsDevelopment(), IsProduction(); updated preprocessor directives.
.../src/Client/Boilerplate.Client.Core/....cs/.razor Replaced all calls to AppEnvironment.IsDev()/IsProd() with IsDevelopment()/IsProduction().
.../src/Client/Boilerplate.Client.Web/ClientWebSettings.cs, Program.cs Updated environment check methods to use new IsDevelopment().
.../src/Client/Boilerplate.Client.Maui/App.xaml.cs, MauiProgram.cs Updated environment check methods to use new IsDevelopment().
.../src/Client/Boilerplate.Client.Windows/... Updated environment check methods to use new IsDevelopment().
.../src/Server/Boilerplate.Server.Api/ServerApiSettings.cs, .../Services/Identity/AppJwtSecureDataFormat.cs Updated environment check methods to use new IsDevelopment().
.../src/Server/Boilerplate.Server.Web/Program.cs, Program.Services.cs, .../Services/SimpleJwtSecureDataFormat.cs Updated environment check methods to use new IsDevelopment().
.../src/Shared/Services/SharedExceptionHandler.cs Updated environment check method to use new IsDevelopment().
.../src/Directory.Build.props Removed .ToUpper() from environment constant definition for preprocessor symbols.
.../Boilerplate.sln, Boilerplate.slnx Renamed workflow file references from cd-prod.yml to cd-production.yml.
.../.github/workflows/cd-production.yml, cd-test.yml Changed ENV_NAME from lowercase to PascalCase ("prod"→"Production", "test"→"Test").

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.
Loading

Assessment against linked issues

Objective Addressed Explanation
Refactor AppEnvironment to use PascalCase environment names and descriptive method names (IsDevelopment(), IsProduction()) (#11092)
Update all usages of old methods/constants to new naming conventions (#11092)
Update build configuration and workflow references to match new naming (#11092)

Poem

In fields of code, a rabbit hops,
Through "Dev" and "Prod" the naming swaps.
PascalCase now leads the way,
For clear environments, hooray!
No more guessing, just precision—
A tidy, hoppy naming mission!
🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 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 (DEVDevelopment, IsDev()IsDevelopment(), etc.)
  • Updated all call sites to use the new IsDevelopment(), IsTest(), IsStaging(), and IsProduction() methods
  • Adjusted MSBuild define constants in Directory.Build.props and 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>

Copy link

@coderabbitai coderabbitai bot left a 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 & Staging

Right 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 available

Once DI is ready this handler should delegate to ILogger<AppJwtSecureDataFormat> rather than raw Console.WriteLine to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 17e153e and 02c14fa.

📒 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 lowercase prod/test checks found in cd-template.yml – change is safe to merge

Ran a case-sensitive search in
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-template.yml
and found no hard-coded lowercase prod or test literals. The reusable workflow doesn’t depend on a lowercase ENV_NAME, so switching to Production won’t break the deploy job.

src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.Services.cs (1)

21-24: Change aligns with new AppEnvironment API – 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 verbatim

The cd-template.yml invoked by cd-test.yml does not reference github.ref_name or branch names, so it will use whatever you pass to ENV_NAME as-is. The lowercase branch trigger (test) and the uppercase ENV_NAME: Test are independent.

Please ensure your GitHub environment is named exactly Test (case-sensitive). If your environment is called test, update line 13 in
src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd-test.yml:

-      ENV_NAME: Test
+      ENV_NAME: test
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs (1)

67-71: Updated guard to IsDevelopment() – no further action

The new method name matches the shared AppEnvironment refactor; 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 correctly

The 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 applied

Only 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 gone

The solution item now points to cd-production.yml. Double-check that:

  1. .github/workflows/cd-production.yml is committed.
  2. The removed cd-prod.yml is 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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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 replaced

Verification confirms there are no remaining calls to AppEnvironment.IsDev(), IsProd(), IsTest(), or IsStaging().

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() to IsDevelopment() 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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.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() to AppEnvironment.IsDevelopment() aligns perfectly with the refactoring in AppEnvironment.cs where 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 string to private static readonly string with nameof() 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 Development instead 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() to IsDevelopment() 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() to IsProduction() follows the same pattern as the other method renames, maintaining consistency throughout the class.

@ysmoradi ysmoradi merged commit c29e28b into bitfoundation:develop Jul 11, 2025
3 checks passed
@ysmoradi ysmoradi deleted the 11092 branch July 11, 2025 11:30
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.

bit Boilerplate AppEnvironment needs refactoring

1 participant