Skip to content

Conversation

@mikemcdougall
Copy link
Collaborator

@mikemcdougall mikemcdougall commented Jan 24, 2026

Pull Request

Issue Link

Fixes #25

Summary

Scaffold the Blazor WASM admin UI with MudBlazor layout, routing, OIDC scaffolding, and admin API client. Wire /admin hosting plus standalone CORS support and document setup; add bUnit/Playwright scaffolds.

Changes Made

  • add Honua.Admin project (MudBlazor layout, nav, pages, auth scaffolding)
  • serve /admin from Honua.Server with standalone CORS option; add AOT note
  • add Honua.Admin.Tests (bUnit) and Honua.Admin.Playwright scaffolds
  • add admin UI setup doc

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Architecture tests pass
  • Local pre-PR validation passed (scripts/pre-pr-check.sh)

Coverage Impact

  • Line coverage: n/a (UI scaffolding)
  • Branch coverage: n/a (UI scaffolding)

Breaking Changes

None

Additional Context

  • Playwright browsers are installed in CI before running tests.

Pre-PR Checklist (for contributor)

  • Ran scripts/pre-pr-check.sh and all checks passed
  • Commit message follows format: type: description (#issue-number)
  • PR title matches main commit message
  • Issue number linked above
  • Tests added for new functionality
  • Documentation updated if needed

Reviewer Checklist

  • Code follows project architecture (vertical slices, no controllers)
  • Tests cover happy path and edge cases
  • No reflection in hot paths (AOT compatible)
  • Dependency limits respected (max 5 per endpoint)
  • Error handling follows project patterns
  • Security considerations addressed

@github-actions
Copy link

github-actions bot commented Jan 24, 2026

🤖 PR Template Validation

All checks passed! Your PR follows the template correctly.

Next steps:

  • Wait for CI to complete
  • Address any feedback from LLM architecture review
  • Request review from team members

Automated validation powered by GitHub Actions

@mikemcdougall mikemcdougall changed the title feat: scaffold admin ui for issue 25 feat: scaffold admin ui (#25) Jan 24, 2026
@github-actions
Copy link

🤖 LLM Architecture Review

⚠️ Assessment: NEEDS_ATTENTION

🏗️ Architecture Review Summary

Process Checks:

  • ✅ Linked issue with acceptance criteria detected.

Diff Review Chunks: 16

Chunk 1/16 (src/Honua.Admin/Honua.Admin.csproj)

Findings

  • No issues found in the provided diff chunk.

Overall Assessment: APPROVED

(Note: Further assessment of other diff chunks is necessary to provide a comprehensive review.)

Chunk 2/16 (src/Honua.Admin/Program.cs)

Findings

  • [BLOCKING] src/Honua.Admin/Program.cs:1-43 - Usage of Blazor WebAssembly and components indicates a shift from Minimal APIs to a more component-based architecture which may not align with the prescribed use of Minimal APIs.
  • [WARNING] src/Honua.Admin/Program.cs:1-43 - Dependency count in service configuration might be high, needs review to ensure it stays within project guidelines.

Overall Assessment: BLOCKING_ISSUES

Chunk 3/16 (src/Honua.Admin/Services/AdminApiOptions.cs)

Findings

  • [APPROVED] src/Honua.Admin/Services/AdminApiOptions.cs - The file correctly defines an internal class for configuration options, adhering to encapsulation rules. The properties are initialized properly, and the class is sealed, which is good practice for configuration types.

Overall Assessment: APPROVED

Chunk 4/16 (src/Honua.Admin/Services/AdminApiUrlResolver.cs)

Findings

  • [APPROVED] src/Honua.Admin/Services/AdminApiUrlResolver.cs - The file correctly defines an internal static class for URL resolution, adhering to encapsulation rules.
  • [APPROVED] src/Honua.Admin/Services/AdminApiUrlResolver.cs - The method uses AOT-safe patterns without reflection or dynamic JSON.

Overall Assessment: APPROVED

The implementation adheres to the architectural rules of Honua, including proper encapsulation, AOT-safe patterns, and no dependency direction issues. The class is internal, which is suitable for infrastructure implementation types.

Chunk 5/16 (src/Honua.Admin/Services/HonuaApiClient.cs)

Findings

  • None

Overall Assessment: APPROVED

Explanation:

  • The HonuaApiClient class is correctly marked as internal, adhering to the encapsulation rule for infrastructure implementation types.
  • The class uses dependency injection for HttpClient, which is a standard practice and does not violate any architectural rules.
  • The methods use source-generated JSON methods (GetFromJsonAsync), aligning with the AOT-safe pattern requirement.
  • There are no ControllerBase or [ApiController] attributes used, complying with the minimal API usage rule.
  • The file does not introduce any new dependencies that would violate the dependency count limits.
  • There is no use of sync-over-async patterns like .Result or .Wait().
  • The class is new and does not introduce any dependency direction issues.

Chunk 6/16 (src/Honua.Server/Features/Admin/Services/ConfigurationDocumentationService.cs)

Findings

  • None

Overall Assessment: APPROVED

Explanation:

  • The changes in ConfigurationDocumentationService.cs are additions of new configuration properties and documentation entries. These changes are internal to the Honua.Server project and do not introduce any new dependencies or architectural violations.
  • The service remains encapsulated as an internal class, adhering to the encapsulation rule.
  • There is no use of ControllerBase or ApiController, which aligns with the requirement to use Minimal APIs.
  • The changes do not involve reflection or dynamic JSON, ensuring AOT compatibility.
  • The file does not exceed the dependency count limits in the provided diff.
  • There are no instances of sync-over-async patterns in the diff.

Chunk 7/16 (src/Honua.Server/Features/Infrastructure/Security/CorsConfiguration.cs)

Findings

  • [BLOCKING] src/Honua.Server/Features/Infrastructure/Security/CorsConfiguration.cs:86 - ResolveAllowedOrigins method should be marked as internal to maintain encapsulation of infrastructure types.

Overall Assessment: NEEDS_ATTENTION

Chunk 8/16 (src/Honua.Server/Honua.Server.csproj)

Findings

  • [BLOCKING] src/Honua.Server/Honua.Server.csproj:28 - Honua.Server should not reference Honua.Admin as it violates the dependency direction rule.
  • [WARNING] src/Honua.Server/Honua.Server.csproj:36 - Introduction of Microsoft.AspNetCore.Components.WebAssembly.Server may suggest a shift towards a Blazor Server architecture, which needs review for compliance with the Minimal APIs rule.

Overall Assessment: BLOCKING_ISSUES

Chunk 9/16 (src/Honua.Server/Program.cs)

Findings

  • [WARNING] src/Honua.Server/Program.cs:344,435 - Use of Blazor for an admin UI might introduce dependencies on reflection or dynamic JSON which are not AOT-safe. Review needed to ensure AOT compatibility.
  • [WARNING] src/Honua.Server/Program.cs:344,435 - Introduction of static files and Blazor framework files increases the complexity and might affect the startup performance. Consider verifying the impact on performance and startup time.

Overall Assessment: NEEDS_ATTENTION

The introduction of a Blazor-based admin UI could potentially conflict with the AOT-safe patterns required by Honua's architecture rules. Further review is needed to ensure that these new dependencies do not introduce AOT-incompatible patterns or significantly degrade performance.

Chunk 10/16 (tests/Honua.Admin.Playwright/AdminSmokeTests.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation:

  • The diff is within a test code file (tests/Honua.Admin.Playwright/AdminSmokeTests.cs), which allows for patterns like reflection and async-over-sync that are typically restricted in production code.
  • The test class AdminSmokeTests uses dependency injection correctly with PlaywrightFixture.
  • No violations of architectural rules such as dependency direction, API pattern misuse, or encapsulation issues are present in this test code.
  • The test methods are using asynchronous calls appropriately, without any sync-over-async issues like .Result or .Wait().
  • The test is focused on end-to-end behavior, which is appropriate for Playwright tests.

Chunk 11/16 (tests/Honua.Admin.Playwright/GlobalUsings.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Chunk 12/16 (tests/Honua.Admin.Playwright/Honua.Admin.Playwright.csproj)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

The diff shows a new test project file for Honua.Admin.Playwright, which is correctly configured for a .NET 10 test project. There are no violations of the architectural rules specified for Honua, as the diff pertains solely to test code setup and dependency management within the test project.

Chunk 13/16 (tests/Honua.Admin.Playwright/PlaywrightFixture.cs)

Findings

  • No issues found.

Overall Assessment: APPROVED

Explanation:

  • The diff is part of the test code (tests/Honua.Admin.Playwright/PlaywrightFixture.cs), which allows for reflection and AOT-breaking patterns. The code does not need to adhere to the same strict rules as production code regarding AOT compatibility.
  • The class PlaywrightFixture implements IAsyncLifetime, which is appropriate for setting up and tearing down resources in test environments.
  • The properties Browser and Playwright are properly encapsulated, and the async methods InitializeAsync and DisposeAsync are used correctly for resource management.
  • There are no issues with dependency direction, excessive dependencies, sync-over-async patterns, or improper API usage (like ControllerBase or ApiController) in this context.
  • The file is correctly marked as a new file in the test suite, and the operations performed are typical for browser-based testing frameworks like Playwright in a headless configuration.

Chunk 14/16 (tests/Honua.Admin.Tests/GlobalUsings.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Chunk 15/16 (tests/Honua.Admin.Tests/Honua.Admin.Tests.csproj)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

The diff shows a typical setup for a .NET test project targeting .NET 10, with appropriate package references for testing frameworks and tools. There are no violations of the specified architectural rules in the context of test code.

Chunk 16/16 (tests/Honua.Admin.Tests/Pages/DashboardTests.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

The diff is within a test project and adheres to the architectural rules specified for test code. No violations of dependency direction, API patterns, encapsulation, or documentation requirements are present. The use of services and components is appropriate for the context of unit testing.

Overall Assessment: NEEDS_ATTENTION


Automated architectural analysis powered by OpenAI GPT-4
This review focuses on architectural patterns and design decisions
Human review still recommended for complex changes

@mikemcdougall mikemcdougall merged commit 33cdd67 into trunk Jan 25, 2026
10 checks passed
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.

Blazor WASM admin project setup

2 participants