Skip to content

feat: extract NoteBookmark.SharedUI Razor Class Library#129

Merged
fboucher merged 8 commits intov-nextfrom
squad/119-extract-sharedui
Apr 4, 2026
Merged

feat: extract NoteBookmark.SharedUI Razor Class Library#129
fboucher merged 8 commits intov-nextfrom
squad/119-extract-sharedui

Conversation

@fboucher
Copy link
Copy Markdown
Owner

@fboucher fboucher commented Apr 3, 2026

Closes #119

Summary

Extracted reusable Blazor components from NoteBookmark.BlazorApp into a new Razor Class Library (NoteBookmark.SharedUI).

Components moved (11 total)

  • Posts, PostEditor, PostEditorLight
  • NoteDialog, SuggestionList
  • Search, Settings, Summaries, SummaryEditor
  • MinimalLayout, PostNoteClient

Changes

  • NoteBookmark.SharedUI RCL created, references NoteBookmark.Domain + NoteBookmark.AIServices
  • BlazorApp updated: Routes.razor uses AdditionalAssemblies, Program.cs calls AddAdditionalAssemblies, _Imports.razor includes SharedUI namespaces
  • NoteDialog refactored to use EventCallback (dual-path: works with FluentDialog cascade AND standalone)
  • NoteBookmark.BlazorApp.Tests project added with bUnit 2.7.2 — 25/25 tests passing

Testing

  • Build: ✅ green
  • bUnit regression tests: ✅ 25/25 passing
  • No behaviour changes to existing web app

fboucher and others added 8 commits April 3, 2026 11:06
Cast from Star Wars universe per Frank's request:
- Wedge (Lead/Architect)
- Leia (Blazor/UI Dev)
- Han (Backend Dev)
- Luke (MAUI Dev)
- Biggs (Tester)
- Scribe + Ralph (existing, retained)

Seeded with NoteBookmark project context and app-label backlog.
Focus: Issue #119 (SharedUI RCL extraction) as first issue.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Created NoteBookmark.SharedUI RCL project with FrameworkReference to Microsoft.AspNetCore.App
- Moved PostNoteClient from NoteBookmark.BlazorApp to NoteBookmark.SharedUI
- Moved Post list (Posts.razor), Post detail (PostEditor.razor, PostEditorLight.razor)
- Moved Note dialog (NoteDialog.razor), Search form (Search.razor)
- Moved Settings form (Settings.razor), Summary list (Summaries.razor)
- Moved SummaryEditor.razor and SuggestionList.razor (dependencies of moved pages)
- Moved MinimalLayout.razor (required by PostEditorLight)
- BlazorApp now references SharedUI; Routes.razor uses AdditionalAssemblies
- Program.cs registers SharedUI assembly for Razor component discovery
- BlazorApp.Tests updated to reference SharedUI types after extraction
- No behaviour changes — structural refactor only

Closes #119

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add orchestration log for Leia's run (2026-04-03T15-07)
- Add session log for Issue #119 (extraction complete)
- Merge leia-sharedui-structure.md from decisions/inbox to decisions.md
- Update agent histories: Leia (run complete), Wedge (MAUI context), Biggs (testing focus)

[session log: .squad/log/2026-04-03-issue-119.md]
[orchestration log: .squad/orchestration-log/2026-04-03T15-07-leia.md]

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#119)

- Fixed bUnit 2.x API (BunitContext, Render<T>, AddAuthorization/BunitAuthorizationContext)
- Fixed namespaces after extraction: SuggestionList/NoteDialog/MinimalLayout now
  in NoteBookmark.SharedUI, NavMenu/MainLayout/LoginDisplay remain in BlazorApp
- Fixed PostNoteClient namespace (moved to NoteBookmark.SharedUI by Leia)
- Fixed FluentUI service registration (AddFluentUI helper with JSInterop.Loose)
- Added StubHttpMessageHandler for PostNoteClient in tests
- NoteDialog 5 tests skipped: FluentDialog cascade not injectable in bUnit 2.x
- Results: 20 passed, 5 skipped, 0 failed
- Updated TESTING-GAPS.md with accurate bUnit version, auth setup notes, gaps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- bUnit 2.x API notes (BunitContext, AddAuthorization pattern)
- NoteDialog gap documented (FluentDialog cascade, fix recommendation)
- PostNoteClient location change noted (moved to SharedUI by Leia)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merged biggs-test-strategy-119.md from inbox into decisions.md (active decisions)
- Deleted inbox file after merge
- Updated biggs/history.md with test results (20 passed, 5 skipped, 0 failed)
- Updated leia/history.md with cross-agent notes on NoteDialog refactoring

Biggs' regression testing confirmed zero behavioral changes from Leia's SharedUI extraction.
Test suite created in NoteBookmark.BlazorApp.Tests using bUnit 2.7.2.

Identified future work: refactor NoteDialog to use EventCallback<NoteDialogResult>
instead of Dialog.CloseAsync() to eliminate cascade dependency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Dialog.CloseAsync

Makes NoteDialog testable with bUnit 2.x by removing FluentDialog cascade dependency.
Replaced FluentDialogHeader/Body/Footer with plain divs so the component renders
standalone without any FluentDialog cascade.

Added [Parameter] EventCallback<NoteDialogResult> OnClose — invoked on save, cancel,
and delete before (optionally) calling Dialog?.CloseAsync()/CancelAsync(), keeping
backward compatibility with ShowDialogAsync callers in Posts.razor.

Added [Parameter] string? Title for standalone/test usage.
Added [Parameter] FluentDialog? Dialog (nullable) for production dialog usage.

Activated 5 previously-skipped bUnit regression tests: 25/25 now passing.
Unblocks Issue #119 acceptance criteria for full test coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ecord

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@fboucher fboucher marked this pull request as ready for review April 3, 2026 15:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Code Coverage

Package Line Rate Branch Rate Health
NoteBookmark.AIServices 97% 64%
NoteBookmark.Api 91% 80%
NoteBookmark.BlazorApp 1% 2%
NoteBookmark.Domain 85% 75%
NoteBookmark.ServiceDefaults 96% 75%
NoteBookmark.SharedUI 7% 8%
Summary 52% (817 / 1561) 42% (191 / 455)

@fboucher fboucher merged commit 1480aa4 into v-next Apr 4, 2026
2 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.

1 participant