pbl_scense_ext/README.md
agent.develop a451b1d413 fix(pbl_scense_ext): 生成产物入库声明与仓库事实一致(QC #9)
wwwroot/pbl_overlay/*.ui 是构建产物,此前未列入 .gitignore 却已被 12 个
.ui 跟踪入库,与 gen_overlay_pages.py docstring「不入库、已在 .gitignore
排除」的自述矛盾。采用方案(a)消除矛盾:
- .gitignore 追加 wwwroot/pbl_overlay/
- git rm --cached wwwroot/pbl_overlay/*.ui(仅解除跟踪,磁盘文件保留,
  由 apps/pbls/build.sh 第9步重跑生成)
- docstring 写明具体排除条目并附 git check-ignore / git ls-files 自检命令
- README 新增「生成产物与入库边界」章节,与仓库事实一致
验证:git check-ignore -v 命中 .gitignore:15;git ls-files wwwroot/pbl_overlay 为空;
python3 scripts/gen_overlay_pages.py --check rc=0。
2026-09-21 12:50:40 +08:00

22 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pbl_scense_ext
PBL 覆盖层前端扩展模块(scense / scense_game 之上的 pbl_scense_ext 覆盖层与页面注册,M9)。
## 生成产物与入库边界
- `wwwroot/pbl_overlay/*.ui`(12 个覆盖层页面壳)是**构建产物,不入库**:仓库根
`.gitignore` 以条目 `wwwroot/pbl_overlay/` 排除该目录,由 `apps/pbls/build.sh`
第 9 步调用 `python3 scripts/gen_overlay_pages.py` 重新生成
(module-development-spec「CRUD-Generated wwwroot Directories Must Not Be Git-Tracked」)。
- 入库的交付物是**生成器与事实源**:`scripts/gen_overlay_pages.py`(生成器)、
`wwwroot/i18n/{zh,en}/msg.txt`(界面文案事实源)、`wwwroot/overlay/*.js|*.css`
(覆盖层实现)、`scripts/load_path.py`(RBAC 路径登记)。
- 一致性自检(两条都必须成立):
```bash
git check-ignore -v wwwroot/pbl_overlay/home.ui # 命中 .gitignore 的 wwwroot/pbl_overlay/
git ls-files wwwroot/pbl_overlay # 空输出(无任何跟踪文件)
```
- 新增/删除页面壳:改 `gen_overlay_pages.py` 的 `PAGES` 注册表 + `wwwroot/overlay/pbl_overlay_core.js`
的 `PAGES` + `scripts/load_path.py` 的 `OVERLAY_PAGES` 三处同源,再跑
`python3 scripts/gen_overlay_pages.py --check`(rc=0 才算通过)。