fix(mobile): inkSubtle 三主题达 WCAG AA 对比度 - #1737
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
988d60b to
5e95c56
Compare
dark/oled inkSubtle #666875 在 canvas 上仅 2.92:1,远低于 AA 4.5:1;light #8a8d98 也仅 3.12:1。dark/oled 提到 #8a8d98(4.90:1),light 降到 #6b6e78(4.65:1),17 处消费点(ListRow/SearchField/ChatScreen 等 meta 文本)恢复可读。新增 WCAG 对比度计算器与断言测试。 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
Co-authored-by: Cursor <cursor@vectorcontrol.tech>
5e95c56 to
69e9697
Compare
背景
移动端
inkSubtle在三主题上均低于 WCAG AA 4.5:1:dark/oled#666875在 canvas 上仅 2.92:1,light#8a8d98仅 3.12:1。inkSubtle被ListRow、TasksScreen、ChatScreen、SearchField(placeholder)、ThreadsScreen等 17 处消费点用于 meta/caption 文本。component-acceptance.md§4 明确「muted 文本不低于 4.5:1」。同时这是 token 漂移——web--text-3已有 AA 注释。变更
app/mobile-rn/src/theme/tokens.ts:dark/oledinkSubtle从#666875提到#8a8d98(dark canvas 4.90:1,oled canvas 6.34:1);light 从#8a8d98降到#6b6e78(4.65:1)。三主题均 ≥ 4.5:1 且保持 ink > inkMuted > inkSubtle 层级。app/mobile-rn/src/theme/tokens.test.ts:新增hexToRgb/relativeLuminance/contrastRatioWCAG 计算器与keeps inkSubtle at or above WCAG AA contrast (4.5:1) on canvas for every theme断言,防止未来回归。证据
real_tested=false:单元测试覆盖对比度数学;未在真机/模拟器截图。corepack pnpm --filter agenthub-mobile-rn test(351 passed, 27 files)全绿。关联
审计 P0-2:mobile inkSubtle 对比度不达 AA。