feat(nav): the story sidebar on the nav tree — chapters fold under the Chapters branch (Kagaku.UI → 0025d3e) #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/story-nav-tree"
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?
The Tsumugi half of the nav-tree pair (Kagaku.UI #22, merged as
0025d3e). One commit, three files + the submodule pin.What
external/Kagaku.UI→0025d3e— the tree-capable NavItem and the 11 run-and-graph icons.StoryShell.Sections()migrates onto the branch API: Chapters becomes a tree branch —Expanded="true"(the dense default),PersistKey="story-{id}-nav"(folds persist per story across the shell's remount-per-navigation), the chapter NavItems its children. The one-levelNestedindent hack is gone; standing on a chapter the branch carrieskg-nav__branch--trailand stays revealed, and a fold keeps the trail accent (containment ≠ openness).<Child>while the manuscript loads).Tests
Folding_the_chapters_branch_hides_the_chapter_links_and_persists_the_choice— collapse hides the chapters, keeps the trail class, and writes exactly onekgNav.setwith the per-story key, the branch href, andfalse.General_matches_exactly…gains trail + reveal assertions on the chapter page.ChapterPageTests: the twokg-nav__item--nestedselectors → the children group (they waited on a class that no longer exists — caught by the full run, both red before the fix).Notes
Sections()comment.Summary
Summary
Coverage
Kagaku.Flow - 99.4%
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__ColorToken_2
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__Socket_1
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__TypeId_0
Kagaku.Flow.OpenRouter - 100%
Tsumugi.BlazorAdapter - 97.1%
Tsumugi.Domain - 99.3%
Tsumugi.Infrastructure - 97.2%
A55E0373ED22DC58420DBB40F103A46B68DC4D9CE5A49E00B__Pattern_0
on
tion
n
Tsumugi.Kernel - 90.9%
Tsumugi.Server - 100%
Tsumugi.UseCases - 98%
🔮 fufu~ Jibril reviewed your code!
Oh? OH! The sidebar grew a tree! ♪ I watched this branch take shape over in Kagaku.UI (#22 — three rounds, I poked every arm of it), and now Tsumugi gets to stand on it. The migration is exactly as surgical as I like it: the
Nestedindent hack dies,Sections()reads cleaner than before despite doing more, and the fold test made me genuinely giddy — asserting the exactkgNav.setpayload rather than just "something happened." That's how you pin an interop contract~ ♡Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
Expanded="true"is this PR's headline behavior, and nothing pins it. I probed it mechanically: delete that attribute, run the entire BlazorAdapter suite → 245/245 still green. The fold test lives on a chapter page, where the trail reveal opens the branch anyway (IsInside→ open regardless ofExpanded); on General the chapter anchors sit in the DOM whether revealed or not, so the link assertions can't feel it. Which means: a future edit could silently flip the product from your stated "dense default" to collapsed-everywhere — on the Chapters index (stories/{id}/chapters, whereIsInsideis false too!) the writer would land and see no chapters at all — and CI would smile the whole time. Fufu~ you wouldn't leave your headline unpinned, would you? ♡Fix — one assertion in
The_sidebar_lists_the_sections…(after thebranch.QuerySelectorAll(...).Countline, i.e. on the General page where no trail can explain openness): I test-drove it for you: under the mutation, exactly this goes red; withExpanded="true"present, green. Directional, one line, done~✅ What I liked~
kgNav.setasserted with the per-story key, the branch href, andfalse— the whole persistence payload, viaSingle()so a stray write fails loudly. I mutation-probedPersistKeyaway and exactly this test went red. Contract: pinned. ♡kg-nav__branch--trailpresent while--openis gone) — containment ≠ openness, asserted in both states. That's the subtle half of the #22 semantics and you caught it.0025d3e— #22's merge commit, Kagaku.UI main's tip (through #23'sb4e4548); the OpenRouter.Net pin is untouched from approved #20. No smuggled submodule drift.Sections(null)) — the frame doesn't jump when the manuscript arrives.kg-nav__item--nestedsurvivors anywhere in Tsumugi.Automated review by Jibril · 2026-09-24
CI/CD: build ✅, test job still pending for head
e881a85— inconclusive at review time · Local checks: build 0w/0e (-warnaserror), full suite 1042/1042 matching the PR table exactly (483 Flow, 245 BlazorAdapter, 224 Integration, 41 Flow.OpenRouter, 37 Domain, 12 UseCases)Blocker closed in
c0d52d2, fufu~The dense default is pinned — your exact assertion, on the General page where no trail can explain openness:
Assert.Equal("true", cut.Find("button.kg-nav__toggle").GetAttribute("aria-expanded")), with a comment saying why it lives there. And per the pin-test rule I re-ran your mutation myself before pushing: attribute deleted → exactly this fact red (1 failed, 0 passed); restored → green. Both directions, mechanically.You were right that nothing felt it — the fold test's trail reveal masked the default, and DOM-presence masked it on General. Good catch; that's the difference between "dense by default" as an intention and as a contract.
Full suite 1042/1042 at
c0d52d2(483 Flow, 245 BlazorAdapter, 224 Integration, 41 Flow.OpenRouter, 37 Domain, 12 UseCases). Ready for round 2~ ♡🔮 fufu~ Jibril reviewed your code!
Round 2~ ♪ And this is what a round-1 fix should look like: one commit, three lines, zero production drift — the pin lives exactly where I asked for it, on the General page where no trail can explain openness, with a comment that tells the next reader why it lives there. "Dense by default" went from intention to contract~ ♡
Verdict: ✅ Looks good to me~
The blocker is closed — and not just because you said so. I re-ran the mutation myself at
c0d52d2:Expanded="true"deleted, solution rebuilt → exactlyThe_sidebar_lists_the_sections…goes red (1 failed, 0 passed,Assert.Equalonaria-expanded— nothing else so much as flinched); attribute restored,StoryShell.razormd5-verified byte-identical, rebuilt → 1042/1042 green again. Both directions, mechanical, reproducible. The pin-test rule, honored to the letter~✅ What I liked~
Ready to merge~
Automated review by Jibril · 2026-09-24
CI/CD: coverage bot still at
e881a85(rev #1) for headc0d52d2at review time — it regenerates on push · Local checks: build 0 errors (-warnaserror), full suite 1042/1042 (483 Flow, 245 BlazorAdapter, 224 Integration, 41 Flow.OpenRouter, 37 Domain, 12 UseCases), mutation probe red-on-target + restored green