fix(structured-logs): gate menu on remote feature - #1040
Conversation
sfmskywalker
left a comment
There was a problem hiding this comment.
Round 1 — APPROVE (HIGH)
Tip: 51bc301f76f2c8a39eb28ce10f7e9f581c7d6e9e → main (#1037)
Code Review gate: APPROVE + HIGH
(Formal GitHub event COMMENT — cannot approve an own-authored PR.)
The implementation reuses the established IsEnabledOrDefaultAsync fail-closed contract, preserves the existing Structured Logs menu item when enabled, and covers disabled, authorization failure, cancellation, and prerender failure paths. Root verification: exact two-file diff reviewed, signed commit verified, worker reported 15/15 focused tests and a clean production build, and git diff --check is clean.
Merge only after exact-head Copilot is clear, Greptile is 5/5 with zero unresolved threads, and hosted checks are terminal green.
There was a problem hiding this comment.
🟢 Approved
The implementation follows established diagnostics patterns and has appropriate focused coverage.
Pull request overview
Gates the Structured Logs menu on the existing remote-feature contract, resolving #1037.
Changes:
- Hide the menu when the feature is unavailable or checks fail.
- Add focused fail-closed tests.
File summaries
| File | Description |
|---|---|
StructuredLogsMenu.cs |
Adds remote-feature gating. |
StructuredLogsMenuTests.cs |
Tests enabled and failure paths. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Purpose
Close #1037 by hiding the Structured Logs navigation entry whenever the server does not advertise the Structured Logs remote feature.
Scope
Changes
IRemoteFeatureProviderintoStructuredLogsMenu.IsEnabledOrDefaultAsync(Feature.RemoteFeatureName).Verification
dotnet test src/modules/Elsa.Studio.Diagnostics.StructuredLogs.Tests/Elsa.Studio.Diagnostics.StructuredLogs.Tests.csproj— 15 passed.dotnet build src/modules/Elsa.Studio.Diagnostics.StructuredLogs/Elsa.Studio.Diagnostics.StructuredLogs.csproj— passed, 0 errors.git diff --check— clean.