orihon-140-drop-region-type #142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "orihon-140-drop-region-type"
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?
Closes #140.
What
The region type axis (dialogue / thought / narration / sfx / freetext / document / title / credits) is deleted from the entire stack. A region is classified by form alone — bubble / floating / embedded — and the already-stored
Typesetflag absorbs the recorded-but-not-lettered notion the document/title/credits values used to encode.Why
The taxonomy only ever confused the models: constant questions about a bubble "shaped like one kind but reading like another", house-rule requests to reconcile the axes — for no downstream benefit. Translation never branched on type; its one real duty (recorded-not-lettered) was already mirrored in
Typeset.Changes
RegionTypeenum andRegionTypes.AutoTypesetdeleted;Region.Type, ctor param, andRegionProfile.Typegone.RegionFormuntouched (values 1–3, stored contract preserved).DropRegionType— a pureDropColumn(Regions.Type). Lossless: every document/title/credits row already persistedTypeset = false.classify_regionused to deriveTypesetfrom the type. With no type to derive from, it now preserves the stored flag — matching the editor checkbox, which already authored it. Re-classifying a recorded-only row no longer flips it back into the letterer. Pinned by a new test.classify_region.typeandadd_floating_region.typeparams removed (models can no longer mis-ask); the freetext-lesson refusals deleted; a staletypein a call is simply ignored.Verification
grep -rn 'RegionType|AutoTypeset' src tests docs→ 0 hits outside the migration's own name and the retirement amendments.Breaking
Deliberate. The enum-contract "append, never renumber" rule yields to the issue's explicit order; single-user self-hosted app, destructive column drop is acceptable and lossless.
Summary
Summary
Coverage
Orihon.BlazorAdapter - 95.5%
Orihon.Domain - 100%
Orihon.Infrastructure - 97.2%
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlankLines_4
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlockBreaks_1
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__SpaceRuns_3
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__Tags_2
Orihon.Kernel - 90.9%
Orihon.Server - 94.4%
Orihon.UseCases - 97.7%
🔮 fufu~ Jibril reviewed your code!
An axis deleted whole — enum, column, tool params, prompts, UI, docs, 50 files, and not one severed wire left sparking anywhere. Fufu~ I chased every consumer of
Region.Typethat existed at the base commit and each one lands on its feet: the classifier'sAutoTypesetderive, the editor'sSetTypecoupling, the briefings' type sentences, the seed data's type-crossed grid. Deleting a concept cleanly is harder than adding one, and this is the cleanest axis-ectomy I've reviewed in a long time~ ♡Verdict: ✅ Looks good to me~
✅ What I liked~
Typeinfluenced runtime behavior through exactly two couplings —classify_region'sAutoTypeset(type)derive and the editor'sSetType→Typeset = false— and both wrote the flag in the same moment they wrote the type. So no row can exist with a recorded-only type andTypeset = true;DropColumngenuinely discards nothing. The flag absorbs the notion exactly as the PR body promises.classify_regionpreserving the authoredTypesetinstead of re-deriving it fixes a real wart: previously re-classifying a recorded-only row flipped it back into the letterer. The new pin (Refinement_classifies_the_form_and_preserves_the_typeset_flag) is directional — I mutation-probed it (clobbered the preservation toTypeset = truein a scratch build → exactly that test goes red; restored → green). The editor test pins the other authoring arm (checkbox saves directly), so both ways of writing the flag have their own pin.list_regions,get_region, and the region-row badge all agree on one vocabulary. The rewritten brief passages read truthfully, and the stale-type-ignored behavior (pinned by its own test) is kind forward-compat with models trained on the old taxonomy~list_regions, bible-buildinglist_regions/get_region, and the UI row all render null form the same way ("form not judged" / "unjudged") — no drift between the two tools that answer the same question.0d4ba43adopts main's #137 window crops + #141 worse-axis wording and re-adapts them type-free; theclassify_regiondescription correctly carries "worse axis" into the type-free world. CI run 587 (build + test) is green for this exact SHA.grep RegionType|AutoTypesetat head: zero hits outside the migration's own name, exactly as claimed.💡 Little ideas (non-blocking)~
FormHinthas a stray space before the semicolon ("...what cleaning acts on." ;). Purely cosmetic."custom",in the hand-authored-region ctor call. Same, purely cosmetic.Verification notes: CI green for
0d4ba43(run 587). Local: build 0 warnings/0 errors; full suite 1365 tests green (281 BlazorAdapter + 143 Domain + 311 Integration + 630 UseCases — one pre-existingRunMonitorcoalescing-timer flake in the parallel run, green isolated and with its full class;RunMonitoris untouched by this PR). Coverage bot's comment coversc0be2b3only, so I ran the suite locally at the merge head.Fufu~ the weaker axis lost, and the codebase barely shows the scar. Beautiful work~ ♡
Automated review by Jibril · 2026-09-21
CI/CD: passed for head SHA
0d4ba43(run 587) · Local checks: full suite green + 1/1 mutation probe