Repository navigation
feat(libraries): official catalog and shared package/module dependency graphs - #19
Merged
Merged
Conversation
…from catalog cache
…oject dependency graph
Sunrisepeak
marked this pull request as ready for review
October 18, 2026 19:31
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.
Libraries 默认来源限定为官方 mcpp-index,修复混入 xim 索引的问题,并分离索引缓存与项目状态。详情页集中版本和添加操作,项目选择位于右上角,使用方式、C++ 标准和许可证显示为彩色标签。依赖类型采用二级菜单;CLI 不支持的构建依赖和分组迁移提供准确 TOML 预览。
用法页读取真实官方测试快照或 checkout 测试,示例按钮与标题同行,源码统一只读打开;搜索只保留一个清除按钮。修复项目切换、锁文件变化和异步操作导致的过期展示。
项目侧栏按 Basics → Dependencies → Common commands 排列。Dependencies 默认折叠,只展示直接依赖的包坐标和 index/path/git 来源,点击可定位图节点。C++ Modules Deps 位于 Basics 内。
包依赖和 C++ Modules 共用离线 Mermaid 画布,支持滚轮锚点缩放、拖动、Fit、节点高亮、搜索聚焦、分支展开/收起及 3 / 5 / 全部深度选择。每次布局前投影可见子图,最多 150 节点、300 边;视图切换保留独立状态。包关系来自清单/描述符,lock 只补版本。
模块图直接消费依赖扩展所带 mcppls 的 JSON,不重新解析 C++。保留项目内部完整深度和一层直接外部模块(包括 path 包),显示 main/lib 入口与 import 关系;点击模块在旁边编辑器打开只读源码。当前上游全图最多返回 500 个模块,截断/索引中状态显式提示;缺失声明行号和重导出属性不会被猜测。
验证:
npm test:709 项通过。设计方案(模块图见 §14) · 本地验收与截图
保留分阶段 checkpoint commits,PR 维持 draft 供 review。
全屏详情改为随编辑器宽度铺开,两侧边距 16–40px,辅助信息栏 240–320px,其余空间归示例代码。针对性验证 480–2560px × 深色/浅色/高对比,共 15 个布局组合通过;设计与验收文档附有宽屏截图。另修正 Windows 入口文件测试对路径分隔符的假设。