归档已完成的业务编辑任务(07-16-legacy-task-runbook-closeout)

这个提交包含在:
2026-07-16 20:49:49 +08:00
父节点 73e78f21b4
当前提交 e7ae23cc4a
共修改 5 个文件,包含 10 行新增和 3 行删除
@@ -0,0 +1,5 @@
{"file": ".trellis/spec/hyb-oa/index.md", "reason": "hyb-oa spec entry and task read order"}
{"file": ".trellis/spec/hyb-oa/project-governance.md", "reason": "Trellis task, solo-developer scope, commit and validation rules"}
{"file": ".trellis/spec/hyb-oa/frontend-react-vite-design.md", "reason": "frontend template, navigation, list/detail/edit and visual design rules"}
{"file": ".trellis/spec/hyb-oa/docs-and-evidence.md", "reason": "evidence and task documentation hygiene"}
{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "export and sensitive ledger action placement constraints"}
@@ -0,0 +1,4 @@
{"file": ".trellis/spec/hyb-oa/index.md", "reason": "hyb-oa spec entry and task read order"}
{"file": ".trellis/spec/hyb-oa/project-governance.md", "reason": "Trellis task, solo-developer scope, commit and validation rules"}
{"file": ".trellis/spec/hyb-oa/frontend-react-vite-design.md", "reason": "frontend template, navigation, list/detail/edit and visual design rules"}
{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "export and sensitive ledger action placement constraints"}
@@ -0,0 +1,14 @@
# Implementation Notes
## Plan
1. Add thin edit-template components that standardize form page coordinates without becoming a JSON form generator.
2. Remove `台账工具` from reimbursement and asset list pages and migrate its contents into explicit actions, advanced filter areas, row actions or page header actions.
3. Update frontend design specs so future pages follow the same template and action-placement rules.
4. Run frontend typecheck/build and focused text checks for the first batch.
## Design Decisions
- The edit template owns layout only: header/action strip, section spacing, validation summary, form grid and sticky bottom action bar.
- Business pages keep their fields, permissions, mutations, state transitions and error handling explicitly in page code.
- The generic `台账工具` name is removed from first-batch user-facing pages; every action should use a concrete verb such as `导出`, `统计`, `批量处理`, `新建`, `导入` or `更多`.
@@ -0,0 +1,101 @@
# 建立业务编辑模板并移除台账工具首批
## Goal
按已确认的 frontend-design 规则建立业务编辑页模板,并先在报销、资产两个高频页面取消 `台账工具` 入口,把原有能力迁移到具体、可理解的动作位置,降低国内小团队日常使用复杂度。
## What I Already Know
- 面向对象是国内小于 10 人的科技初创公司,系统应优先低复杂度、高频动作和成熟后台惯例。
- 当前已有列表模板 `BusinessListTemplate.tsx` 和详情模板 `BusinessDetailTemplate.tsx`。
- 当前还没有统一编辑模板。
- 用户明确不想要 `台账工具` 这个泛化入口。
- 本轮采用成熟 Ant Design / Ant Design Pro 式后台结构:页头主动作、状态/范围切换、筛选、表格、选中后批量条、详情右侧操作区、编辑页分区表单。
## Scope
- 新增 `BusinessEditTemplate` 及配套编辑页布局组件。
- 首批只迁移报销列表和资产列表中的 `台账工具` 入口。
- 更新 frontend 设计规范,固化三类模板和 `台账工具` 禁用规则。
- 补充或调整必要的前端测试断言。
## Requirements
- 列表、详情、编辑模板必须只统一布局和交互槽位,不做 JSON 配置式页面生成器。
- `台账工具` 按钮名不得继续出现在报销、资产首批页面。
- 报销列表:
- `新建报销` 保持页头主按钮。
- 更多创建方式归入 `新建报销` 的下拉或明确命名入口。
- 导出使用明确的 `导出` 入口。
- 全范围/仅自己/审批中台账使用范围或筛选动作,不藏在 `台账工具`。
- 资产列表:
- 常用列表筛选和状态切换保持在列表上方。
- 导出、盘点、导入等能力使用具体动作名或详情/管理入口,不使用 `台账工具`。
- 编辑模板应支持:
- 标题、返回、状态;
- 右上角操作;
- 底部固定操作条;
- 分区表单;
- 校验摘要;
- 未保存提醒接入点。
## Acceptance Criteria
- [x] 新增业务编辑模板组件并可被后续页面复用。
- [x] 报销页不再出现 `台账工具` 文案,原功能仍可通过具体按钮/下拉访问。
- [x] 资产页不再出现 `台账工具` 文案,原功能仍可通过具体按钮/下拉访问或合理迁移。
- [x] 前端规范记录三类模板和 `台账工具` 禁用规则。
- [x] `cd client && npm run typecheck` 通过。
- [x] `cd client && npm run build` 通过。
- [x] 相关 Playwright/静态检查按需通过。
## Out Of Scope
- 不一次性迁移合同、采购、付款、应付账款、票据和项目。
- 不重做业务状态机、审批规则或后端接口。
- 不把所有业务字段改成配置生成。
- 不做公网部署,除非用户后续明确批准。
## Test Plan
- `cd client && npm run typecheck`
- `cd client && npm run build`
- `rg -n "台账工具" client/src/pages/ReimbursementsPage.tsx client/src/pages/AssetRegistryPage.tsx`
- 运行受影响页面相关的聚焦 Playwright 测试,或新增静态/组件断言覆盖入口文案。
## Technical Notes
- 设计裁决:`frontend-design` skill。
- 现有列表模板:`client/src/components/patterns/BusinessListTemplate.tsx`
- 现有详情模板:`client/src/components/patterns/BusinessDetailTemplate.tsx`
- 首批页面:`client/src/pages/ReimbursementsPage.tsx`、`client/src/pages/AssetRegistryPage.tsx`
## Validation Result
- `cd client && npm run typecheck`:通过。
- `cd client && npm run build`:通过。
- `rg -n "台账工具|showLedgerTools|asset-ledger-tools|更多创建方式" client/src/pages/ReimbursementsPage.tsx client/src/pages/AssetRegistryPage.tsx`:无结果。
- `git diff --check`:通过。
- `python3 ./.trellis/scripts/task.py validate 05-31-business-edit-template-remove-ledger-tools-wave1`:通过。
- `node scripts/qa/check-trellis-governance.mjs`:通过。
- `cd client && npx playwright test tests/e2e/system-action-confirmation.spec.ts --workers=1 --reporter=list`:2 passed。
- `cd client && npx playwright test tests/e2e/visual-shell.spec.ts --workers=1 --reporter=list`:5 passed。
## Deployment Result
- 部署提交:`1428cc4`。
- 部署命令:`SYNC_ENV=0 bash deploy/trialrun/deploy.sh`。
- 部署时间:2026-05-31。
- 部署结果:通过,未同步或覆盖远端 `.env`。
- 远端部署自动检查:部署环境契约、远端 `/ready`、external deps smoke、runtime smoke、公网前端资源文案扫描均通过。
- 公网匿名检查:`https://oa.hyinda.com/ready` 返回 `ok=true`,首页 `HTTP 200`。
- 公网 readiness:加载本机 live smoke 凭据后,`check-live-smoke-env --strict` 通过,`run-live-smoke-readiness.sh` 通过;live smoke 3 passed,真实 OCR 样本复核 1 passed,pending OCR 因本地未注入 `DATABASE_URL` 记录为 `SKIP`。
- 公网定向复检:报销页和资产页均不再出现 `台账工具`,截图保存在 `output/playwright/live-post-deploy-ledger-tools/`。
- 结论:用户可以访问公网验证本轮改造效果。
## Lifecycle Closeout (2026-07-16)
- 收口复核确认实现提交 `1428cc4`、部署证据提交 `46fa609` 和全部验收项一致。
- 当前 `BusinessEditTemplate` 仍存在;报销页和资产页对 `台账工具`、`showLedgerTools`、`asset-ledger-tools`、`更多创建方式` 的静态复核为 0 命中。
- `task.py validate` 通过;无需重做功能、部署或公网检查。
- 本任务已满足原目标,可以按正常完成语义归档。
@@ -0,0 +1,31 @@
{
"id": "business-edit-template-remove-ledger-tools-wave1",
"name": "business-edit-template-remove-ledger-tools-wave1",
"title": "建立业务编辑模板并移除台账工具首批",
"description": "Build the first business edit template and remove generic ledger-tools entry points from reimbursement and asset list pages.",
"status": "completed",
"dev_type": null,
"scope": "frontend",
"package": null,
"priority": "P2",
"creator": "shunli",
"assignee": "shunli",
"createdAt": "2026-05-31",
"completedAt": "2026-07-16",
"branch": null,
"base_branch": "main",
"worktree_path": null,
"commit": null,
"pr_url": null,
"subtasks": [],
"children": [],
"parent": null,
"relatedFiles": [
"client/src/components/patterns/BusinessEditTemplate.tsx",
"client/src/pages/ReimbursementsPage.tsx",
"client/src/pages/AssetRegistryPage.tsx",
".trellis/spec/hyb-oa/frontend-react-vite-design.md"
],
"notes": "2026-07-16 收口复核:实现 1428cc4、部署证据 46fa609、全部验收与当前静态入口复核通过;任务原目标已完成,可以正常归档。",
"meta": {}
}