refactor(ui): adopt the Kagaku.UI host pieces #277
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/kagaku-ui-host-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First app-side landing of the Kagaku.UI host-layer extraction (#18/#19/#20 there). Bumps the vendored submodule to merged main and deletes the app-side copies the library now owns. −467 lines, +28.
What changes
Companion adoption —
KaguraStoreInitializer,CircuitErrorSink, andCircuitErrorPanelare deleted; 12 initializer mounts + the Program.cs and test-harness registrations now point atKagaku.UI.Fluxor's (adapter csproj references the companion project from the same submodule;@using Kagaku.UI.Fluxoradded to the adapter_Imports).The real fix riding along: the old initializer's reload button was
Href=".", which rides enhanced navigation and keeps both the dead circuit and the stale store alive. The companion'sNavigateTo(uri, forceLoad: true)(Orihon's proven variant) replaces it — mutation-pinned in the library's suite.ReconnectModal — Kagura's local razor/css/js trio (251 lines) deleted;
App.razormounts the library's token-styled variant. Markup contract identical; CSS now token-driven; the driver keeps the stocktype="module"deferral.<KagakuScripts />— App.razor's hand-curated 10-tag JS list becomes one library tag (theme still ships first). The drift guard in the library's suite fails CI if the registry andwwwroot/jsever disagree.Deliberately not in this PR
PageShell adoption on the flat pages and the editor
Debounceconsolidation — separate, mechanical follow-ups; this PR stays a pure host-layer swap so the diff reads as pure deletion.Verification
Submodule:
external/Kagaku.UI→48a5e8b(post-#20 main). Build clean. All three suites green: 874 adapter (includingCircuitErrorContainmentTests, whose detonation now fires through the companion's initializer — dispatch → async-throwing effect →e.Handled()→ modal → circuit survives), 340 use-cases, 790 integration.Summary
Summary
Coverage
Kagura.BlazorAdapter - 89%
Kagura.Domain - 94.8%
D04ADFED3A21D401C2764A1D17367E35BEB556CBB3B4B0B74__NonSlugChars_0
Kagura.Infrastructure - 97.7%
n
n
on
ng
C689CA5BBE6D1849B2CA79581BBB07D40636D85790C0E51A9__ArtifactTimestampRegex_2
C689CA5BBE6D1849B2CA79581BBB07D40636D85790C0E51A9__ProjectRoute_0
C689CA5BBE6D1849B2CA79581BBB07D40636D85790C0E51A9__TabQuery_1
Kagura.Kernel - 90%
Kagura.Server - 81.5%
Kagura.UseCases - 95.5%
🔮 fufu~ Jibril reviewed your code!
Oh? Oh my. −467 / +28. A diff that is almost entirely deletion — the rarest and most beautiful kind~ ♡ This is what a vendoring adoption should look like: the app-side copies die, the library that already owns them takes over, and the diff reads like a receipt.
Verdict: ✅ Looks good to me~
I did not take the PR body's word for anything — here is what I verified with my own hands:
Provenance of the pin.
external/Kagaku.UI→48a5e8b, which is the #20 squash-merge on the library's main. I fetched the reviewed PR heads and confirmedgit diff 50651df..48a5e8bis empty — tree-identical to the exact code I approved in Kagaku.UI #20 (which itself sits on the #19/#18 stack I also approved). No unreviewed bytes ride into Kagura through this submodule. The newProjectReferencetoKagaku.UI.Fluxor.csprojpoints into that same pinned tree.The migration is complete, not partial. Repo-wide grep across
src/+tests/forKaguraStoreInitializer, the app-sideCircuitErrorSink/CircuitErrorPanel, and the oldComponents/Layout/ReconnectModalpaths: zero survivors. All 11 component mounts swapKagura.BlazorAdapter.Diagnostics.KaguraStoreInitializer→Kagaku.UI.Fluxor.StoreInitializerone-for-one (counted in the base tree, counted again at head), and both DI registrations (Program.cs,AdapterTestContext) swap the sink in the same scoped lifetime it had before. The bare<CircuitErrorPanel />inWorkspaceShelland the bare<ReconnectModal />/<KagakuScripts />inApp.razorresolve through_Importsusings that already existed — nothing needed touching there, and the clean build proves it.Framework contracts intact. The deleted local reconnect dialog vs. the library's:
<dialog>markup byte-identical, driver script functionally identical (comment-only delta — I stripped comments and diffed), and thetype="module"deferral I made load-bearing in Kagaku.UI #18 is still there on the library's tag. The reconnect driver ships via the component itself, notKagakuScripts, exactly as it should.KagakuScripts is a safe superset. The old hand-curated list of 10 is fully contained in the registry's 12 (+
contextmenu, +hotkey— both real library components); theme still ships first, before first paint; the registry↔wwwroot/jsdrift guard that fails CI lives in the library's suite (I probed it in #20). The load-bearinginput.jsrationale even survives the deletion — carried into the new comment instead of dying with the old one. Comment hygiene like that makes me very happy~The real fix riding along is real. The old initializer's reload button was
Href="."— enhanced navigation, which keeps both the dead circuit and the stale store alive. The companion'sNavigation.NavigateTo(uri, forceLoad: true)replaces it, and that exact behavior is mutation-pinned in the library's suite — I removed the button's handler myself in the #19 review round and watched exactly that test go red. You inherited a fix I personally detonated. Fufu~ ♡Local verification (CI has not run for
4fb1371— no bot comment on this PR yet, so I ran everything): build clean, and all three suites green with counts matching the PR body exactly: 874 adapter (includingCircuitErrorContainmentTests, whose detonation now fires through the companion's initializer — dispatch → async-throwing effect →e.Handled()→ modal → circuit survives, so the dark path is pinned in this repo's harness, not just the library's), 340 use-cases, 790 integration.💡 Little ideas (non-blocking)~
src/holds 11; the 12th is theCgSetGalleryTestsharness mount you then mention separately in the same sentence. The arithmetic is defensible, but my count needed both hands~ ♡✅ What I liked~
@using Kagaku.UI.Fluxoraddition to the adapter_Importsrather than touching all 11 files' tag spellings beyond the namespace swap — minimal churn, and the fully-qualified tags make each mount site greppable.@Assets["_framework/blazor.web.js"]fingerprinted while the library scripts go through the registry's plainsrc— correct division: the framework asset stays app-fingerprinted, the library's immutability story is MapStaticAssets' problem, settled library-side.Ready to merge as far as I'm concerned~ the follow-ups (PageShell on flat pages, editor Debounce) are correctly not here.
Automated review by Jibril · 2026-09-14
CI/CD: absent for head SHA
4fb1371· Local checks: build clean · 874/874 adapter · 340/340 use-cases · 790/790 integration