-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Fix several small issues across Boilerplate (#9083) #9084
Fix several small issues across Boilerplate (#9083) #9084
Conversation
WalkthroughThe changes in this pull request involve updates to various configuration files and components within the boilerplate project template. Key modifications include changing the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (1)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/MauiProgram.Services.cs (1)
Line range hint
82-84
: Incorrect Application Insights scopes configurationSimilar to the AppCenter configuration, the Application Insights logging also needs to have IncludeScopes set to false to align with the PR requirements.
Apply this fix:
- { - options.IncludeScopes = true; - }); + { + options.IncludeScopes = false; + });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (10)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Components/Pages/AboutPage.razor
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Components/Pages/AboutPage.razor.cs
(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/MauiProgram.Services.cs
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/appsettings.Development.json
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Components/Pages/AboutPage.razor
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Components/Pages/AboutPage.razor.cs
(2 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.Services.cs
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Controllers/Identity/UserController.cs
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/appsettings.Development.json
(0 hunks)
💤 Files with no reviewable changes (1)
- src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/appsettings.Development.json
🧰 Additional context used
🪛 Biome
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-13: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/appsettings.Development.json
[error] 3-3: Expected a property but instead found '//#if (appCenter == true)'.
Expected a property here.
(parse)
[error] 4-4: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 4-4: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 4-8: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 9-10: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
🔇 Additional comments (13)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/appsettings.Development.json (2)
2-10
: LGTM! Clean implementation of conditional logging configuration.
The structure is well-organized and properly uses preprocessor directives to conditionally include AppCenter logging configuration. This aligns with the PR objective to relocate AppCenter's development configuration from the shared directory.
🧰 Tools
🪛 Biome
[error] 3-3: Expected a property but instead found '//#if (appCenter == true)'.
Expected a property here.
(parse)
[error] 4-4: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 4-4: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 4-8: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 9-10: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
4-8
:
Verify logging configuration completeness.
While the log level configuration looks good, the PR objectives mention setting "include scopes" to false. This setting appears to be missing from the configuration.
Let's check if this setting is configured elsewhere:
Consider adding the scopes configuration:
"AppCenterLoggerProvider": {
"LogLevel": {
"Default": "Information"
- }
+ },
+ "IncludeScopes": false
}
🧰 Tools
🪛 Biome
[error] 4-4: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 4-4: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 4-8: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json (2)
3-3
: LGTM! ServerAddress updated as requested.
The change from relative path ("/") to absolute URL ("http://localhost:5030/") aligns with the requirements specified in issue #9083.
🧰 Tools
🪛 Biome
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-13: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
3-3
: Verify the impact on different deployment scenarios.
While the absolute URL works for local development, please ensure this change doesn't affect:
- Containerized deployments where the server might be on a different host/port
- Production deployments with different URLs
- Development scenarios using different ports
Consider documenting the need to update this value in deployment guides.
🧰 Tools
🪛 Biome
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-3: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
[error] 3-13: End of file expected
Use an array for a sequence of values: [1, 2]
(parse)
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Components/Pages/AboutPage.razor.cs (2)
16-16
: LGTM: Clean field declaration.
The new webView
field follows the established pattern with proper initialization using default!
.
25-26
: LGTM: Clean separation of OS and WebView information.
The separation of OS and WebView information into distinct assignments directly addresses the PR objective of displaying the web view version in its own row.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Components/Pages/AboutPage.razor (1)
18-18
: LGTM! Successfully implements web view display requirement.
The addition of the web view information follows the established pattern and effectively addresses the PR objective of displaying the web view version in its own row.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Components/Pages/AboutPage.razor (1)
18-18
: LGTM! The web view information is properly displayed.
The implementation follows the existing pattern and successfully addresses the PR objective to display the web view version in its own row.
Let's verify the code-behind implementation:
✅ Verification successful
The code-behind implementation is properly synchronized with the UI changes
The verification confirms that the webView
field is correctly initialized from telemetryContext.WebView
in both MAUI and Windows client implementations, ensuring consistent behavior across platforms.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the webView field initialization in the code-behind file
# Test: Check if webView field is properly initialized from telemetryContext
rg -A 5 "webView.*=.*telemetryContext\.WebView" --type cs
Length of output: 1765
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Components/Pages/AboutPage.razor.cs (2)
17-17
: LGTM: New field follows consistent patterns
The new webView
field follows the established patterns in the class for field declarations and initialization.
27-28
: LGTM: Clean separation of OS and web view information
The separation of OS and web view assignments improves code clarity and aligns with the PR objective to display the web view version in its own row.
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Program.Services.cs (2)
Line range hint 9-89
: Well-structured service registration
The service registration follows best practices with proper scoping, clear separation of concerns, and appropriate configuration validation.
Line range hint 15-19
: Verify ServerAddress configuration value
The PR objectives mention that ServerAddress should be "http://localhost:5030/" instead of "/". While this code correctly uses the configuration value, we should verify the actual configuration setting.
✅ Verification successful
Based on the search results, I found the ServerAddress configuration in src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json
:
"ServerAddress": "http://localhost:5030/",
This matches the expected value mentioned in the PR objectives. Therefore, I can generate the final response:
ServerAddress configuration is correctly set
The ServerAddress configuration in appsettings.json
is already set to "http://localhost:5030/" as required.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Find and verify ServerAddress configuration
# Expected: Should find ServerAddress set to "http://localhost:5030/"
# Search for ServerAddress in all json, yaml, or cs files
rg -g '*.{json,yaml,yml,cs}' -i 'ServerAddress'
Length of output: 29069
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/MauiProgram.Services.cs (1)
66-68
: Verify AppCenter configuration location
The PR objectives mention that AppCenter's development configuration should not be in the shared directory. Let's verify its current location.
✅ Verification successful
Based on the search results, I can now generate the final response:
AppCenter configuration is correctly placed in client-specific projects
The AppCenter configuration is properly structured and not in the shared directory:
- Configuration files are in client-specific projects (
Boilerplate.Client.Maui
andBoilerplate.Client.Windows
) - AppCenter packages are correctly referenced only in the client projects
- The configuration follows the recommended pattern of keeping platform-specific monitoring in the respective client apps, as evidenced by comments in
MauiExceptionHandler.cs
andWindowsExceptionHandler.cs
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for AppCenter configuration files
echo "Searching for AppCenter configuration files..."
fd -e json -e config "appsettings\..*" | xargs rg -l "AppCenter"
# Search for any AppCenter related settings
echo "Searching for AppCenter related code..."
rg -g "!*.{md,txt}" "AppCenter" -C 3
Length of output: 22799
This closes #9083
Summary by CodeRabbit
New Features
Bug Fixes
Chores
AppCenterLoggerProvider
configuration from development settings.