fix(knowledge-graph): 修复 Cytoscape / Force Graph 右栏展开后布局溢出 - #537
Merged
ThreeFish-AI merged 1 commit intoMay 13, 2026
Merged
Conversation
Cytoscape 和 Force Graph 的容器 div 使用 h-full w-full 定位, 内部 Canvas 被引擎库赋予显式像素 CSS 宽高,导致右栏折叠后再展开时 Canvas 固有尺寸阻止 flex 容器收缩,右栏被挤出视窗外。 将容器改为 position: absolute; inset: 0,对齐 3D 引擎的已验证策略, 使 Canvas 完全脱离文档流,不再参与祖先 flex 布局计算。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
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
h-full w-full,内部 Canvas 被引擎库赋予显式像素 CSS 宽高flex-[2.2]容器收缩,导致右栏被挤出视窗外position: absolute; inset: 0,对齐 3D 引擎的已验证策略,使 Canvas 脱离文档流变更文件
GraphCanvas.tsx(Cytoscape):容器 div 从h-full w-full→absolute inset: 0ForceGraphCanvas.tsx:同上Test plan
🤖 Generated with Claude Code, CodeX, Gemini