Conversation
Signed-off-by: VUVUDOG <gtan2008@gmail.com>
Signed-off-by: VUVUDOG <gtan2008@gmail.com>
|
| (patch.title !== undefined && (!patch.title.trim() || patch.title.length > 500)) || | ||
| (patch.status !== undefined && !["active", "archived", "deleted"].includes(patch.status)) || | ||
| (patch.pinnedAt != null && !Number.isFinite(Date.parse(patch.pinnedAt)))) fail("INVALID_PARAMS"); | ||
| const updated = { ...current, ...patch, updatedAt: new Date().toISOString() }; |
There was a problem hiding this comment.
模拟写入改变任务排序
模拟端执行 patch-meta 时,总会把 updatedAt 改成当前时间;真实桌面端的这条写入路径不更新时间。仅取消置顶或重命名一个旧任务,就会让它在模拟列表中变成最近活动任务,影响列表排序的验收结果。
| const updated = { ...current, ...patch, updatedAt: new Date().toISOString() }; | |
| const updated = { ...current, ...patch }; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile/src/debug/visualMockSessionState.ts
Line: 43
Comment:
**模拟写入改变任务排序**
模拟端执行 `patch-meta` 时,总会把 `updatedAt` 改成当前时间;真实桌面端的这条写入路径不更新时间。仅取消置顶或重命名一个旧任务,就会让它在模拟列表中变成最近活动任务,影响列表排序的验收结果。
```suggestion
const updated = { ...current, ...patch };
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| do { id = "visual-tag-" + ++this.nextTagId; } while (this.tags.some((t) => t.id === id)); | ||
| id = request.presetId ?? id; | ||
| if (this.tags.some((t) => t.id === id)) fail("ALREADY_EXISTS"); | ||
| this.tags.push({ id, name: request.name.trim(), color: request.color, favoriteOrder: order, |
There was a problem hiding this comment.
模拟标签颜色与真实接口不一致
使用合法的 none 颜色创建或修改标签时,模拟接口会原样保存并返回 none,还将它列入 supportedColors。真实接口会将它转为 white,且不会将 none 列为可用颜色。这使模拟模式无法可靠验收白色标签的行为。
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile/src/debug/visualMockSessionState.ts
Line: 78
Comment:
**模拟标签颜色与真实接口不一致**
使用合法的 `none` 颜色创建或修改标签时,模拟接口会原样保存并返回 `none`,还将它列入 `supportedColors`。真实接口会将它转为 `white`,且不会将 `none` 列为可用颜色。这使模拟模式无法可靠验收白色标签的行为。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| {pinnedCollapsed && pinnedRunningCount > 0 ? ( | ||
| <Text style={styles.pinnedCount} numberOfLines={1}> | ||
| {t('session.row.pinnedRunning', { count: pinnedRunningCount })} | ||
| </Text> |
There was a problem hiding this comment.
运行摘要未进入无障碍标签
收起时新增的“运行中”数量只显示在标题栏内,但标题栏是一个带有显式 accessibilityLabel 的按钮,该标签仍只包含置顶总数。屏幕阅读器访问按钮时无法获知运行中数量;请将该摘要加入收起态的无障碍标签。
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/mobile/src/session/HomeSurface.tsx
Line: 2706-2709
Comment:
**运行摘要未进入无障碍标签**
收起时新增的“运行中”数量只显示在标题栏内,但标题栏是一个带有显式 `accessibilityLabel` 的按钮,该标签仍只包含置顶总数。屏幕阅读器访问按钮时无法获知运行中数量;请将该摘要加入收起态的无障碍标签。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
本 PR 命中维护者确认门(产品 / UI 变更 + 审查规则文档变更),需要维护者确认后才能继续走自动审查与合并流程。
讨论 issue:#5209 确认方式:请维护者直接在本 PR 上 Approve;如需修改请 Request Changes,作者改完后再 Approve。 |
Signed-off-by: VUVUDOG <gtan2008@gmail.com>
这次改了什么
摘要
手机端置顶任务此前主要依赖行尾小图标,与普通任务区分不够明显。现在置顶任务共享绿色圆角分区,收起后只保留绿色标题栏、数量和展开入口,支持深浅主题。
同时修复验收中发现的两个问题:模拟标签接口返回不完整导致「更多」菜单崩溃;取消置顶完成后,较早的列表响应可能覆盖新状态。
评审修正:mock 元数据修改保留 updatedAt,旧标签颜色 none 在创建/更新时归一为 white 且不列入 supportedColors;收起置顶栏的无障碍名称包含正在运行的任务数。
变更类型
feat新功能fix缺陷修复docs / test文档与测试范围
UI 变化
docs/design-rules/DESIGN.md§2 “Mobile pinned task group (user-approved 2026-09-28)”及 §5 交互约束。独立语义 token 同时定义深浅色;展开/收起圆角限定在置顶分区,标题点击区域至少 44px,收起高度 52px;保留虚拟列表与滑动操作,普通任务背景不变。怎么验证的
自动验证
corepack pnpm --filter mobile typecheck:通过。corepack pnpm --filter mobile exec vitest run src/__tests__/visualMock.test.ts src/__tests__/homeSections.test.ts src/__tests__/remoteSessionStore.test.ts:298 项通过(含 updatedAt 保持不变、none 创建/更新/关联读取归一化回归)。node scripts/check-dco.mjs --base origin/main --head HEAD:三个 commit 均通过签名检查。git diff --check:通过。手工验证
feat/mobile-pinned-section;Metro 8081 属于当前 checkout,验收源码标识为f0fa3f763+7839e5d2a0,修改后确认新iOS Bundled。该记录对应此前视觉验收;2026-09-29 的 P2 修正完成自动验证,未重新进行模拟器完整走查。b9981f81167645b5a76b397e422cd492e20ba6a7。标准 whoami 只枚举默认设备集合,因此单独核验专用设备原生安装;Metro 检查为 target-fresh。未执行的验证
风险
风险分类
影响与回滚
提交前检查