fix(patient/storage): 关系网图方向+重设计 & 存储节点管理台去无效角色列 #199

Open
redxin wants to merge 5 commits from fix/relations-graph-and-storage-column into main
Owner

本会话集群验收中发现并修复的两类问题(已在 9 机集群在线复测 PASS)。不含开发态 dev-login 旁路(那条 commit 单独留在 feat/dev-login-bypass,绝不可入生产)。

修复

  1. 关系网图边标签方向relations.go):图边标签改为按「中心(被查询本人)视角」渲染——center==to 用原始 relation_type,否则取反演角色。修复此前在「子→父」一侧把「父亲」误显「子女」(图与可联系人/关系清单三处方向不一致)。
  2. 存储节点管理台去无效「角色」列StorageNodesPage.tsx,cherry-pick 2536a94a):后端从不返回 role,前端三元恒掉「冷备」;存储节点本是池内对等成员,无主/冷备概念。顺带把错位的「URL」表头改为「节点编码」。
  3. 关系网图重设计RelationsTab.tsx):弃力导向弹簧模拟(节点少时稀疏+持续抖动「僵硬」),改确定性径向布局(本人钉中心/1跳水平扇形/2跳贴父外环)+ 平滑曲线连线 + 圆角关系标签胶囊 + 渐变节点(按亲属类别配色)+ 柔和投影 + 入场淡入。

验证

  • 关系方向:测试患者侧图边现显「父亲」,与可联系人/关系清单一致;张小明侧仍「子女」无回归。
  • 存储列:管理台节点列表已无「角色/冷备」列。
  • typecheck / go build / go vet 绿。

🤖 Generated with Claude Code

本会话集群验收中发现并修复的两类问题(已在 9 机集群在线复测 PASS)。**不含开发态 dev-login 旁路**(那条 commit 单独留在 feat/dev-login-bypass,绝不可入生产)。 ## 修复 1. **关系网图边标签方向**(`relations.go`):图边标签改为按「中心(被查询本人)视角」渲染——`center==to` 用原始 relation_type,否则取反演角色。修复此前在「子→父」一侧把「父亲」误显「子女」(图与可联系人/关系清单三处方向不一致)。 2. **存储节点管理台去无效「角色」列**(`StorageNodesPage.tsx`,cherry-pick 2536a94a):后端从不返回 role,前端三元恒掉「冷备」;存储节点本是池内对等成员,无主/冷备概念。顺带把错位的「URL」表头改为「节点编码」。 3. **关系网图重设计**(`RelationsTab.tsx`):弃力导向弹簧模拟(节点少时稀疏+持续抖动「僵硬」),改确定性**径向布局**(本人钉中心/1跳水平扇形/2跳贴父外环)+ 平滑曲线连线 + 圆角关系标签胶囊 + 渐变节点(按亲属类别配色)+ 柔和投影 + 入场淡入。 ## 验证 - 关系方向:测试患者侧图边现显「父亲」,与可联系人/关系清单一致;张小明侧仍「子女」无回归。 - 存储列:管理台节点列表已无「角色/冷备」列。 - typecheck / go build / go vet 绿。 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
后端 ListStorageNodes 从不查 role(storage_nodes 表亦无该列),前端
node.role 永远 undefined → 三元判断全部掉到默认值「冷备」。架构上存储
节点本就是池内对等成员(由 routing_policy+replica_count 决定路由),无
主/热/冷备概念,该列从设计上即误导。

- 移除「角色」列(状态、所属池各有专列)
- 同表错位的「URL」表头改为「节点编码」(单元格本就显示 node_code)
- 空状态/加载行 colSpan 9→8

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(patient): 关系图画布高度收紧(去 1 跳横排下方空白)
Some checks failed
CI / Frontend (Tauri/TS) (pull_request) Has been cancelled
CI / Backend (Go) (pull_request) Has been cancelled
818b3b7739
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Some checks failed
CI / Frontend (Tauri/TS) (pull_request) Has been cancelled
CI / Backend (Go) (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • client/src/renderer/src/pages/admin/StorageNodesPage.tsx
  • client/src/renderer/src/pages/workbench/patients/tabs/RelationsTab.tsx
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/relations-graph-and-storage-column:fix/relations-graph-and-storage-column
git switch fix/relations-graph-and-storage-column

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/relations-graph-and-storage-column
git switch fix/relations-graph-and-storage-column
git rebase main
git switch main
git merge --ff-only fix/relations-graph-and-storage-column
git switch fix/relations-graph-and-storage-column
git rebase main
git switch main
git merge --no-ff fix/relations-graph-and-storage-column
git switch main
git merge --squash fix/relations-graph-and-storage-column
git switch main
git merge --ff-only fix/relations-graph-and-storage-column
git switch main
git merge fix/relations-graph-and-storage-column
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
redxin/DentalFlow!199
No description provided.