Captures the open work items raised across earlier sessions: - S3 consistency fix (return list in commit response — the real workaround behind the 'refresh button' shim) - POST /notebook-version/restore endpoint (deferred in design.md) - Settings schema (schema/plugin.json is currently empty) - jest + pnpm linker incompatibility (blocks jlpm test) - Frontend diff.ts unit tests (blocked on the jest fix) - ui-tests (Playwright + Galata) - CI pytest step - v0.0.1 tag + PyPI release Each item is labeled with trigger conditions (what real user need would justify doing it) so we don't gold-plate features. Co-Authored-By: Claude <noreply@anthropic.com>
3.3 KiB
3.3 KiB
TODO
待办项,按用户需求驱动——别凭空虚构。完成一项后:勾选 + 改 CHANGELOG + 在 commit message 引用本节。
用户视角(配置 / 安装)见 README.md。设计目标见 design.md。工程手册见 DEVELOPER.md。
后端
-
POST /notebook-version/restore端点(design.md 里标"暂缓")- 现状:restore 走纯前端
model.fromJSON()+context.save(),只能恢复当前打开的 notebook - 端点能力:脚本/CLI 调 API 恢复任意路径的 notebook;删了的 notebook 从 S3 拉回
- 必须走
ContentsManager.write(不能直接写文件),要处理权限 / 文件锁 / 并发 - 估计:~50 行 Python + ~30 行测试
- 触发条件:团队有 CI 灾备 / 批量恢复需求
- 现状:restore 走纯前端
-
修复 S3 提交后 list 偶发返回旧 manifest
- 根因:commit 写 manifest 后前端独立发 list;某些 S3 兼容服务(MinIO / Ceph RGW / 阿里云 OSS 等)实现各异,强一致性不保证
- 方案:把 list 塞进 commit 响应(commit 写完立刻在同进程内 list 一定是最新),省掉独立 GET
- 估计:~30 行(改 commit 响应 + 前端
setVersions直写 + 测试) - 临时缓解:侧边栏「刷新」按钮(已加)
前端
-
schema/plugin.jsonsettings schema- 现状:空 schema,插件激活时只
console.logsettings,无任何可配置项 - 候选配置:
confirmRestore/defaultDescription/maxVersionsToShow/commitShortcut/skipDuplicate - 估计:~100 行(schema.json + 前端读 settings + 一个真用上的配置项)
- 触发条件:真有用户想调参再加
- 现状:空 schema,插件激活时只
-
修复 jest 在 pnpm 链接器下跑不起来
- 根因:
.yarnrc.yml用yarnLinker: pnpm,虚拟存储把ts-jest和jest-util隔开 - 当前绕过:
jlpm build(tsc 严格 + rspack)验证前端 - 方案 A:改
.yarnrc.yml切nodeLinker: node-modules(影响整个 monorepo 解析) - 方案 B:完全重写
jest.config.js不依赖@jupyterlab/testing的 baseConfig - 估计:A 1 行;B 半日
- 根因:
-
前端 diff 逻辑单测
src/diff.ts是纯函数,最值得测;目前没有单测跑(受上面 jest 故障牵连)- 估计:跟 jest 修复一起做,~50 行测试
测试 / CI
-
ui-tests(Playwright + Galata)跑通
- 当前:
ui-tests/目录有但 README 里有 yarn.lock 是空的,从未跑过 - 前置:先把 jest 修通,CI 工作流
.github/workflows/build.yml跑通 - 估计:跟 CI 一起做,~2-3 天
- 当前:
-
CI 流水线加后端 pytest
- 当前
.github/workflows/build.yml没看到 pytest 步骤 - 估计:~10 行 yaml
- 当前
发布
-
v0.0.1 tag + 推送到 origin
git tag v0.0.1 git push origin main --tags -
v0.0.1 wheel 发布到 PyPI(如需)
python -m build出 wheel(hatch 自动嵌前端)twine upload dist/*- 触发条件:要让别人
pip install snapshot装上
优先级
按"真实价值"排:
- 修 S3 一致性(用户已报告的 bug 根因)
- v0.0.1 tag(当前未发版)
- jest 修复 + 前端单测(解锁
jlpm test工作流) - CI 加 pytest
- settings schema / restore 端点(按需)
- ui-tests(锦上添花)