refactor: consolidate common @using directives into _Imports.razor files#4
Merged
Merged
Conversation
- Added MediatR and Microsoft.AspNetCore.Authorization to Features/_Imports.razor - Removed redundant @using directives from individual .razor files: - Features/BlogPosts/Create/Create.razor - Features/BlogPosts/List/Index.razor - Features/BlogPosts/Edit/Edit.razor - Features/UserManagement/ManageRoles.razor - Features/UserManagement/Profile.razor - Features/BlogPosts/Delete/ConfirmDeleteDialog.razor - Components/Layout/NavMenu.razor - Components/Routes.razor - All common usings now centralized in appropriate _Imports.razor files - File-specific usings (feature namespaces, specialized types) retained in individual files - Build verified: 0 errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Consolidates repeated Razor @using directives into the appropriate folder-level _Imports.razor files (primarily under Features) to reduce per-component duplication and simplify maintenance.
Changes:
- Added common
@using Microsoft.AspNetCore.Authorizationand@using MediatRtosrc/Web/Features/_Imports.razor. - Removed now-redundant
@usingdirectives from several Feature pages/components. - Removed redundant authorization usings from shared Components where they’re already covered by
Components/_Imports.razor.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Web/Features/_Imports.razor | Centralizes Microsoft.AspNetCore.Authorization and MediatR for all Feature pages. |
| src/Web/Features/UserManagement/Profile.razor | Removes redundant Microsoft.AspNetCore.Authorization using; relies on Features imports. |
| src/Web/Features/UserManagement/ManageRoles.razor | Removes redundant MediatR/authorization usings; relies on Features imports. |
| src/Web/Features/BlogPosts/List/Index.razor | Removes redundant MediatR/Data/auth usings; relies on Features imports. |
| src/Web/Features/BlogPosts/Edit/Edit.razor | Removes redundant MediatR/Data/auth usings; relies on Features imports. |
| src/Web/Features/BlogPosts/Delete/ConfirmDeleteDialog.razor | Removes redundant Microsoft.AspNetCore.Components using. |
| src/Web/Features/BlogPosts/Create/Create.razor | Removes redundant MediatR/auth usings; relies on Features imports. |
| src/Web/Components/Routes.razor | Removes redundant authorization using; covered by Components/_Imports.razor. |
| src/Web/Components/Layout/NavMenu.razor | Removes redundant authorization using; covered by Components/_Imports.razor. |
mpaulosky
added a commit
that referenced
this pull request
Apr 18, 2026
Scribe: Finalize session completion for Legolas razor-imports work - Write orchestration logs (Legolas & Boromir) - Write session log for PR #4 merge - Merge decision inbox → decisions.md - Remove processed inbox files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky
added a commit
that referenced
this pull request
Apr 18, 2026
* ci: add PR build and test workflow - Build solution in Release mode - Run all three test suites (Architecture, Unit, Integration) - Collect code coverage with coverlet - Report test results with dorny/test-reporter - Post coverage summary as PR comment - Cache NuGet packages for faster builds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: Consolidate squad orchestration from PR #4 merge Scribe: Finalize session completion for Legolas razor-imports work - Write orchestration logs (Legolas & Boromir) - Write session log for PR #4 merge - Merge decision inbox → decisions.md - Remove processed inbox files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: update Boromir history and decision record for CI workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky
added a commit
that referenced
this pull request
Apr 18, 2026
Merge boromir-pr9-review-fixes.md inbox item into decisions.md as decision #4 — CI Workflow Conventions. Five conventions established: - Always use global-json-file: global.json in setup-dotnet - Use nuGetVersion for /p:Version in dotnet build - squad-test.yml triggers on pull_request only - Surgical use of continue-on-error - Comments must not contradict code Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky
added a commit
that referenced
this pull request
Apr 18, 2026
## Summary Closes the decisions inbox — merges `boromir-pr9-review-fixes.md` into `.squad/decisions.md` as **Decision #4: CI Workflow Conventions**. Working as **Scribe** (Documentation & Knowledge Management) ### What changed - `.squad/decisions.md` — Added Decision #4 with 5 CI conventions from PR #9 Copilot review - `.squad/decisions/inbox/boromir-pr9-review-fixes.md` — Marked as merged (tombstone comment) ### Decision #4 covers 1. Always use `global-json-file: global.json` in `setup-dotnet` 2. Use `nuGetVersion` for `/p:Version` in dotnet build (not `assemblySemVer`) 3. `squad-test.yml` must only trigger on `pull_request`, not `push` 4. Surgical use of `continue-on-error: true` 5. Comments must not contradict the code they describe These conventions apply to all future workflow files.
mpaulosky
added a commit
that referenced
this pull request
Apr 19, 2026
- Replace {PROJECT_NUMBER} placeholder with project 4 (MyBlog)
- Repo linked to https://github.com/users/mpaulosky/projects/4
- Status columns confirmed: Backlog, In Sprint, In Review, Done, Released
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 19, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR consolidates common
@usingdirectives from individual.razorfiles into the appropriate_Imports.razorfiles to reduce duplication and improve maintainability.Changes
Features/_Imports.razor
Added:
@using Microsoft.AspNetCore.Authorization@using MediatRRemoved redundant usings from:
Features/BlogPosts/Create/Create.razor
@using MediatR@using Microsoft.AspNetCore.AuthorizationFeatures/BlogPosts/List/Index.razor
@using MediatR@using MyBlog.Web.Data@using Microsoft.AspNetCore.Components.AuthorizationFeatures/BlogPosts/Edit/Edit.razor
@using MediatR@using MyBlog.Web.Data@using Microsoft.AspNetCore.AuthorizationFeatures/UserManagement/ManageRoles.razor
@using MediatR@using Microsoft.AspNetCore.AuthorizationFeatures/UserManagement/Profile.razor
@using Microsoft.AspNetCore.AuthorizationSystem.Security.Claims,MyBlog.Web.SecurityFeatures/BlogPosts/Delete/ConfirmDeleteDialog.razor
@using Microsoft.AspNetCore.ComponentsComponents/Layout/NavMenu.razor
@using Microsoft.AspNetCore.Components.AuthorizationComponents/Routes.razor
@using Microsoft.AspNetCore.Components.AuthorizationVerification
✅ Build succeeded with 0 errors:
dotnet build MyBlog.slnx --configuration ReleaseNotes
_Imports.razorfiles