完成全项目响应式审核与换机交接
This commit is contained in:
@@ -0,0 +1,252 @@
|
||||
# Project-Wide Audit And Expert Optimization Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use `superpowers:executing-plans` for the audit phase. After that phase is fully verified, use two explicitly assigned expert subagents for the optimization phase. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Finish MuMu-native responsive, visual, interaction, and functional review for every active page from G10 onward, repair every confirmed issue through a five-option decision process, then run a two-expert project enrichment phase and implement the agreed improvements.
|
||||
|
||||
**Architecture:** `styles/adaptive-frame-profiles.scss` remains the only owner of nine-slice frame values, while `tests/responsive-layout-allowlist.json` remains the only owner of justified fixed-size exceptions. Each page is audited from fresh MuMu screenshots, repaired test-first only when evidence proves a defect, and reverified before the next page. After the baseline is complete, two independent experts inspect the whole product from visual/interaction and functional/code perspectives; the primary agent reconciles their proposals into small verified batches.
|
||||
|
||||
**Tech Stack:** uni-app, Vue 3, SCSS, PowerShell contracts, Node.js CDP navigation assistance, HBuilderX Android runtime, MuMu Android, ADB.
|
||||
|
||||
## Global Constraints
|
||||
|
||||
- G01 through G09 are already manually accepted and remain frozen unless a later global change produces a demonstrated regression.
|
||||
- The continuous audit boundary begins at G10 and includes every later active route in `pages.json`.
|
||||
- Do not stop after a single page. Continue through the plan unless genuinely blocked by missing authority, external state, or a business decision that cannot be inferred safely.
|
||||
- For every confirmed defect, generate five viable solutions, compare contract fit, regression risk, affected scope, maintainability, and MuMu evidence, then implement the strongest option without asking the user to choose.
|
||||
- If a trade-off remains genuinely ambiguous or three implementation hypotheses fail, dispatch an independent reviewer to argue the opposing technical position until a testable decision is reached.
|
||||
- Content containers derive height from content. Only viewport-constrained overlays may use `max-height`, with internal scrolling when required.
|
||||
- Do not hide layout failures by reducing font sizes or arbitrarily shrinking controls.
|
||||
- Variable-height decorated surfaces use the shared nine-slice profiles. Pages and components must not define `border-image-slice` directly.
|
||||
- Fixed-proportion icons, avatars, seals, thumbnails, and approved decorations may retain fixed dimensions only through `tests/responsive-layout-allowlist.json`.
|
||||
- Do not use `background-size: 100% 100%` or an equivalent full-image stretch for variable content surfaces.
|
||||
- Do not use a browser as visual acceptance evidence. Browser/CDP automation may only assist navigation or logic checks; accepted visual evidence must come from MuMu screenshots captured in the current run.
|
||||
- Keep MuMu at its current user-selected `900x1600 / 320dpi` configuration unless the user explicitly requests another size.
|
||||
- Do not start or close MuMu.
|
||||
- Ignore the system watermark shown by MuMu screenshots.
|
||||
- Guidance copy must use generic examples such as `某某某堂侄`; existing fixture/mock records are outside that copy cleanup rule.
|
||||
- Do not modify API contracts, state enums, routes, or fixture data merely to solve layout problems.
|
||||
- Do not run `git add`, `git commit`, `git push`, `git restore`, `git checkout`, or other Git mutation commands.
|
||||
- Do not create compatibility fallbacks when a responsive contract changes. Update the owner, runtime, validators, tests, and documentation together.
|
||||
|
||||
## Page Inventory
|
||||
|
||||
The continuous audit covers these routes in order:
|
||||
|
||||
```text
|
||||
pages/genealogy/g10-application-review
|
||||
pages/genealogy/g11-genealogy-settings
|
||||
pages/genealogy/g12-generation-poems
|
||||
pages/tree/t01-tree-overview
|
||||
pages/tree/t03-member-profile
|
||||
pages/tree/t04-add-relative
|
||||
pages/tree/t05-edit-member
|
||||
pages/tree/t06-edit-relationship
|
||||
pages/tree/t07-member-directory
|
||||
pages/tree/t08-member-states
|
||||
pages/family/f01-family-feed
|
||||
pages/family/f02-publish-feed
|
||||
pages/family/f03-feed-detail
|
||||
pages/family/f04-article-list
|
||||
pages/family/f05-article-detail
|
||||
pages/family/f06-article-editor
|
||||
pages/family/f07-album-list
|
||||
pages/family/f08-album-detail
|
||||
pages/family/f09-media-upload
|
||||
pages/family/f10-video-list
|
||||
pages/records/r01-people-list
|
||||
pages/records/r02-person-detail
|
||||
pages/records/r03-gift-list
|
||||
pages/records/r04-gift-editor
|
||||
pages/records/r05-ritual-list
|
||||
pages/records/r06-ritual-detail
|
||||
pages/records/r07-ritual-editor
|
||||
pages/records/r08-growth-journal
|
||||
pages/records/r09-life-events
|
||||
pages/records/r10-memo-list
|
||||
pages/records/r11-merit-records
|
||||
pages/notification/n01-message-center
|
||||
pages/notification/n02-message-detail
|
||||
pages/profile/m01-profile-home
|
||||
pages/profile/m02-edit-profile
|
||||
pages/profile/m03-security-settings
|
||||
pages/profile/m04-change-password
|
||||
pages/profile/m05-change-phone
|
||||
pages/profile/m06-help-center
|
||||
pages/profile/m07-feedback
|
||||
pages/profile/m08-promotion
|
||||
pages/profile/m09-vip-orders
|
||||
pages/profile/m10-about-settings
|
||||
```
|
||||
|
||||
## Standard Per-Page Audit Loop
|
||||
|
||||
Every page task below uses this exact loop:
|
||||
|
||||
- [x] Read the whole Vue page and its focused contracts before interaction.
|
||||
- [x] Enumerate default, loading, empty, error, permission, validation, success, dialog, and long-content states; mark only genuinely unsupported states as not applicable.
|
||||
- [x] Navigate through the running Android WebView without using browser-rendered screenshots.
|
||||
- [x] Capture each stable state with ADB, save it under `tmp/project-audit/<page-id>/`, and inspect the saved PNG before accepting it.
|
||||
- [x] Reject transition, blank, loading-incomplete, wrong-route, or cropped screenshots and capture them again.
|
||||
- [x] Check content-driven height, wrapping, horizontal overflow, frame distortion, touch reachability, safe areas, modal scrolling, hierarchy, feedback placement, and state clarity.
|
||||
- [x] If no defect is visible, run the page's focused contracts and advance.
|
||||
- [x] If a defect is visible, document five solutions and select the one with the best project-wide contract fit and smallest justified surface area.
|
||||
- [x] Add or tighten a focused failing contract and run it to observe the expected failure.
|
||||
- [x] Implement the minimum source change, with no adjacent cleanup.
|
||||
- [x] Run focused contracts, the global responsive contract, and compile audit.
|
||||
- [x] Allow HBuilderX hot reload to update MuMu, then recapture every affected state and inspect each PNG.
|
||||
- [x] Leave the page in its default review state and continue immediately to the next route.
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Complete G10-G12 Genealogy Review
|
||||
|
||||
**Files:**
|
||||
- Verify/Modify: `pages/genealogy/g10-application-review.vue`
|
||||
- Verify/Modify: `pages/genealogy/g11-genealogy-settings.vue`
|
||||
- Verify/Modify: `pages/genealogy/g12-generation-poems.vue`
|
||||
- Test: `tests/g10-*.ps1`
|
||||
- Test: `tests/g11-*.ps1`
|
||||
- Test: `tests/g12-*.ps1`
|
||||
|
||||
**Interfaces:**
|
||||
- Consumes: shared genealogy background, `PageHeader`, `AppDialog`, `AppButton`, `AppLoading`, adaptive genealogy frame profiles.
|
||||
- Produces: verified settings, review, and generation-poem flows with current-run MuMu evidence.
|
||||
|
||||
- [x] Apply the Standard Per-Page Audit Loop to G10, including list, help, approve, reject, reject validation, result, empty, error, no-permission, and loading states. All stable MuMu states passed visual inspection and all focused G10 contracts passed without a source change.
|
||||
- [x] Apply the loop to G11. The content-height regression was reproduced, protected by `tests/g11-document-flow-contract.ps1`, fixed by removing the panel `min-height`, and reverified in MuMu.
|
||||
- [x] Apply the loop to G12, including list, empty, edit, validation, success, error, no-permission, loading, and long poem content. A forced panel `min-height` was reproduced, protected by `tests/g12-document-flow-contract.ps1`, removed, and reverified through the 48-character long-list bottom in MuMu.
|
||||
- [x] Run all G10-G12 focused contracts plus the four project baseline commands. The applicable PowerShell contracts and all four baselines pass; the legacy browser runtime smoke was intentionally excluded from visual acceptance and cannot connect without its separate localhost browser harness.
|
||||
|
||||
### Task 2: Complete T-Series Review
|
||||
|
||||
**Files:**
|
||||
- Verify/Modify: `pages/tree/t01-tree-overview.vue`
|
||||
- Verify/Modify: `pages/tree/t03-member-profile.vue`
|
||||
- Verify/Modify: `pages/tree/t04-add-relative.vue`
|
||||
- Verify/Modify: `pages/tree/t05-edit-member.vue`
|
||||
- Verify/Modify: `pages/tree/t06-edit-relationship.vue`
|
||||
- Verify/Modify: `pages/tree/t07-member-directory.vue`
|
||||
- Verify/Modify: `pages/tree/t08-member-states.vue`
|
||||
- Verify/Modify: `components/tree/TreeMemberForm.vue`
|
||||
- Test: matching `tests/t*.ps1` and runtime navigation contracts.
|
||||
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T01. Fixed the clipped horizontal-pan cue by layering it over the visible grid viewport, and isolated tree-only scroll/metrics bindings so all non-tree state cards fit the viewport; all stable states plus horizontal panning passed MuMu review.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T03. Audited editable, privacy, forbidden, missing/unknown error, and loading states; removed the forced member-panel `min-height`, updated its document-flow contract to the shared adaptive owners, and reverified in MuMu.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T04. Audited relative/first-member forms, validation, long summary growth, discard dialog, success, and error; removed the forced panel `min-height`, added the business-contract guard, and reverified in MuMu.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T05. Audited form, validation, long biography, discard dialog, success, error, and no-permission; removed the forced panel `min-height`, added a focused contract guard, and reverified in MuMu.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T06. Audited form, validation, success, conflict, conflict-rules dialog, and error; removed the forced panel `min-height`, added a focused contract guard, and reverified in MuMu.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T07. Audited full/filtered lists, search-driven empty, explicit empty, error recovery, and loading; no page-source defect was found. Updated the stale asset contract to assert the shared adaptive owners; all focused contracts pass.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to T08. Audited privacy, deceased, forbidden, and invalid-member error states with matching member/state contracts; all content, guidance, and actions fit without clipping, so no source change was required.
|
||||
- [x] Cover tree overflow, selected member, long relationship copy, form validation, directory search, empty/error states, and permission states where supported.
|
||||
- [x] Run focused T-series contracts, global responsive contract, and compile audit. All T-series PowerShell contracts and the four project baselines pass.
|
||||
|
||||
### Task 3: Complete F-Series Review
|
||||
|
||||
**Files:**
|
||||
- Verify/Modify: `pages/family/f01-family-feed.vue` through `pages/family/f10-video-list.vue`
|
||||
- Test: matching `tests/f*.ps1` and runtime flow contracts.
|
||||
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F01. List, shortcuts, empty, error/retry, loading, tabbar spacing, and content scroll all pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F02. Audited form, empty validation toast, 276-character growth, success, and error; removed the forced panel `min-height`, added textarea `auto-height`, modernized the adaptive ownership contract, and reverified in MuMu.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F03. Ready, expired, error, loading, article/comment flow, empty validation, submission failure, successful insertion, and long auto-height comment content all pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F04. Audited ready, empty, error, loading, search-empty/reset, 50-item growth, and route actions. The long-list audit exposed a shared fixed-header host stacking defect also visible in F03; added a global direct-host stacking contract, verified the fixed header at the list bottom, and regression-checked F03 plus the accepted G10 dialog overlay.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F05. Ready article, fixed-header scroll boundary, favorite/unfavorite feedback, edit routing, expired/unknown return flow, privacy, error recovery, and loading all pass MuMu review without a page-source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F06. Audited create/edit, validation, loading, draft, saving, failure retention/retry, success, return routing, and long content. MuMu reproduced a 524px body clipped into a 150px textarea; selected content-driven `auto-height`, migrated stale tests to adaptive profile ownership, and reverified equal client/scroll height plus natural page growth.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F07. Ready/30-item growth, fixed-header bottom, empty, error, loading, album navigation, create dialog, empty validation, long name, successful insertion, and toast all pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F08. Normal photo wall/top-bottom scroll, five fixed-ratio media tiles, full-screen preview at the final photo, Android back-to-close behavior, empty/expired states, return routing, and upload navigation all pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F09. Audited initial, permission, selected, nine-photo maximum, add/remove/active-photo editing, required validation, long batch/photo notes, uploading lock/progress, failure retry, success return, and fixed-header gesture scroll. Added `auto-height` to both description fields and a shared PageHeader compositor layer after MuMu reproduced native-media scroll paint loss; reverified F08 media scrolling and the accepted G10 dialog overlay.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to F10. Audited loading, success/empty return flow, fixed-header layout, and status-card rendering. Replaced the stretched `scaleToFill` decorative image with the shared adaptive family-panel profile, tightened its contract, and reverified the resulting nine-slice frame in MuMu.
|
||||
- [x] Cover feed cards, publish validation, detail comments, article lists/details/editor, album lists/details, media upload, video lists, empty/loading/error/success states, and long content.
|
||||
- [x] Run focused F-series contracts, global responsive contract, and compile audit. All 13 focused F-series contracts and the four project baselines pass; two stale F01 tests were migrated from forbidden stretch-image assertions to the shared adaptive-profile owner.
|
||||
|
||||
### Task 4: Complete R-Series Review
|
||||
|
||||
**Files:**
|
||||
- Verify/Modify: `pages/records/r01-people-list.vue` through `pages/records/r11-merit-records.vue`
|
||||
- Test: matching `tests/r*.ps1` and module-series contracts.
|
||||
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R01. Audited ready, search-empty/reset, empty, error/retry, person routing, and long copy in MuMu. Replaced fixed card height plus percentage padding with content-driven height and profile-owned safe padding; replaced the Android-incompatible `location.hash` state reader with the UniApp `onLoad` route contract.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R02. Detail, edit, create validation, 450-character auto-height biography, privacy, loading, error/retry, expired, and related-route controls pass MuMu review without a page-source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R03. Ready/50-item growth, fixed-header bottom, empty, error/retry, loading, and create/edit routing pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R04. Create validation, save success, forced failure/retry, view/edit, delete confirmation/cancel, and return flow pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R05. Ready/50-item growth, fixed-header bottom, empty, error/retry, loading, create, and detail routing pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R06. Detail, long description and participant roles, privacy, error/retry, loading/expired contracts, list return, and edit routing pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R07. Edit/create, required validation, long auto-height description, save success, forced-failure/retry contract, and delete flow pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R08. Ready timeline, empty/error/retry/loading contracts, required dialog validation, 1,520-character auto-height story, internal dialog scroll to actions, save insertion, and toast pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R09. Ready timeline, empty/create flow, required validation, successful insertion, toast, long-content and shared-dialog behavior pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R10. Ready, complete/reopen toggle, toast, long-card growth, create validation/save, empty/error/retry/loading contracts pass MuMu review without a source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to R11. Summary/list, long contribution growth, create validation/save, live total update, toast, empty/error/retry/loading contracts pass MuMu review without a source change.
|
||||
- [x] Cover lists, details, editors, validation, long biographies, timeline content, empty/loading/error/success states, and feedback overlays.
|
||||
- [x] Run focused R-series contracts, global responsive contract, and compile audit. All four focused R contracts and the four project baselines pass; the stale R02 stretch-image test was migrated to shared adaptive-profile ownership.
|
||||
|
||||
### Task 5: Complete N And M Series Review
|
||||
|
||||
**Files:**
|
||||
- Verify/Modify: `pages/notification/n01-message-center.vue`
|
||||
- Verify/Modify: `pages/notification/n02-message-detail.vue`
|
||||
- Verify/Modify: `pages/profile/m01-profile-home.vue` through `pages/profile/m10-about-settings.vue`
|
||||
- Test: matching `tests/n*.ps1`, `tests/m*.ps1`, and module-series contracts.
|
||||
|
||||
- [x] Apply the Standard Per-Page Audit Loop to N01. Ready/unread, mark-all-read, toast, long-card growth, empty/error/retry/loading contracts, and detail/review routing pass MuMu review without a page-source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to N02. Unread/read, mark-read toast, long-body growth, approved-target variant, expired/return flow, and responsive state layout pass MuMu review without a page-source change.
|
||||
- [x] Apply the Standard Per-Page Audit Loop to M01 through M10 in route order. Reviewed profile ready/error and service navigation; edit/password/phone validation and long inputs; security routes; FAQ expansion/search; feedback validation and long content; promotion copy/poster dialog; VIP empty/ready orders and service dialog; and about agreements plus logout cancel/confirm/disabled states in MuMu.
|
||||
- [x] Cover unread/read, detail, profile summary, edit and security forms, password/phone validation, help, feedback, promotion, orders, about/settings, loading/error/success, and long content.
|
||||
- [x] Run focused N/M contracts. All eight N/M PowerShell contracts pass; the stale M01 stretch-image assertions were migrated to the shared adaptive-profile owner. Project-wide baselines continue in Task 6.
|
||||
|
||||
### Task 6: Project-Wide Baseline Closure
|
||||
|
||||
**Files:**
|
||||
- Verify: `tests/responsive-layout-coverage.json`
|
||||
- Verify: `tests/responsive-layout-allowlist.json`
|
||||
- Verify: `styles/adaptive-frame-profiles.scss`
|
||||
- Verify: all `components/**/*.vue`, `pages/**/*.vue`, and `App.vue`.
|
||||
|
||||
- [x] Run `powershell -ExecutionPolicy Bypass -File tests/adaptive-frame-profiles-contract.ps1` and require PASS.
|
||||
- [x] Run `powershell -ExecutionPolicy Bypass -File tests/project-responsive-layout-contract.ps1` and require PASS.
|
||||
- [x] Run `powershell -ExecutionPolicy Bypass -File tests/ag-responsive-surfaces-contract.ps1` and require PASS.
|
||||
- [x] Run `powershell -ExecutionPolicy Bypass -File tests/compile-audit.ps1` and require PASS.
|
||||
- [x] Verify the Vue file set exactly matches `tests/responsive-layout-coverage.json`, with zero missing and zero stale entries: 66 actual and 66 covered.
|
||||
- [x] Verify zero Vue matches for `100% 100% no-repeat`.
|
||||
- [x] Verify zero direct `border-image-slice` declarations in Vue pages/components.
|
||||
- [x] Confirm MuMu remains online and retains the user-selected resolution and density: `emulator-5554`, physical 900×1600 at 320 dpi. The accepted G10 checkpoint was rechecked after the final contract migration and remains visually correct.
|
||||
|
||||
### Task 7: Two-Expert Whole-Product Optimization Review
|
||||
|
||||
**Files:**
|
||||
- Create: `docs/superpowers/specs/2026-07-21-whole-product-enrichment-design.md`
|
||||
- Create: `docs/superpowers/plans/2026-07-21-whole-product-enrichment-implementation.md`
|
||||
- Verify: all accepted MuMu screenshot folders from Task 1 through Task 6.
|
||||
|
||||
**Interfaces:**
|
||||
- Expert A produces: visual-system and interaction recommendations ranked by user impact, consistency, accessibility, and implementation risk.
|
||||
- Expert B produces: functional-flow and frontend-code recommendations ranked by correctness, maintainability, performance, and regression risk.
|
||||
- Primary agent produces: one reconciled design and implementation plan with no duplicate contract ownership.
|
||||
|
||||
- [x] Dispatch Expert A with the complete project constraints, accepted MuMu evidence, shared components, style profiles, and route inventory. Require concrete file-level recommendations and forbid browser visual evidence.
|
||||
- [x] Dispatch Expert B independently with the same evidence and constraints. Require concrete flow, state, accessibility, and code-quality recommendations.
|
||||
- [x] Send each expert the other's proposal and require a written challenge covering conflicts, missing risks, and unnecessary scope.
|
||||
- [x] Reconcile both reviews. For every disputed improvement, generate five solutions and select one using user impact, global consistency, regression risk, maintenance cost, and MuMu verifiability.
|
||||
- [x] Write the reconciled design spec and implementation plan. Do not alter accepted business contracts without an explicit migration requirement.
|
||||
|
||||
### Task 8: Implement And Verify Expert Optimizations
|
||||
|
||||
**Files:**
|
||||
- Modify: only the files named by the reconciled Task 7 plan.
|
||||
- Test: focused contracts created before each production change.
|
||||
- Evidence: `tmp/project-optimization/<batch-id>/` MuMu screenshots.
|
||||
|
||||
- [x] Divide accepted improvements into small batches that each have one owner and one independently testable outcome.
|
||||
- [x] For each batch, write the focused failing contract and observe the expected failure.
|
||||
- [x] Implement the minimum shared or page-level change chosen by the reconciled plan.
|
||||
- [x] Run focused and project-wide contracts.
|
||||
- [x] Capture and inspect MuMu screenshots for every affected route and state.
|
||||
- [x] Recheck previously accepted pages whenever a shared component or shared profile changes.
|
||||
- [x] Finish only when all accepted optimization batches and the project-wide baseline pass with current-run evidence.
|
||||
|
||||
## Self-Review
|
||||
|
||||
- The plan covers every route from G10 onward and explicitly freezes G01-G09 except for demonstrated shared regressions.
|
||||
- The single owners for nine-slice profiles, responsive exceptions, and coverage remain unchanged.
|
||||
- The five-option decision process, autonomous execution, MuMu-only visual evidence, no-Git constraint, current emulator configuration, and two-expert enrichment phase are explicit.
|
||||
- There are no compatibility fallback steps and no authorization to modify business contracts speculatively.
|
||||
@@ -0,0 +1,154 @@
|
||||
# 全项目第二轮体验与代码优化实施计划
|
||||
|
||||
> **For agentic workers:** 按任务顺序执行;每个任务都先写失败契约、再做最小实现、最后在 MuMu 验证。用户禁止任何 Git 操作。
|
||||
|
||||
**Goal:** 在保持已验收视觉与业务合同的前提下,完成 Android 原生路由、共享弹窗、关键交互语义、密码策略和世系树恢复定位优化。
|
||||
|
||||
**Architecture:** 活动页面的 `onLoad(query)` 是原生路由唯一所有者;共享弹窗和共享点击表面只在组件层持有跨页规则;账户密码策略由一个纯函数模块持有;T01 的恢复定位只属于树页本身。
|
||||
|
||||
**Tech Stack:** UniApp、Vue 3 `<script setup>`、SCSS、PowerShell 静态契约、MuMu Android WebView/CDP 只读检查。
|
||||
|
||||
## 全局约束
|
||||
|
||||
- 不使用浏览器做视觉审核,不启动或关闭 MuMu。
|
||||
- 不执行 Git add、commit、push、restore、checkout。
|
||||
- 不修改 G01~G10 视觉,除非修复已证明的 Android/共享缺陷。
|
||||
- 页面示例提示使用“某某某”;fixture 数据不处理。
|
||||
- 内容自然增高;弹窗只允许视口 max-height 和内部滚动。
|
||||
- 不在 Vue 中新增 `100% 100% no-repeat` 或 `border-image-slice`。
|
||||
|
||||
---
|
||||
|
||||
### Task 1: 原生活动页路由参数
|
||||
|
||||
**Files:**
|
||||
- Create: `tests/native-route-query-contract.ps1`
|
||||
- Modify: `pages/genealogy/g01-my-genealogies.vue`
|
||||
- Modify: `pages/genealogy/g03-create-genealogy.vue`
|
||||
- Modify: `pages/genealogy/g06-search-genealogies.vue`
|
||||
- Modify: affected G01/G03/G06 route contracts and runtime-smoke assumptions only when they assert hash ownership
|
||||
|
||||
**Interfaces:**
|
||||
- G01 `onLoad(query)` consumes `state?: default|empty|loading|error` and `genealogyId?: string`.
|
||||
- G03 `onLoad(query)` consumes `step?: create|ancestor` and `genealogyId?: string`.
|
||||
- G06 `onLoad(query)` consumes `mode?: search|invite` and `state?: loading|initial`.
|
||||
|
||||
- [x] Add a failing contract forbidding `location.hash`, `URLSearchParams` and `hashchange` in active pages and requiring the three `onLoad(query)` entrypoints.
|
||||
- [x] Run `powershell -ExecutionPolicy Bypass -File tests/native-route-query-contract.ps1`; expect failure on current G01/G03/G06.
|
||||
- [x] Replace global URL reads with page-owned normalized query refs; delete obsolete listeners and fallback branches.
|
||||
- [x] Update only stale tests that still make H5 hash the production contract.
|
||||
- [x] Run focused G01/G03/G06 tests and the four project baselines.
|
||||
- [x] In MuMu verify G05→G03 ancestor, G01→G06 invite, and re-entry without stale state; save screenshots under `tmp/project-optimization/native-route/`.
|
||||
|
||||
### Task 2: AppDialog 高度预算
|
||||
|
||||
**Files:**
|
||||
- Modify: `tests/app-dialog-responsive-content-contract.ps1`
|
||||
- Modify: `components/AppDialog.vue`
|
||||
- Modify: `styles/global.scss` only if a shared safe-area variable is required
|
||||
|
||||
**Interfaces:**
|
||||
- `.app-dialog-layer` owns viewport safe padding.
|
||||
- `.app-dialog` owns the only dialog max-height budget.
|
||||
- `.app-dialog__body` remains the internal scrolling region.
|
||||
|
||||
- [x] Tighten the dialog contract to require safe top/bottom and one closed height formula; keep existing internal-scroll assertions.
|
||||
- [x] Run the contract and observe the expected failure.
|
||||
- [x] Implement the smallest CSS-only budget change without changing markup or assets.
|
||||
- [x] Run the focused contract and four baselines.
|
||||
- [x] In MuMu verify G10 approve/reject, R04 delete, R08 long top/bottom, M10 agreement/logout and F07 create; save evidence under `tmp/project-optimization/dialog-safe-area/`.
|
||||
|
||||
### Task 3: AppTabbar 与 GenealogyCard 交互语义
|
||||
|
||||
**Files:**
|
||||
- Modify: `tests/shared-interaction-accessibility-contract.ps1`
|
||||
- Modify: `components/AppTabbar.vue`
|
||||
- Modify: `components/GenealogyCard.vue`
|
||||
|
||||
**Interfaces:**
|
||||
- Tabbar root exposes `tablist`; each item exposes `tab`, dynamic `aria-selected`, accessible label and a no-layout-shift pressed class.
|
||||
- GenealogyCard exposes one button semantic surface with a computed accessible label and pressed class.
|
||||
|
||||
- [x] Add failing assertions for role/name/current state/pressed feedback.
|
||||
- [x] Run the accessibility contract and confirm failure.
|
||||
- [x] Add semantic attributes and `hover-class` while retaining existing DOM geometry and assets.
|
||||
- [x] Run focused component, responsive and compile contracts.
|
||||
- [x] In MuMu verify F01/M01 tab switching and G01 current/non-current cards, including press feedback and unchanged layout; save evidence under `tmp/project-optimization/shared-pressable/`.
|
||||
|
||||
### Task 4: G10 拒绝错误关联
|
||||
|
||||
**Files:**
|
||||
- Modify: `tests/g10-document-flow-contract.ps1`
|
||||
- Modify: `tests/g09-g10-business-state-contract.ps1`
|
||||
- Modify: `pages/genealogy/g10-application-review.vue`
|
||||
|
||||
**Interfaces:**
|
||||
- Reject textarea has stable id, `aria-invalid`, `aria-describedby` and an error element with `role="alert"`.
|
||||
- Failed reject submission focuses the textarea after `nextTick`; valid input clears the error contract.
|
||||
|
||||
- [x] Add failing static assertions for field/error association and focus call.
|
||||
- [x] Run focused tests and confirm failure.
|
||||
- [x] Implement the semantic association and focus behavior without changing dialog layout.
|
||||
- [x] Run all G10 tests and the four baselines.
|
||||
- [x] In MuMu verify empty reject, correction, confirmation and long reason with keyboard/internal scroll; save evidence under `tmp/project-optimization/g10-validation/`.
|
||||
|
||||
### Task 5: 单一密码策略
|
||||
|
||||
**Files:**
|
||||
- Create: `utils/validation.js`
|
||||
- Create: `tests/password-policy-contract.ps1`
|
||||
- Create: `tests/password-policy-runtime-smoke.js` as a Node-only pure-function test
|
||||
- Modify: `pages/auth/a04-register.vue`
|
||||
- Modify: `pages/auth/a05-reset-password.vue`
|
||||
- Modify: `pages/profile/m04-change-password.vue`
|
||||
|
||||
**Interfaces:**
|
||||
- `validatePassword(value)` returns `{ valid: boolean, message: string }`.
|
||||
- `PASSWORD_POLICY_MESSAGE` is the single visible rule text.
|
||||
- M04 additionally rejects `next === current` in its page-specific validator.
|
||||
|
||||
- [x] Write static ownership assertions and pure-function cases for empty, 7-char, letters-only, digits-only, valid 8-char and 33-char values.
|
||||
- [x] Run both tests and observe missing-module/ownership failure.
|
||||
- [x] Implement the pure validation module and migrate all three pages, deleting local duplicated regex/messages.
|
||||
- [x] Run A04/A05/M04 focused tests, pure runtime test and four baselines.
|
||||
- [x] In MuMu submit the same invalid/valid samples on all three pages; verify identical rule feedback and natural error wrapping; save evidence under `tmp/project-optimization/password-policy/`.
|
||||
|
||||
### Task 6: T01 回到当前成员
|
||||
|
||||
**Files:**
|
||||
- Modify: `tests/t01-tree-state-contract.ps1`
|
||||
- Modify: `tests/t01-tree-state-runtime-smoke.js` only to express the new state contract without browser-only visual claims
|
||||
- Modify: `pages/tree/t01-tree-overview.vue`
|
||||
|
||||
**Interfaces:**
|
||||
- Each member node has a stable DOM id derived from member id.
|
||||
- `treeScrollLeft` binds to `scroll-left`.
|
||||
- A user scroll sets `treeHasDrifted`; `recenterSelectedMember()` measures the selected node and visible scroll viewport, then centers the node and clears drift.
|
||||
|
||||
- [x] Add failing assertions for stable node id, drift state, conditional action and recenter function.
|
||||
- [x] Run the focused test and confirm failure.
|
||||
- [x] Add the conditional semantic action using the existing toolbar visual language; do not alter node/line geometry.
|
||||
- [x] Run T01 focused tests and four baselines.
|
||||
- [x] In MuMu pan left/right, recenter, change selection and recenter again; verify selected detail is unchanged and empty/loading/error omit the action; save evidence under `tmp/project-optimization/t01-recenter/`.
|
||||
|
||||
### Task 7: 全项目闭环
|
||||
|
||||
**Files:**
|
||||
- Modify: `docs/superpowers/plans/2026-07-21-project-wide-audit-and-expert-optimization.md`
|
||||
- Verify: all `tests/*.ps1`, coverage/allowlist owners and affected MuMu evidence directories
|
||||
|
||||
- [x] Run every `tests/*.ps1` and require all pass.
|
||||
- [x] Run the Node-only password policy test.
|
||||
- [x] Run the four user-required baseline commands again.
|
||||
- [x] Compare actual Vue files to `responsive-layout-coverage.json`; require exact equality.
|
||||
- [x] Require zero Vue matches for `100% 100% no-repeat` and direct `border-image-slice`.
|
||||
- [x] Confirm MuMu stays online at the user-selected configuration and inspect every affected screenshot.
|
||||
- [x] Recheck accepted G10 and one representative F/R/N/M page after shared changes.
|
||||
- [x] Record exact pass counts, modified files, evidence paths, remaining deferred debt and skipped browser-only smoke tests.
|
||||
|
||||
## 自检
|
||||
|
||||
- 设计中的六个实施批次均有对应任务和独立验收。
|
||||
- 没有 TODO/TBD、兼容旧 hash 的双路径或未经授权的 API 接入。
|
||||
- 计划没有任何 Git 命令。
|
||||
- 页栈、短信、领域 repository 与全局文字系统明确暂缓,没有被悄悄塞入实现。
|
||||
@@ -0,0 +1,171 @@
|
||||
# 全项目第二轮体验与代码优化设计
|
||||
|
||||
## 目标
|
||||
|
||||
在不推翻已通过国风视觉、不改变现有业务枚举、不接入未经授权的远程服务的前提下,修复 Android 原生路由、共享弹窗高度预算、关键交互语义和密码策略的一致性问题,并为世系树补充可恢复定位能力。
|
||||
|
||||
## 已确认基线
|
||||
|
||||
- G01~G10 保持已人工验收结果;只有明确的共享回归或 Android 运行时缺陷才允许触及。
|
||||
- G11 之后全部活动页面已完成 MuMu 逐页与主要状态审核。
|
||||
- 127/127 个 PowerShell 契约通过;66/66 个 Vue 文件与响应式覆盖清单一致。
|
||||
- Vue 中 `100% 100% no-repeat` 为 0;页面/组件直接声明 `border-image-slice` 为 0。
|
||||
- 当前 MuMu 为 `emulator-5554`,物理 900×1600、320 dpi;不得由代理启动或关闭。
|
||||
|
||||
## 全局约束
|
||||
|
||||
- 视觉验证只使用 MuMu Android,不使用浏览器。
|
||||
- 内容高度由内容决定;弹窗只使用视口最大高度和内部滚动。
|
||||
- 不通过缩小字号、固定正文高度或强制单行掩盖布局问题。
|
||||
- 九宫格切片继续只由 `styles/adaptive-frame-profiles.scss` 持有。
|
||||
- 固定比例图标、缩略图和印章的例外继续只由响应式 allowlist 持有。
|
||||
- 页面示例提示只使用“某某某”;现有 fixture 数据不纳入文案替换。
|
||||
- 不执行 Git add、commit、push、restore、checkout。
|
||||
- 每个生产改动先有失败契约,改后跑聚焦契约、四项基线并在 MuMu 验证。
|
||||
|
||||
## 专家交叉评审结论
|
||||
|
||||
视觉交互专家认为现有国风体系健康,不应重做;功能代码专家认为最高价值缺陷集中在 Android 路由所有权。双方一致接受分批修复,并共同否决全量视觉重做、全量原生按钮迁移、状态库引入、虚拟列表和无后端契约的假持久化。
|
||||
|
||||
## 批次一:活动页原生路由参数
|
||||
|
||||
### 问题
|
||||
|
||||
G01、G03、G06 在 Android WebView 中仍优先读取 `location.hash`。R01 已实证该路径会忽略 UniApp 原生查询参数。
|
||||
|
||||
### 五个方案
|
||||
|
||||
1. 保持现状:已被 MuMu 反证,淘汰。
|
||||
2. 调整双读取优先级:仍保留两个运行时合同,淘汰。
|
||||
3. 用 H5 条件编译保留 hash:可行但生产页面仍承担测试入口,非最简。
|
||||
4. 新建全局 route-query 工具:对三个简单枚举参数过度抽象。
|
||||
5. 页面 `onLoad(query)` 成为唯一入口,页面内白名单归一化:最小且符合 UniApp。
|
||||
|
||||
### 选择
|
||||
|
||||
采用方案 5。G01 保存 `state/genealogyId`,G03 保存 `step/genealogyId`,G06 保存 `mode/state`;删除活动页的 hash、URLSearchParams 和 hashchange 监听。`ModulePage`、`TreeMemberForm` 与封存 A06 没有活动消费者,本批不延长其生命周期。
|
||||
|
||||
### 验收
|
||||
|
||||
从 G05 进入 G03 首代人物步骤、从 G01 进入 G06 邀请码模式,返回再进入不串状态;活动路由静态扫描不得再出现 H5 查询读取。
|
||||
|
||||
## 批次二:AppDialog 唯一高度预算
|
||||
|
||||
### 问题
|
||||
|
||||
长弹窗的遮罩 padding、九宫格边框、视口高度和安全区分别计算,所有权分散;极短屏或非零安全区存在侵入系统栏或底部操作空间不足的风险。
|
||||
|
||||
### 五个方案
|
||||
|
||||
1. 增大固定 padding:不适配设备差异。
|
||||
2. 只在内容区减安全区:父子仍重复猜测空间。
|
||||
3. 外层 safe-area padding,保留内容公式:预算仍分裂。
|
||||
4. 改成标题/正文/操作 sticky 三段:改变已验收结构,范围过大。
|
||||
5. `.app-dialog-layer` 持有安全区与外边距,`.app-dialog` 持有唯一 max-height,正文只在剩余空间内部滚动。
|
||||
|
||||
### 选择
|
||||
|
||||
采用方案 5,不改变视觉层级、按钮顺序或九宫格资产。短弹窗继续内容驱动,长弹窗滚动到操作区。
|
||||
|
||||
### 验收
|
||||
|
||||
G10 通过/拒绝、R04 删除、R08 长内容、M10 协议/退出在当前 MuMu 均完整;长内容顶部不进入状态栏,底部按钮可达,短弹窗不产生大空白。
|
||||
|
||||
## 批次三:共享点击表面语义与按压反馈
|
||||
|
||||
### 问题
|
||||
|
||||
AppTabbar 与 GenealogyCard 是活动共享表面,但目前主要依赖普通 `view @click`,缺少当前项播报和统一按压反馈。
|
||||
|
||||
### 五个方案
|
||||
|
||||
1. 不处理:TalkBack 与即时反馈缺陷继续存在。
|
||||
2. 所有页面就地补属性:重复且易漏。
|
||||
3. 全量替换为原生 button:Android 默认样式回归面大。
|
||||
4. 新建 AppPressable 并迁移全部点击表面:本轮过度设计。
|
||||
5. 保留现有 DOM 与皮肤,只给两个活动共享组件补 role、动态 aria、选中/禁用语义和无位移 hover-class。
|
||||
|
||||
### 选择
|
||||
|
||||
采用方案 5。Tabbar 使用 `tablist/tab/aria-selected`;GenealogyCard 使用单一 button 语义与包含家谱名、角色、当前状态的可访问名称。按压态只改变透明度,不改变尺寸。
|
||||
|
||||
### 验收
|
||||
|
||||
F01/M01 底栏与 G01 家谱卡在 MuMu 中点击热区不变、无布局位移、选中态仍清楚;静态契约验证可访问属性和 pressed class。
|
||||
|
||||
## 批次四:G10 拒绝错误可达性
|
||||
|
||||
### 问题
|
||||
|
||||
拒绝原因的可见错误没有与 textarea 程序化关联,提交失败后也没有稳定焦点返回路径。
|
||||
|
||||
### 五个方案
|
||||
|
||||
1. 仅保留红色文字:不可访问。
|
||||
2. 只加 `role=alert`:能播报但未关联字段。
|
||||
3. 新增页顶错误摘要:改变已验收视觉。
|
||||
4. 全项目一次性迁移所有表单:回归面过大。
|
||||
5. G10 先建立稳定 id、aria-invalid、aria-describedby、alert,并在失败后 nextTick 聚焦字段。
|
||||
|
||||
### 选择
|
||||
|
||||
采用方案 5,作为后续表单迁移样板,不改变弹窗现有外观。
|
||||
|
||||
### 验收
|
||||
|
||||
拒绝原因为空时错误出现并与字段关联,焦点回到 textarea;输入后错误与 invalid 状态同步清除;键盘弹出时操作按钮仍能滚动到达。
|
||||
|
||||
## 批次五:统一密码策略
|
||||
|
||||
### 问题
|
||||
|
||||
A04、A05 只判断非空,M04 要求 8~32 位且含字母和数字,同一账户合同互相矛盾。
|
||||
|
||||
### 五个方案
|
||||
|
||||
1. 保持三套规则:错误。
|
||||
2. 将 M04 正则复制到 A04/A05:产生三份所有者。
|
||||
3. 仅依赖服务端:当前 mock 模式无法及时反馈。
|
||||
4. 动态拉取服务端策略:尚无接口合同。
|
||||
5. `utils/validation.js` 持有唯一密码规则与错误文案,三页共同消费。
|
||||
|
||||
### 选择
|
||||
|
||||
采用方案 5。规则为 8~32 位、同时含字母与数字;M04 额外拒绝新旧密码相同。旧页面正则和分裂文案必须删除。
|
||||
|
||||
### 验收
|
||||
|
||||
三页对空值、7 位、纯字母、纯数字、合法 8 位和 33 位输入给出一致结果;MuMu 中错误换行与内容高度正常。
|
||||
|
||||
## 批次六:T01 回到当前成员
|
||||
|
||||
### 问题
|
||||
|
||||
世系树横向平移后没有恢复到当前成员的动作,大谱系中容易失去上下文。
|
||||
|
||||
### 五个方案
|
||||
|
||||
1. 不处理:保留迷失风险。
|
||||
2. 每次选择自动居中:干扰自由浏览。
|
||||
3. 始终显示固定按钮:增加默认页面密度。
|
||||
4. 新增小地图和缩放:属于重设计。
|
||||
5. 仅在用户明显平移后显示“回到当前成员”,通过稳定节点 id 和 `scroll-into-view` 主动恢复。
|
||||
|
||||
### 选择
|
||||
|
||||
采用方案 5。动作复用现有工具栏风格,不改变节点、连线、画布尺寸和底部详情卡。
|
||||
|
||||
### 验收
|
||||
|
||||
左右平移后动作出现;点击后当前节点重新可见、选中成员和详情不变,动作消失;空/加载/错误状态不显示。
|
||||
|
||||
## 明确暂缓
|
||||
|
||||
- 返回页栈:问题真实,但必须先把“恢复来源上下文”和“深链 fallback”分类,并与保存后的数据刷新一起设计,禁止机械替换所有 `redirectTo/reLaunch`。
|
||||
- 短信验证码:记录为认证合同债务;真实接口、过期、重发和 token 所有权确定前,不制造本地假验证。
|
||||
- 跨页保存/删除:当前 mock fixture 分散,不能继续把视图切换声称为持久成功;领域 repository 作为独立后续迁移,不在本批扩大范围。
|
||||
- 全局文字 token:只在本批新增的错误/辅助文案保持可读,不对所有 19~21rpx 文本一刀切。
|
||||
|
||||
## 完成定义
|
||||
|
||||
六个批次各自通过先失败后通过的聚焦契约和 MuMu 验证;随后全部 PowerShell 契约、四项指定基线、66/66 覆盖与两个禁用扫描再次通过。共享改动必须回归至少一个已人工验收页面。
|
||||
Reference in New Issue
Block a user