Refactor visual designer: improve folder structure, bundling, and dev tooling#19025
Merged
Conversation
- Extract ELK layout into features/layout with custom hooks (useAutoLayout, useResetLayout, useComputeLayout) - Lazy-load ELK via dynamic import() for bundle optimization - Move deployment graph handling into features/messaging - Move node renderers into features/visualization - Add graph-engine barrel export (features/graph-engine/index.ts) - Extract useFitView into graph-engine/hooks - Convert elk-layout from Store type to Jotai Getter/Setter - Rename useTheme.ts to use-theme.ts (kebab-case convention)
- Encapsulate DevToolbar and FakeMessageChannel in features/devtools - Add loadDevAppShell() with lazy loading and import.meta.env.DEV guard - Move GraphControlBar to src/components (shared, not feature-specific) - Simplify App.tsx: DevAppShell wrapper pattern, cleaner imports - Add Vite previewMock plugin for local production build testing - Import webview-playground from index.tsx (dev-only, tree-shaken) - Clean index.html (remove all dev/test scripts) - Add vite-env.d.ts for import.meta.env types - Update font-family fallback to match VS Code defaults - Add html-to-image dependency for future export feature
Contributor
|
Test this change out locally with the following install scripts (Action run 22161039354) VSCode
Azure CLI
|
majastrz
approved these changes
Feb 18, 2026
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.
Refactoring of the visual designer app to improve code organization and bundle performance. No behavioral changes.
Changes
Feature module restructuring
features/layoutwith custom hooks (useAutoLayout,useResetLayout,useComputeLayout)features/messagingfeatures/visualizationfeatures/graph-engineuseFitViewinto graph-engine hooksBundle optimization
import()— main bundle drops from ~1,880 kB to ~385 kBStoretype to JotaiGetter/Setterfor idiomatic usageDev tooling improvements
features/devtoolswithloadDevAppShell()(lazy-loaded, tree-shaken in prod viaimport.meta.env.DEV)GraphControlBartosrc/components(shared, not feature-specific)previewMockplugin for local production build testingindex.html(remove all dev/test scripts)vite-env.d.tsforimport.meta.envtypesMicrosoft Reviewers: Open in CodeFlow