|
|
c591bc389b
|
docs: 修复代码审查发现的问题(README 坏链 + 原图归宿说明)
审查发现 2 个问题:
1. README.md:6 坏链 [必须修]
- <img src="app/src/main/assets/app_icon.png"> 指向 Task 1 已删的 PNG
- 改为 core/src/main/assets/app_icon.webp (现存的应用内图标, 512px)
- 加 width/height=128 限制展示尺寸 (原图无尺寸约束会撑满)
2. app/assets/AGENTS.md 原图归宿说明模糊 [建议修]
- 原写"源文件放仓库外或 .assets-source/" 但两者都不存在, 误导
- 改为明确: 原图 app_icon_original.png (2048px) 保留在 git 历史
commit a36f6c4, 用 git show 恢复, 生成脚本见实施计划 Task 5
审查驳回的建议 (附理由):
- <mipmap> 间接引用: 审查自承"通常能工作", 且 Task 5 已模拟器实机
验证渲染正常 (analyze_image 确认黄色主体居中无裁切)。
<mipmap> 标签按密度选桶是启动器前景的标准做法, 不改。
- baseline-prof lambda hash: Task 3 commit 已说明"下次 updateBaselineProfile
校准", 且 hash 失效是静默降级不报错, 不阻塞合并。
验证: ./gradlew :app:assembleDebug → BUILD SUCCESSFUL
|
2026-06-15 14:13:26 +08:00 |
|
|
|
6e1c2a39ae
|
docs: 校正 assets AGENTS.md,消除 GIF/镜像等错误描述
问题
- 4 份 assets/AGENTS.md 与 Task 1-5 后的实际状态全部相反:
- 声称 core/app "内容同步/镜像" → 实际职责不同 (core 管 UI/WebP, app 管启动器)
- 声称文件是 .gif → 实际是 .webp 动画
- 声称由 AnimatedGif 加载 → 实际是 AnimatedWebp
- app/assets/gifs/ 只剩过时 AGENTS.md (PNG 已被 Task 1 删)
改动
- core/assets/AGENTS.md: 移除"与 app 镜像"错误说法, 说明职责划分, 列 app_icon.webp
- core/assets/animations/AGENTS.md: GIF→WebP 正名, 说明构建期扫描机制 + 测试守卫,
保留"历史命名曾为 gifs/"历史说明
- app/assets/AGENTS.md: 反映清理后为空, 警告勿再放图标源 PNG
- 删除 app/assets/gifs/ 过时空目录 (仅剩 1 个过时 AGENTS.md)
验证
- grep 全 assets 无真正错误描述 (剩余命中均为有意的纠正/历史说明)
- ./gradlew :app:assembleDebug → BUILD SUCCESSFUL
|
2026-06-15 14:08:18 +08:00 |
|
|
|
ac41eef37b
|
feat: 新增 Adaptive Icon(anydpi-v26),修复 API 26+ 启动器裁切
问题
- minSdk 24, 但只有 mipmap-*/ic_launcher.png (无 anydpi-v26)
- ic_launcher.png 与 ic_launcher_round.png MD5 完全相同, 圆形版只是方形副本
- API 26+ 用户在 OEM 圆形/水滴/方形启动器上图标会被硬切, 主体缺失
新增资源
- drawable/ic_launcher_background.xml: 矢量色块 #83D0F1 (原图四角采样 RGB 131,208,241)
- drawable/ic_launcher_foreground.xml: <mipmap> 引用密度分桶位图
- mipmap-anydpi-v26/ic_launcher.xml + ic_launcher_round.xml: adaptive-icon 定义
(含 <monochrome> 支持 Android 13+ 主题化图标)
- mipmap-{xhdpi,xxhdpi,xxxhdpi}/ic_launcher_foreground.webp:
从 app_icon_original.png (2048px) 中心裁 80% + cwebp -q 90 生成
体积比对应 ic_launcher.png 小 60-70% (xxhdpi: 7.4KB vs 22.5KB)
设计决策
- foreground 用位图而非矢量: 原图主体是写实风格, 矢量化会损失质量
- foreground 源图用 git 历史临时恢复生成, 不重新入库 (保持 Task 1 清理成果)
- 保留 mipmap-*/ic_launcher.png 作 API 24-25 回退 (不删)
- AndroidManifest.xml 无需改: @mipmap/ic_launcher 在 API 26+ 自动取 anydpi-v26
设备验证 (emulator API 37, Pixel Launcher)
- 安装 + 回桌面, hotseat 最右 YaYa 图标显示正常
- analyze_image 确认: 圆形遮罩下背景填满, 黄色主体居中无裁切
- 颜色与原设计一致 (主体 RGB~254,213,74, 背景 #83D0F1)
构建验证
- unzip -l 确认 APK 含 anydpi-v26/*.xml + drawable/ic_launcher_*.xml + 各密度 foreground.webp
- ./gradlew :app:assembleDebug → BUILD SUCCESSFUL
- APK 累计 -489KB (baseline 24,416,752 → 23,915,694, 主要是 Task 1 删 PNG)
|
2026-06-15 14:06:21 +08:00 |
|
|
|
3d39e609df
|
chore(app): 删除 app/assets 中无引用的 app_icon PNG 图标
问题
- app/src/main/assets/app_icon.png (61KB) 与 app_icon_original.png (468KB)
无任何代码引用(grep 全仓库确认),但作为 assets/ 文件会被原样打进 APK
- 实际应用内图标用的是 core/src/main/assets/app_icon.webp
(Platform.kt:15 getAppIconUri() 引用),与这两个 PNG 无关
验证
- grep -rn "app_icon_original\|assets/app_icon\.png" app/src core/src
→ 无输出(仅 AGENTS.md 提及,已排除)
- unzip -l 对比: assets/ 总量 4,286,121 → 3,757,710 字节(-528,411B ≈ 516KB)
- ./gradlew :app:assembleDebug → BUILD SUCCESSFUL
影响
- 设备安装体积减少 ~516KB(APK 是 ZIP, PNG 已压缩, 故 APK 文件本身仅 -139B;
但 assets 安装时解压展开, 设备占用是实打实少 516KB)
- 不影响任何运行时行为
|
2026-06-15 13:52:21 +08:00 |
|
|
|
a36f6c41e1
|
docs: 更新 README 为纯 Android 描述,调整 CHANGELOG 顺序,添加 RELEASE.md 与图标资源
|
2026-06-02 13:43:47 +08:00 |
|
|
|
5b5d780593
|
release: v1.1.0
|
2026-06-02 13:29:41 +08:00 |
|
|
|
f34e34e5ae
|
feat: 引入 YaYaTheme 并应用到所有 Activity
新增 Theme.kt 提供 Android 12+ 动态颜色支持,
为全部 5 个 Activity 的 setContent 包裹 YaYaTheme。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-06-01 13:25:27 +08:00 |
|
|
|
9a0222b4a2
|
perf: 引入 logd 条件日志工具,增强动画调试并优化 sharedElement 缓存
- 新增 AnimLog.kt,提供 BuildConfig.DEBUG 条件控制的 logd 日志工具,
支持 lambda 延迟求值以避免 release 模式下的字符串拼接开销
- 全模块替换 android.util.Log.d 为 logd,并将日志重构为 lambda 形式
- CalendarViewModel: toggleYearView / selectMonthFromYearView 添加纳秒级
耗时追踪日志
- CalendarMonthView / CalendarMonthPage / CalendarPager / YearGridView:
增加重组/进入/离开/页面切换/动画状态变化的详细调试日志
- 折叠动画/滑动进度日志添加状态去重,避免频繁重复输出
- P0: 缓存 sharedElement tween 实例(CalendarMonthView + YearGridView),
避免每次重组创建新实例导致动画重新计算
- P0: YearPager pageYear 使用 remember 稳定计算,避免 settledPage 与
yearViewYear 不同步导致抖动
- 移除 YearPager crossFadeAlpha,改为无透明度渐变
- app/build.gradle.kts 添加 profileinstaller 依赖
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-26 18:27:07 +08:00 |
|
|
|
a431dcdfbf
|
feat: 添加 trace 构建类型 + 增强性能追踪脚本
- ComposeTrace 改用 BuildConfig.ENABLE_TRACE 控制,release 关闭,debug/trace 开启
- core/app 添加 trace buildType:release 优化(R8 + shrink resources)+ 保留 trace 标记
- CalendarMonthView/WeekPager 添加更多自定义 trace marker,覆盖年月视图切换路径
- profile.sh 增强:
- 添加 --trace 参数支持 trace 构建
- Perfetto 配置增加 gpu.memory 和 surfaceflinger.frametimeline 数据源
- 报告自动提取帧率百分位、jank 比例、内存摘要
- 添加年月视图切换专项分析指南和基线对比方法
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 16:19:21 +08:00 |
|
|
|
dead12fdf4
|
cleanup: 提取 Activity 基类、修复 Compose 状态、精简资源
A. 提取 Activity 共用代码:
- 新增 BaseActivity 基类,统一处理 enableEdgeToEdge 和 slide 转场动画
- 5 个子 Activity 从 ~212 行简化为 ~50 行,减少 150+ 行重复代码
B. 修复 Compose 状态问题:
- BottomCardArea: 移除对 selectedDate/isCollapsed 的独立 StateFlow 订阅,
统一使用 uiState 聚合流
- 替换脆弱的 SideEffect 帧计数器为显式 LaunchedEffect + delay(32)
C. 资源精简:
- 删除 mipmap-mdpi 和 mipmap-hdpi 密度(现代设备已被覆盖)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 15:08:00 +08:00 |
|
|
|
5bac114c16
|
cleanup: 移除冗余依赖、死代码和构建配置
- core: 移除未使用的 uiTooling/uiToolingPreview debug 依赖
- app: 删除冗余 ndk abiFilters、bundle.language、netty pickFirsts
- app: 修复 packaging.excludes 花括号展开语法
- Platform: 删除死代码 AppPredictiveBackHandler 及未使用 import
- CalendarMonthView: 删除重复 import animateFloatAsState
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 14:53:39 +08:00 |
|
|
|
93c02810bf
|
feat: 工具页面添加"日期检查器"入口,支持跳转详情页
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 10:24:12 +08:00 |
|
|
|
e30540b2dc
|
feat: FAB 菜单添加"工具"入口,跳转空白工具页面
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 10:20:36 +08:00 |
|
|
|
9bd1f57daf
|
build: 将 152 个 GIF 动画资源批量转换为 WebP 格式
使用 gif2webp -mixed -mt 批量转换,资源从 5.65MB 降至 3.60MB,
APK release 包从 7.8MB 降至 5.8MB(减少 26%)。
同步更新:
- 依赖:sketch-animated-gif → sketch-animated-webp
- 代码:GIF_FILES → WEBP_FILES,getGifUri → getWebpUri
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-22 18:04:36 +08:00 |
|
|
|
e02459e8c9
|
build: 删除未引用的 kotlin-test 条目,移除 @Preview,uiTooling 改为 debugImplementation
- 删除 libs.versions.toml 中未被任何模块引用的 kotlin-test 孤儿条目
- 移除所有 @Preview 注解和 Preview 函数(5 个文件)
- app/core 模块的 compose-uiTooling 从 implementation 改为
debugImplementation,避免打包到 release APK
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-22 17:53:05 +08:00 |
|
|
|
dd072730f1
|
fix: 年视图 pageYear 使用 settledPage 计算,修复滑动切换时年份闪烁
pageYear = yearViewYear + (page - settledPage) 代替 currentPage,
因为 yearViewYear 由 settledPage 驱动,两者始终同步。
用 currentPage 会在滑动过半时出现不匹配,导致小月份
短暂显示错误年份数据。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-22 16:09:42 +08:00 |
|
|
|
98f3b71c4f
|
perf: 升级 Macrobenchmark 至 1.4.1,适配新 API 并重新生成 Baseline Profile
- benchmarkMacro 1.3.4 → 1.4.1
- BaselineProfileGenerator: 使用 Direction 枚举替代坐标 swipe;
用 executeShellCommand 绕过 startActivityAndWait(模拟器 software renderer
不支持 gfxinfo framestats,会导致 amStartAndWait 超时)
- updateBaselineProfile task: 适配 1.4+ 的 startup-prof.txt 文件名格式,
使用 layout.buildDirectory 预先计算路径(configuration cache 兼容)
- 重新生成 baseline-prof.txt(全量 AOT 覆盖)
- benchmark build type 设为 isDebuggable=true(配合模拟器运行)
- 将 Baseline Profile 使用文档从 README 迁移至 DEVELOPMENT.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-21 11:37:37 +08:00 |
|
|
|
2771e3733b
|
perf: 集成 Macrobenchmark 模块,自动生成全量 Baseline Profile
- 新增 :macrobenchmark 模块,提供自动 Baseline Profile 生成
- 扩展 proguard-rules.pro,保留所有业务类方法名确保 profile 匹配
- 全量 AOT 覆盖:冷启动 + 交互路径(年视图、周折叠、关于页等)
- app/build.gradle.kts 新增 benchmark 构建类型
- README 简化 Baseline Profiles 维护指南
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-21 10:50:01 +08:00 |
|
|
|
2028897ce3
|
docs: 同步 AGENTS.md 文档,反映纯 Android 项目结构
- 更新所有层级 AGENTS.md 中的模块描述(:app / :core)
- 移除 KMP/iOS 相关引用,统一为纯 Android + Jetpack Compose
- 同步构建命令和测试路径
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-20 16:46:17 +08:00 |
|
|
|
f5cc4ef2e5
|
refactor: 完成纯 Android 迁移,清理旧 KMP 模块并添加 app/core 新模块
- 删除遗留的 androidApp/、shared/ 等 KMP 结构文件
- 将新的 app/、core/ 纯 Android 模块纳入版本控制
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-20 15:55:08 +08:00 |
|