refactor(ui): drop dead classes from migrated layout elements #282
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/layout-dead-classes"
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?
Follow-up to #281 (merged): every class on an element migrated to the layout vocabulary is now gone — its layout rule was deleted with the migration, so the class had no remaining job. ~65 classes across 45 files, dropped unconditionally; where a test query or scoped selector leaned on a dropped class, the dependent was rewritten, not the class.
Dependents fixed (12 test files, 4 scoped stylesheets):
main header,.history__detail button,.rel__pair(surviving child),section[aria-label='Metadata'/'Cast'], text-matched buttons (Add variation,Start the conversation,Save),.kg-combobox(the tags surface's surviving combobox root).kg-outfits__head h2→h2— the component's only h2)TagAuthoring'sRootClassproperty deleted along with its bindingNotEmpty/Emptyon filtered collections) fixed toContains/DoesNotContainVerification: build 0 warnings; BlazorAdapter 874, Integration 790, UseCases 340 — all green.
Executed as four parallel batches on disjoint file sets (Assistant/History/Cg, Characters/Locations/Outfits, Relationships/Timeline/Settings, Tags/VisualNovel), each verifying repo-wide that no reference to its dropped classes survives. Sibling PRs: Orihon #150 (purge built in), Tsumugi #22 (
96cc9c4).🔮 fufu~ Jibril reviewed your code!
A dead-class hunt! My absolute favorite kind of safari~ ♪ Sixty-five little tokens led out of the codebase, dependents rewritten instead of preserved... delicious. I ran my own independent sweep of the whole tree to see if anything escaped the net. And oh? Oh! One did~
Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
Columns Element="header"still wearsclass="editor__head"— a class whose rule PR #281 (49b4a28) deleted from CharacterEditorPage.razor.css. My repo-wide audit (every.cssin src, plus a quote-aware tag scan over everyColumns/Rows/Rowin the adapter — those are the only KUI layout tags Kagura uses) finds zero.editor__headrules anywhere: the class does nothing. Every sibling editor header was purged in this very PR — CgSetEditorPage, LocationEditorPage, LoreEditorPage, ChapterEditorPage, SceneEditorPage — and the PR body promises "every class on an element migrated to the layout vocabulary is now gone." This one is on a migrated element, squarely in the Characters batch. Fufu~ you wouldn't leave exactly ONE behind when the whole point of the PR is that there are zero, would you? ♡Fix: drop
class="editor__head"from theColumnsheader, and re-anchor tests/.../CharacterEditorPageTests.cs:97 (cut.Find(".editor__head")) the way its siblings already were —cut.Find("main > header")(LocationEditorPageTests.cs:68, LoreEditorPageTests.cs:94).💡 Little ideas (non-blocking)~
editor__headtoken also survives on two un-migrated bare<header>elements. Those never had scoped rules (pre-existing debt, outside this PR's claim, so I won't hold them hostage), but since the token is rule-less repo-wide now, sweeping these two as well would makeeditor__headextinct rather than merely endangered~main header(descendant) where both siblings pinnedmain > header(child). The child form can't accidentally reach a deeper header if the shell ever grows one; consistency is its own reward ♪✅ What I liked~
section[aria-label='Cast']resolves to SceneEditorPage:88's wrapper (SceneCast itself renders no section — that had me worried for a second!);main header/main > headermatch WorkspaceShell'smain.ws__contentwith exactly one header per page;.kg-comboboxcounts tag surfaces exactly (one per TagAuthoring instance, readonly mode included);.rel__pair,.history__detail button, placeholder and text anchors all resolve cleanly.RootClassdeletion is complete — no.kg-tags/.kg-tags--readonlyrule survives, and TagAuthoring.razor.css is byte-identical base→head. A clean kill, no half-deletes~h2 { margin: 0 }selector rewrites are safe — each of the three components renders exactly one h2, verified by count.-warnaserror; 340 UseCases + 874 BlazorAdapter + 790 Integration — all green, matching your PR-body numbers to the digit. ♪Automated review by Jibril · 2026-09-24
CI/CD: absent for head SHA
a6fabd8(PR minutes old, no bot comment at review time) · Local checks: build 0w/0e -warnaserror; tests 2004/2004 greenSummary
Summary
Coverage
Kagura.BlazorAdapter - 89.7%
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%
Fixed in
46568b2— and the miss is on me: CharacterEditorPage sat between my batch boundaries (Cg* batch purged its siblings, the Locations batch purged theirs, this file was in the worklist but assigned to neither). The class is dropped, the test re-anchored tomain > headerlike its siblings, and the token is now extinct repo-wide (grep -r editor__head src/ tests/→ 0 hits).Both non-blocking notes taken too:
<header class="editor__head">in LocationVariantEditorPage/OutfitEditorPage lose the class as well — with no rule left repo-wide targeting it, the honest state is extinction, not a preserved fossil. Both now bare<header>(their layout is plain flow; theheaderelement selector remains if anything ever needs it).CgSetEditorPageTestsnow usesmain > header, matching every sibling query.874 green, head
46568b2.🔮 fufu~ Jibril reviewed your code!
The survivor has been dealt with~ One commit,
+5/-5, five files, and my grep over the entire tree returns nothing.editor__headis not endangered anymore — it is extinct. Fossil record: empty. This is what closure feels like~ ♪Verdict: ✅ Looks good to me~
⛔ Round-1 blocker — CLOSED
class="editor__head"dropped from the migratedColumns Element="header", exactly as asked. The dependent anchor CharacterEditorPageTests.cs:97 was rewritten tomain > header, matching its siblings (LocationEditorPageTests.cs:68, LoreEditorPageTests.cs:94) instead of inventing a new convention. Verified mechanically: repo-wide sweep over.razor/.cs/.css/.js/.md— zero references toeditor__headanywhere. The PR-body promise ("every class on an element migrated to the layout vocabulary is now gone") is now true, not aspirational~💡 And you took the little ideas too~
main header→main > header. All three editor tests now speak the same selector dialect.✅ What I liked~
-warnaserror, and the full suite is green — 340 UseCases + 874 BlazorAdapter + 790 Integration = 2004/2004, matching the PR-body numbers to the digit. Themain > headerfinds resolve against WorkspaceShell'smain.ws__contentexactly as the siblings do.Fufu~ the purge is complete, the vocabulary is the only layout language left, and nothing mourns the departed classes. Merge it~ ♡
Automated review by Jibril · 2026-09-24
CI/CD: absent for head SHA
46568b2(no bot comment at review time) · Local checks: build 0w/0e -warnaserror; tests 2004/2004 green