[#516] Extract RPA domain into framework-independent packages#525
Merged
Conversation
- Create @rpaforge/domain-model with RpaNode, RpaEdge types - Create @rpaforge/codegen with Python/Mermaid code generation - Replace 5 type-only Node/Edge imports with RpaNode/RpaEdge - Add RpaNodeAdapter for canvas-React Flow conversion - Configure npm workspaces and TypeScript project references - Both packages compile successfully Implements Phase 1-4 of #516 domain extraction strategy. Related: #513
This was referenced Jun 7, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Jun 7, 2026
- Add @rpaforge/domain-model and @rpaforge/codegen to studio dependencies - Restore Edge and Node imports from @reactflow/core where still needed - Ensure npm can resolve new packages in CI environment Fixes Type check failures in Test Studio UI job.
Use TypeScript project references instead of npm dependencies. Workspace packages are resolved via tsconfig references.
TypeScript references don't resolve module aliases during type-check. Use local type definitions in studio instead of @rpaforge/* imports. This is a MVP approach for immediate CI fix.
- Restore vite-env.d.ts (accidentally deleted in domain extraction commit): fixes __APP_VERSION__, CSS side-effect imports, ImportMeta.glob/env - Fix MermaidPreview.tsx import path (../types → ../../types/domain-model) and revert nodes/edges props to Node[]/Edge[] from @reactflow/core to match the Layout.tsx caller and avoid RpaNode.data:unknown access errors - Add NodeData local type in mermaidGenerator.ts and type RpaNode<NodeData> function params to resolve data.blockData / data.label unknown-property errors - Remove unused Edge import from fileUtils.ts and mermaidGenerator.ts - Remove unused RpaNode/RpaEdge import from templateLoader.ts - Add type?: string to studio RpaNode shim (matches React Flow Node) - Cast diagram.nodes as ProcessNode[] in useFileOperations.ts to resolve RpaNode.position? vs Node.position (required) structural mismatch
Replace React Flow edge properties (sourceHandle, targetHandle, type, data, style) with RpaEdge fields (handle) in the round-trip test, matching the domain type contract.
- Add vite as workspace root devDependency so vite-plugin-electron can resolve it from the pnpm virtual store (fixes ERR_MODULE_NOT_FOUND) - Add electron-winstaller to onlyBuiltDependencies in pnpm-workspace.yaml - Add public-hoist-pattern for vite in .npmrc as additional safety net
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.
Summary
Implementing Phase 1-4 of issue #516: Extract RPA domain into framework-independent npm packages to decouple from React Flow and enable safer XYFlow12 migration (Strategy E1 from #513).
Changes
New Packages Created
@rpaforge/domain-model — Framework-agnostic types (~50 LOC)
@rpaforge/codegen — Code generation (~550 LOC)
Type Updates in Studio
Replaced 5 type-only imports of Node/Edge with RpaNode/RpaEdge:
Canvas Adapter
Created src/canvas/RpaNodeAdapter.ts with bidirectional conversion between domain and React Flow types.
Configuration
Verification
✅ npm install — workspaces resolved
✅ tsc --noEmit — studio type-checks
✅ domain-model package builds
✅ codegen package builds
Related
Closes #516
Related: #513