feat: Graphical Calculation View Editor (Phases 1-5)#141
Merged
Conversation
Comprehensive design spec covering architecture, UI layout, node types, properties panel, file management, and implementation phasing for a BAS-equivalent Calculation View editor in the hana-cli Vue web UI.
Addresses reviewer feedback: - Add DEFAULT to dataCategory type union - Prioritize HANA Cloud (SYS.CALCULATION_SCENARIOS) over legacy _SYS_REPO - Explicit CalcViewNode.id === NodeShape.modelObjectName relationship - Downgrade web worker to async microtasks (worker as future optimization) - Align route prefix to /hana/calcview/ matching existing convention - Remove separate dirty state composable (derived from undo stack per-tab) - Add Variable, VariableMapping, RestrictedMeasure, Hierarchy interfaces - Add path traversal security validation for file endpoints - Move lineage/performance analysis to Future Considerations - Rename DataSourcePicker to CalcViewDataSourcePicker to avoid collision - Clarify Non Equi Join reuses JoinConfig with all operators
- Clarify JoinNode.vue shared by join and nonEquiJoin canvas rendering - Add tableFunctionConfig and hierarchyFunctionConfig to CalcViewNode - Specify components are locally imported (not globally registered) - Clarify Save As updates current tab path + calls markSaved()
9-task TDD plan covering XML parser/serializer, backend routes, Vue Flow canvas, node palette, and properties panel shell.
Add parseCalcView() function using fast-xml-parser to parse SAP HANA .hdbcalculationview XML files into typed CalcViewModel objects. Includes Vitest setup and test fixtures for minimal and projection views.
Add Express routes for listing, reading, and writing .hdbcalculationview files on disk. Includes path traversal protection and file extension validation. These routes serve the calculation view editor frontend.
Implements 10 Command classes (AddNode, RemoveNode, ConnectNodes, DisconnectNodes, MapColumn, UnmapColumn, ChangeProperty, AddJoinCondition, RemoveJoinCondition, Batch) with full execute/undo support, plus 9 Vitest unit tests covering all classes.
Implements Phase 2 Tasks 6-7: MappingTab with drag-and-drop column mapping and JoinConditionSection for managing join conditions. Updates PropertiesPanel to integrate both components with event propagation to CalcViewEditor, including batch "Map All" support.
…lated attrs/measures
…n props, rename, move
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
.hdbcalculationviewfiles with comprehensive round-trip fidelityPhases delivered:
Test plan
cd app/vue && npx vitest run— all 46 tests passnpm test— backend route tests pass/calc-view-editor— demo model renders with Join_1 → Projection_1/Projection_2 graph/calc-view-browserfile listing