Skip to content

Codex/optimize data relationship graph followup#20

Merged
LienJack merged 5 commits into
devfrom
codex/optimize-data-relationship-graph-followup
Apr 24, 2026
Merged

Codex/optimize data relationship graph followup#20
LienJack merged 5 commits into
devfrom
codex/optimize-data-relationship-graph-followup

Conversation

@LienJack
Copy link
Copy Markdown
Owner

背景

本次将 codex/optimize-data-relationship-graph-followup 合并到 dev,目标是提升 Modeling Workspace 在数据关系图场景下的可用性、稳定性与前后端契约一致性。

本次改动

  • 优化 relationship graph 在建模画布中的交互体验(节点/边编辑、详情展示、上下文抽屉等)。
  • 改进 ELK 布局估算与配置,降低布局抖动与连线错位风险。
  • 增强前端 modeling 页面与相关组件能力,补齐关键 UI 状态与行为。
  • 补充后端 modeling graph 的持久化类型与校验逻辑,增强数据结构约束。
  • 对齐 shared types 与 admin api client 的 modeling 合同。
  • 新增/更新 modeling 相关集成与单元测试,覆盖主要回归路径。
  • 同步更新 AGENTS 与部分规范/solution 参考文档,以及 graphify 产物。

影响范围

  • Backend: modeling workspace / relationship / persistence validator
  • Frontend: settings/modeling 页面与核心画布组件
  • Shared: modeling 类型定义与前后端契约

验证建议

  • pnpm --filter @text2sql/frontend run lint
  • pnpm --filter @text2sql/frontend run test
  • pnpm --filter @text2sql/frontend run build
  • pnpm --filter @text2sql/backend run test
  • pnpm --filter @text2sql/backend run build

风险与回滚

  • 风险主要集中在 modeling 画布交互与布局行为变化。
  • 若出现回归,可按提交粒度回滚至合并前版本,并优先恢复 settings/modelingworkspace-modeling 相关改动。

…ce modeling

- Introduced position property for models and views in the modeling graph, allowing for precise placement within the canvas.
- Implemented validation for node positions to ensure they are finite numbers.
- Updated services and types to accommodate the new position data, enhancing the modeling experience.
- Added integration tests to verify position handling and ensure correct behavior during updates.
- Enhanced frontend components to support displaying and editing node positions.
…mprovements

- Added restrictions on using native HTML UI components, enforcing the use of shadcn components for better consistency.
- Introduced a new section in the documentation for modeling canvas troubleshooting, providing guidance on common issues.
- Updated the modeling workspace page to include new state management for context drawers and editor intents.
- Enhanced the modeling details panel to support new editor intents and improve user experience with tab switching.
- Improved the modeling flow canvas with additional node action handling and UI refinements for better interaction.
- Updated relationship editor to display secondary names for relationships, enhancing clarity in the UI.
- Refactored various components for better maintainability and performance.
- Updated the layout estimation logic in the modeling flow canvas to improve accuracy based on section counts and node types.
- Adjusted default spacing values for layers and edges to optimize layout performance.
- Enhanced ELK layout configuration with additional crossing minimization strategies and edge merging options for better visual clarity.
- Introduced support for "many-to-many" relationships in the modeling flow edge data structure, allowing for more complex relationship definitions.
- Updated the modeling flow canvas to include an "elevateEdgesOnSelect" feature for improved user interaction.
- Enhanced the modeling workspace page to conditionally open context drawers based on node types, improving user experience.
- Updated tests to verify the rendering of new relationship labels and interactions for many-to-many relationships.
@LienJack LienJack merged commit 81e4f04 into dev Apr 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant