完成全项目响应式审核与换机交接

This commit is contained in:
2026-07-22 07:41:27 +08:00
parent a127280ce6
commit eced3d1e6e
77 changed files with 2052 additions and 378 deletions
@@ -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 覆盖与两个禁用扫描再次通过。共享改动必须回归至少一个已人工验收页面。
+2
View File
@@ -1,5 +1,7 @@
# 家谱 APP 换机交接记录
> **当前交接入口(2026-07-22):** 请先完整阅读 `docs/换机继续任务交接_2026-07-22.md`。本文件下方内容保留为历史记录;凡是“从 G01/G10 继续”“只做 H5”“Android 尚未审核”“仍有 52 页待审”等说法,均已被 2026-07-22 交接覆盖,不得作为当前停点。
> 最后更新:2026-07-21
> 用途:更换电脑、重新打开 Codex/GPT 后的唯一接管入口。
> 当前阶段:只做页面样式与视觉流程验收;不对接接口,不做功能验收。
+304
View File
@@ -0,0 +1,304 @@
# 家谱 APP 换机继续任务交接(2026-07-22
> 用途:把当前项目完整复制到另一台电脑后,让新的 Codex/GPT 会话无需重新推翻既有设计,直接从正确停点继续。
>
> 当前权威状态:2026-07-21 的全项目响应式审核、MuMu 复核、两位专家评审与第一轮产品优化已经闭环。本文件覆盖 `docs/交接记录.md`、`docs/新会话审批交接_2026-07-19.md`、`docs/夜间批量收敛交接_2026-07-20.md` 中与当前进度冲突的旧停点;旧文件只保留为历史证据。
## 1. 换机时必须复制什么
最稳妥的方式是复制整个 `jiapuapp` 项目目录,而不是只重新拉取远端代码。当前工作包含源码、测试、规划和可能尚未同步到远端的文件,不能假设远端仓库已经拥有本轮全部成果。
新电脑上的项目路径可以变化。下文把项目根目录记为:
```text
<JIAPUAPP_ROOT>
```
必须保留:
- `AGENTS.md`
- `App.vue``pages/``components/``styles/``utils/`
- `tests/`,尤其是响应式覆盖、白名单和本轮新增合同
- `docs/`,尤其是 2026-07-21、2026-07-22 的规格、计划和本交接
- `static/``design-pipeline/` 中的正式资产、清单和重建脚本
- `pages.json``package.json` 及项目配置文件
本地证据目录:
- `tmp/project-audit/`:G10 之后逐页 MuMu 审核截图
- `tmp/project-optimization/`:专家优化后的 MuMu 复核截图
`tmp/` 通常不属于长期仓库资料。如果希望在新电脑继续查看本轮截图,必须单独复制上述两个目录;不复制不会影响源码和合同,但会失去本轮临时视觉证据。
可在换机后重新生成、无需作为权威资料的目录包括 `node_modules/``unpackage/``.vite/` 和其他构建缓存。不要删除正式资产、测试、规划、母版或长期证据来缩小目录。
## 2. 新会话必须按顺序阅读
新的 Codex/GPT 接管后,在修改代码前完整阅读:
1. `AGENTS.md`
2. `docs/换机继续任务交接_2026-07-22.md`(本文件)
3. `docs/superpowers/specs/2026-07-21-project-wide-responsive-layout-design.md`
4. `docs/superpowers/plans/2026-07-21-responsive-foundation-phase-1.md`
5. `tests/responsive-layout-coverage.json`
6. `styles/adaptive-frame-profiles.scss`
7. `docs/superpowers/plans/2026-07-21-project-wide-audit-and-expert-optimization.md`
8. `docs/superpowers/specs/2026-07-21-whole-product-enrichment-design.md`
9. `docs/superpowers/plans/2026-07-21-whole-product-enrichment-implementation.md`
发生冲突时,权威顺序为:
1. 用户在新会话中的最新明确要求。
2. 本交接文件。
3. 2026-07-21 的响应式、专家优化规格和计划。
4. 当前源码、测试和配置。
5. 更早的交接、设计记录和历史截图。
旧文档中“从 G01 开始”“只审核 H5”“Android 尚未验证”“仍剩 52 页待审”等说法已经失效,不得据此回退当前进度。
## 3. 当前真实完成状态
- `App.vue`、公共组件和所有活动页面共 **66 个 Vue 文件**已全部纳入响应式扫描。
- 最近一次闭环结果:实际 Vue `66`、覆盖 `66`、缺失 `0`、陈旧 `0`
- A 系列与 G01—G10 由用户在 MuMu 中逐页确认过;正式人工验收断点曾是 G10。
- G11、G12 以及后续 T、F、R、N、M 页面已经按用户授权,由主代理在 MuMu 中逐页、逐状态继续审核并完成问题修复,不再停在 G11。
- G10 之后已覆盖 G11—G12、T01/T03—T08、F01—F10、R01—R11、N01—N02、M01—M10。
- 两位专家已经完成评审和交叉质询:
- 视觉交互专家:Dirac
- 功能代码专家:Leibniz
- 不要重新创建两位专家或重复第一轮专家评审,除非用户在新会话明确要求第二轮。
- 两位专家的结论已经汇总到产品丰富化设计和实施计划;第一轮接受的六个优化批次已经实现。
- 规划文件中的实施检查项已经全部标记完成。
## 4. 已完成的关键修复与优化
### 4.1 全项目响应式基础
- 九宫格边框和可变高度装饰面的唯一所有者:`styles/adaptive-frame-profiles.scss`
- 页面和普通组件不得自行定义 `border-image-slice`
- 可变高度内容由内容自然撑高,不使用固定高度掩盖问题。
- 弹窗只允许使用视口 `max-height`,内容区域内部滚动。
- 页面内禁止重新出现 `background-size: 100% 100% no-repeat`
- 固定比例图标、头像、印章、缩略图等例外只允许登记在 `tests/responsive-layout-allowlist.json`
- 响应式扫描范围唯一清单:`tests/responsive-layout-coverage.json`
### 4.2 第一轮专家优化的六个批次
1. **原生路由参数**
- G01、G03、G06 不再依赖 `location.hash``URLSearchParams``hashchange`
- Android 活动页参数由各页 `onLoad(query)` 唯一持有。
- 保护合同:`tests/native-route-query-contract.ps1`
2. **AppDialog 高度预算**
- `components/AppDialog.vue` 统一持有顶部、底部安全区和唯一最大高度公式。
- 外层弹窗使用 Flex 列布局,内容区 `min-height: 0` 并独立滚动。
- 已在 G10、R04、R08、F07、M10 等短/长弹窗复核。
3. **共享点击语义**
- `components/AppTabbar.vue` 提供 `tablist``tab``aria-selected` 和按压反馈。
- `components/GenealogyCard.vue` 提供按钮语义、组合可访问名称和按压反馈。
- 保护合同:`tests/shared-interaction-accessibility-contract.ps1`
4. **G10 拒绝原因校验**
- 文本域具有稳定 ID、`aria-invalid``aria-describedby`
- 错误元素使用 `role="alert"`;空提交后文本域自动聚焦。
- 页面:`pages/genealogy/g10-application-review.vue`
5. **唯一密码策略**
- 唯一所有者:`utils/validation.js`
- A04、A05、M04 统一要求 8—32 位且同时包含字母和数字。
- M04 额外拒绝新密码与当前密码相同。
- 保护合同:`tests/password-policy-contract.ps1``tests/password-policy-runtime-smoke.js`
6. **T01 回到当前成员**
- 页面:`pages/tree/t01-tree-overview.vue`
- 用户横向拖离当前节点后才显示“回到当前”。
- 最终实现不是固定偏移或简单 `scroll-into-view`,而是测量滚动视口和选中节点中心后设置精确 `scroll-left`
- MuMu 最终实测中心误差约 `0.24 CSS px`
### 4.3 本轮逐页审核中已经解决的典型问题
- G11、G12、T03—T06 等内容面板移除强制 `min-height`,恢复内容驱动高度。
- F02、F06、F09 等长文本输入改为自然增长的 `auto-height`
- F04/F03 和 F09/F08 修复固定页头在长列表、原生媒体滚动时的层叠问题。
- F10 的可变高度装饰面迁移到共享九宫格档案。
- R01 卡片移除固定高度和百分比内边距,并改用原生 `onLoad` 状态参数。
- T01 的代际栏、横向提示、树画布和非树状态已分别约束,不能再退回固定大画布补丁。
完整逐页记录见:
- `docs/superpowers/plans/2026-07-21-project-wide-audit-and-expert-optimization.md`
- `docs/superpowers/specs/2026-07-21-whole-product-enrichment-design.md`
- `docs/superpowers/plans/2026-07-21-whole-product-enrichment-implementation.md`
## 5. 最近一次验证基线
2026-07-21 最终闭环时:
- 全部 `tests/*.ps1``129/129 PASS`
- `tests/password-policy-runtime-smoke.js`PASS
- 四个用户指定核心基线:全部 PASS
- Vue 文件:`66/66`
- Vue 中 `100% 100% no-repeat``0`
- Vue 中直接 `border-image-slice``0`
- MuMu 设备:`emulator-5554` 在线
- MuMu 物理尺寸:`900×1600`
- MuMu density`320 dpi`
- Android WebView 逻辑视口约为 `451×800 CSS px`
这些数字是上次闭环事实。换机后必须重新运行验证,不能因为本文件写着通过就直接宣称新环境通过。
## 6. 新电脑首次启动后的验证顺序
`<JIAPUAPP_ROOT>` 中运行:
```powershell
powershell -ExecutionPolicy Bypass -File tests/adaptive-frame-profiles-contract.ps1
powershell -ExecutionPolicy Bypass -File tests/project-responsive-layout-contract.ps1
powershell -ExecutionPolicy Bypass -File tests/ag-responsive-surfaces-contract.ps1
powershell -ExecutionPolicy Bypass -File tests/compile-audit.ps1
node tests/password-policy-runtime-smoke.js
```
运行全部 PowerShell 合同:
```powershell
$files = Get-ChildItem -LiteralPath tests -Filter '*.ps1' | Sort-Object Name
$pass = 0
$fail = 0
$failed = @()
foreach ($file in $files) {
& powershell -NoProfile -ExecutionPolicy Bypass -File $file.FullName *> $null
if ($LASTEXITCODE -eq 0) {
$pass++
} else {
$fail++
$failed += $file.Name
}
}
Write-Output "TOTAL=$($files.Count) PASS=$pass FAIL=$fail"
$failed
```
核对 Vue 覆盖:
```powershell
$coverage = (Get-Content -Raw tests/responsive-layout-coverage.json | ConvertFrom-Json).covered | Sort-Object
$actual = @(rg --files -g '*.vue' | ForEach-Object { $_ -replace '\\','/' }) | Sort-Object
$missing = @($actual | Where-Object { $_ -notin $coverage })
$stale = @($coverage | Where-Object { $_ -notin $actual })
"ACTUAL=$($actual.Count) COVERED=$($coverage.Count) MISSING=$($missing.Count) STALE=$($stale.Count)"
```
核对两项禁用规则:
```powershell
rg -n --glob '*.vue' '100%\s+100%\s+no-repeat' .
rg -n --glob '*.vue' 'border-image-slice\s*:' .
```
两条 `rg` 命令无输出才是正确结果。
## 7. MuMu 验证规则
- 只使用 MuMu 安卓模拟器作为视觉验收依据,不使用浏览器截图代替。
- 不要启动、关闭或改变用户的模拟器配置,除非用户明确要求。
- 新电脑上的设备序列号可能不再是 `emulator-5554`,先用 `adb devices` 读取真实值,不要硬编码旧值。
- 上次设备为 `900×1600 / 320dpi`;如果新电脑已有不同配置,先报告,不要擅自调整。
- 忽略截图中的“3D研究室”等系统水印。
- 每次修改页面后,先跑聚焦合同、全局响应式合同和编译审计,再等待 HBuilderX 热更新,最后在 MuMu 复核。
- 视觉截图必须等待页面稳定;拒绝过渡帧、空白页、错误路由、未加载完成和被软键盘意外遮挡的截图。
- MuMu WebView 调试端口在上次环境为 `9223`,每次导航后 target ID 都可能变化,可用以下命令重新查询:
```powershell
curl.exe -s http://127.0.0.1:9223/json
```
- CDP 只能辅助导航、读取 DOM 和逻辑状态;最终视觉结论必须来自 ADB 获取的 MuMu 屏幕截图。
## 8. 后续开发必须继续遵守的原则
- 整个项目自适应,不接受只针对某个尺寸的单页补丁。
- 内容高度由内容决定。
- 弹窗只使用视口最大高度和内部滚动。
- 不通过压缩字号、降低行高或随意缩小按钮掩盖布局错误。
- 每个确认问题先提出五个可行方案,比较全局合同、回归风险、影响范围、维护成本和 MuMu 可验证性,再自主选择最优方案。
- 共享规则必须由唯一公共所有者持有;页面不得复制九宫格切片、密码规则或共享弹窗高度公式。
- 修改合同必须同时更新唯一所有者、运行代码、验证器、测试和文档,删除旧路径,不保留“以防万一”的兼容读取。
- 页面提示文案不得使用“汤正华堂侄”等具体姓名示例,应使用“某某某堂侄”等通用提示;已有 fixture/mock 数据本身无需清理。
- 不重复修改已经通过的 G01—G10,除非有明确证据证明全局改动造成回归。
- 不执行 `git add``commit``push``restore``checkout``reset` 等 Git 变更操作。
- 不删除或覆盖用户现有改动、未跟踪文件、资产、测试和文档。
## 9. 下一阶段推荐入口
响应式和第一轮专家优化已完成。下一阶段不要重新做全项目响应式迁移,优先从已记录但尚未进入第一轮实现的产品深化项中选择:
1. **导航栈语义统一**:区分 `navigateTo``redirectTo``reLaunch``switchTab` 的业务边界,避免深层页面堆栈和错误返回。
2. **短信验证码完整状态机**:发送、倒计时、重发、失败、过期、提交锁定及页面离开清理。
3. **跨页面领域数据持久化**:替换部分只在当前页面生效的演示状态,使创建、编辑、删除后的结果在返回列表时一致。
4. **全局文字层级与可访问性第二轮**:在不缩小字号的前提下统一正文、辅助信息、错误提示和可触控语义。
推荐先处理“导航栈语义统一”,因为它影响页面返回、跨模块入口和后续数据持久化,但实施前仍要先形成独立设计与迁移计划。不要一次混合实施以上四项。
## 10. 新会话首次回复必须报告
接管者完成阅读和只读检查后,先向用户报告:
1. 读到了哪些当前权威文件。
2. 当前已经完成到哪里。
3. 五个核心验证和全量合同是否仍通过。
4. Vue 覆盖是否仍为精确相等,禁用规则是否仍为零。
5. MuMu 是否在线、实际设备序列号、尺寸和 density。
6. 准备从哪个第二阶段深化项开始,以及为什么。
在这些事实没有核对前,不要一上来修改代码。
## 11. 可直接复制到新会话的提示词
```text
请全程使用中文。项目根目录是:
【替换成新电脑上的 jiapuapp 绝对路径】
开始前必须完整阅读:
1. AGENTS.md
2. docs/换机继续任务交接_2026-07-22.md
3. docs/superpowers/specs/2026-07-21-project-wide-responsive-layout-design.md
4. docs/superpowers/plans/2026-07-21-responsive-foundation-phase-1.md
5. tests/responsive-layout-coverage.json
6. styles/adaptive-frame-profiles.scss
7. docs/superpowers/plans/2026-07-21-project-wide-audit-and-expert-optimization.md
8. docs/superpowers/specs/2026-07-21-whole-product-enrichment-design.md
9. docs/superpowers/plans/2026-07-21-whole-product-enrichment-implementation.md
当前全项目响应式、G10 后续页面 MuMu 审核、两位专家评审和第一轮六个优化批次已经完成。不要重新推翻已通过设计,不要回到 G01/G10 重新开始。两位专家 Dirac 与 Leibniz 已完成工作,不要重复创建。
先运行并报告:
powershell -ExecutionPolicy Bypass -File tests/adaptive-frame-profiles-contract.ps1
powershell -ExecutionPolicy Bypass -File tests/project-responsive-layout-contract.ps1
powershell -ExecutionPolicy Bypass -File tests/ag-responsive-surfaces-contract.ps1
powershell -ExecutionPolicy Bypass -File tests/compile-audit.ps1
node tests/password-policy-runtime-smoke.js
然后运行全部 tests/*.ps1,并核对:
- 实际 Vue 与 tests/responsive-layout-coverage.json 是否完全相等;
- 是否仍有 100% 100% no-repeat
- Vue 是否仍直接写 border-image-slice
- MuMu 是否在线及其实际尺寸、density。
只使用 MuMu 做视觉审核,不使用浏览器截图代替;不要启动或关闭模拟器,不要擅自修改模拟器尺寸。不要执行任何 Git 变更操作,不要删除或覆盖现有文件。
下一阶段优先评估“导航栈语义统一”。遇到真实问题时提出五个方案,自主选最优方案;修改前写失败合同,修改后必须在 MuMu 复核。先报告读到的内容、当前完成状态、测试、覆盖、MuMu 状态和下一步,不要一上来改代码。
```
## 12. 交接完成判定
新电脑满足以下条件后,才算成功接管:
- 能完整打开项目且正式资产没有缺失。
- 五个核心验证通过。
- 全部 PowerShell 合同通过,或明确列出只在新环境失败的合同及根因。
- Vue 覆盖精确相等,两个禁用扫描为零。
- HBuilderX 能把项目热更新到用户当前 MuMu。
- MuMu 截图中的 G10、T01、G01 或另一个代表页与本轮视觉基线一致。
- 接管者能准确复述唯一所有者、禁止事项和下一阶段入口,没有回退到旧 H5 审核停点。