Repository navigation
Workbench Schema Inspector (Phases 1 + 2) + engine EntityMap persistence fix + tooling - #260
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #255, closes #256. Resolves #258 (partially — #257 deferred on Data Browser module 06).
Schema Inspector module — Phase 1 (#255)
SchemaServicewithListComponents/GetComponentSchema; DTO records;SchemaControllerwith[RequireBootstrapToken][RequireSession]+Invoke<T>error mapping.SchemaBrowserPanel(shadcn Table, fuse.js fuzzy search, 4 quick-filter chips),SchemaLayoutPanel(canvas renderer for the byte grid),useSchemaInspectorStorezustand slice.DatabaseEngine.GetAllComponentTablespromoted to public.SchemaControllerTests,SchemaServiceTests,SchemaLayoutRenderer.test.ts,schema-inspector.spec.ts.Schema Inspector module — Phase 2 (#256)
SchemaArchetypePanel,SchemaIndexPanel,SchemaRelationshipsPanel(withSchemaRelationshipsGraphusing@xyflow/react+dagre).GetArchetypesForComponent,GetIndexesForComponent,GetSystemRelationships(runtime-gated envelope).DatabaseEngine.GetArchetypeEntityCount/GetArchetypeClusterChunkCount,ArchetypeMetadata.GetComponentTypes/UsesClusterStorage.Engine: EntityMap persistence fix
Regression:
_entryCountinRawValuePagedHashMapwas only flushed to disk on bucket splits — small archetypes that never split showed 0 entities after reopen. Fixed via newPagedHashMapBase.FlushMeta(cs)called fromPersistArchetypeStateon engine dispose. Regression testPersist_ThenReopen_EntityCount_Survives. Crash-path recomputation tracked separately as #259.Engine cleanup
[Ignore]s onPersist_ThenTamper_ComponentCount_Throws+Persist_ThenTamper_Revision_Throws._archetypesTablefield + single assignment.DatabaseEngine.InitializeArchetypes+EngineLifecycle.ALC Type-staleness fix
ArchetypeRegistry.RefreshSlotTypes()— called byEngineLifecycleafterEnsureFinalized. The Workbench spins up a fresh collectible ALC each session;EnsureFinalizedshort-circuits on pre-registered archetype ids, leaving_slotToComponentTypepointing at the first ALC's Type instances.RefreshSlotTypesreplaysComponentTypeByIdinto every archetype's slot array so the Workbench's reflection-equality lookups match the session's engine.Fixture project migration
Typhon.Workbench.Fixturesmoved fromtest/totools/. Generator logic promoted from a[Ignore]d NUnit test intointernal static FixtureDatabase.CreateOrReuse(outputDir, force).InternalsVisibleTo("Typhon.Workbench")added so the Workbench (DEBUG-gated) can call it directly.FixturesController(whole file wrapped in#if DEBUG) + Dev Fixture tab in the Connect dialog + fifth "Dev Fixture" button on the Welcome screen. Capability probe viaGET /api/fixtures/capabilityso the UI hides itself on Release builds.UX polish (Schema Inspector area)
StatusBadgefactored out; applied to storage pills, runtime-not-hosted, indexed/cross-boundary chips--background,--primary,--destructive, …) viaMutationObserveron<html>'s class list — repaints on dark/light togglefitTextbinary-search ellipsis truncation instead offillText's squish-widthrgba(0,0,255,0.15)+::beforepseudo extending ±4px beyond the rowDetailPanelpolymorphic — most-recent-touch wins between schema-field and resource-tree selectionsimplifyTypeNamerenders CLR assembly-qualified names (Name``N[[...]]) asName<Arg>+ keeps full name in tooltipFieldDetailPopover.tsxremovedselect-textopt-in (app default is nowselect-none— more app-feel, less web-feel)titletooltip on resource-tree rows (name + kind)Tooling
/new-panelskill — scaffolds a new Workbench panel (server DTOs/service/controller/tests + client hooks/store/panel/context-menu/tests + wiring + Playwright canary) that compiles on first invocation/wb-devrewritten —start | stop | status | restartwith file-based PID tracking (.claude/state/wb-dev.json). Discovery vianetstatpoll + PowerShellGet-CimInstancecommand-line match; tree-kill viataskkill /F /T./create-issueskill updated with native GitHub Sub-issues API guidance.claude/state/added to.gitignoreDeferred / tracked separately
Test plan
dotnet test test/Typhon.Engine.Tests --filter SchemaVersioning— 11/11dotnet test test/Typhon.Workbench.Tests --filter Schema— 25/25cd tools/Typhon.Workbench/ClientApp && npm test -- --run— 97/97npx playwright test e2e/schema-inspector.spec.ts— 9/9npx tsc --noEmit+npm run lint— clean