267 Commits

Author SHA1 Message Date
xfy
4eadc479eb feat: 添加 testTag 基础设施,扩展 Baseline Profile 覆盖路径
为 CalendarPager、BottomCard、FAB、工具页、日期检查器等关键 UI 元素添加 testTag,
启用 testTagsAsResourceId 支持 UI Automator 通过 resource-id 定位。
BaselineProfileGenerator 使用 testTag 选择器重写,覆盖工具页、日期检查器、
DatePicker 等更多导航路径。清理 DEVELOPMENT.md 移除已过时的性能瓶颈描述。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 10:03:16 +08:00
xfy
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
xfy
20425e392c fix: 恢复折叠动画 Phase 2 下方行偏移,移除 showWeekPager 切换
- 恢复 CalendarMonthPage 中 isBelow 行的 `- phase2 * belowRowsHeight`
  (2592a5f 误删导致展开时下方行原地淡入而非滑出)
- 移除 CalendarMonthView 的 showWeekPager + AnimatedContent 切换
  (完全折叠后下拉拖拽时只显示 WeekPager 单周,上下空白)
- 回退到始终显示 CalendarPager,由 CalendarMonthPage 处理折叠动画
- 添加详细动画调试日志(Page/WeekRow/View 三层)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:39:40 +08:00
xfy
2592a5fa55 feat: 使用 AnimatedContent 平滑切换 CalendarPager ↔ WeekPager
- 用 AnimatedContent 包装 pager 切换,添加 fadeIn/fadeOut 过渡
- 延迟 50ms 切换避免折叠 spring 动画期间的视觉跳跃
- 修复 WeekRow 下方行的 yOffset 计算(移除 phase2 项)
- WeekPager 添加农历缓存支持
- 添加折叠动画调试日志

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 14:18:50 +08:00
xfy
4c53f234cf fix: 去掉 CalendarPager ↔ WeekPager 切换,修复折叠闪烁
CalendarPager 在 collapseProgress=1.0 时只渲染 anchor 行,
效果和 WeekPager 相同,但避免了切换导致的视觉跳跃。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 13:54:02 +08:00
ea7558dec8
Merge pull request #9 from xunrua/main
优化年月切换卡顿
2026-05-26 09:37:41 +08:00
xfy
47876a233b feat: 添加 PowerShell 性能追踪脚本
一键抓取 Perfetto trace、帧统计、内存信息并生成 Markdown 报告

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 08:12:48 +08:00
meyou
dfb820d610
Revert "feat: 添加年月滚轮选择器,支持触觉反馈"
This reverts commit bbe51051ae83d56fda8ad965f7b73a014ddea7b8.
2026-05-26 07:33:15 +08:00
meyou
0b6d9ea87a
fix: 滚轮选择器仅在滚动停止后触发选中变更和触觉反馈
快速滑动时不再每帧更新 selectedIndex,改为等滚动停止后
计算最终中心项再触发回调,消除来回抽搐问题。
2026-05-25 23:38:59 +08:00
meyou
bbe51051ae
feat: 添加年月滚轮选择器,支持触觉反馈
- 新增 WheelPicker composable:惯性吸附 + 触觉反馈滚轮
- 新增 MonthYearPickerDialog:年月双滚轮选择弹窗
- 新增 YearPickerDialog:年份滚轮选择弹窗
- MonthHeader:点击年月文字弹出年月选择器
- YearHeader:点击年份文字弹出年份选择器
- 滚动时触发 HapticFeedbackConstants.CLOCK_TICK 触觉反馈
2026-05-25 23:34:25 +08:00
meyou
6fac313fdf
perf: 延迟 YearGridView 文本测量到第二帧,补充性能分析文档
YearGridView 首帧 168ms 中约 24ms 来自 remember 同步文本测量。
将 dayLayouts/titleLayouts/weekdayLayouts 改为 produceState,
首帧 Canvas 渲染为空(sharedElement 结构不变),第二帧填充内容。

DEVELOPMENT.md 补充已知性能瓶颈分析和 Baseline Profile 覆盖建议。
2026-05-25 23:19:58 +08:00
meyou
ce84c614de
fix: 恢复 AnimatedGif 弹跳动画和 YearGridView 全量 sharedElement
- AnimatedGif: 恢复原始 scale 弹跳入场动画,仅保留 repeatCount 限制
- YearGridView: 恢复所有 12 个月的 sharedElement,保证点击任意
  月份都有正确的共享元素转场动画
- CalendarPager: beyondViewportPageCount 1→0 保留(无视觉影响)
2026-05-25 23:06:15 +08:00
meyou
5158b99800
perf: 优化年月切换卡顿
Perfetto trace 分析:
- YearGridView 首帧 168ms: 12 个 MiniMonth 各创建 sharedElement
  节点,但仅 1 个 key 匹配 CalendarPager
- compose:lazy:prefetch 最长 703ms: CalendarPager 预加载相邻页

修复:
- YearGridView: 仅选中的月份使用 sharedElement(11→1 个),
  减少首次组合的 modifier 节点创建开销
- CalendarPager: beyondViewportPageCount 1→0,消除预加载卡顿
2026-05-25 22:57:18 +08:00
meyou
80ab328906
perf: 限制 WebP 动画重复次数并简化入场动画,减少帧丢失
Perfetto trace 分析显示 75.6% 帧延迟,根因为 250x250 WebP
持续以 11-14 FPS 无限循环解码。每次解码周期导致 4-26 帧延迟。

- AnimatedGif: repeatCount(2) 限制动画播放 3 次后停止
- AnimatedGif: 移除两阶段弹跳动画,改为 150ms 淡入
- README: 添加构建命令和产物路径
2026-05-25 22:43:45 +08:00
meyou
a84e1b9528
fix: 移除农历初一月份名称重复的后缀"月"
lunarMonth.getName() 返回的月份名称已包含"月"字,
如"三月"、"四月",无需再手动拼接。
2026-05-25 22:01:06 +08:00
xfy
bb0a72006d revert: 回退 graphicsLayer 优化,实机 GPU 合成开销过大
graphicsLayer 创建的离屏 layer 在实体机上导致 slow draw commands 激增,
整体体验比重组更卡。回退以下改动:

- WeekRow: graphicsLayer → offset + alpha
- CalendarPager: graphicsLayer → alpha
- WeekPager: graphicsLayer → alpha
- YearGridView: graphicsLayer → alpha
- BottomCard: graphicsLayer → offset + alpha
- layoutReady: graphicsLayer → alpha

保留的优化:
- DayCell produceState 上移(42 协程 → 1 协程)
- remember 稳定化 lambda 和计算

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:25:22 +08:00
xfy
73b176a95e perf: remember 稳定化 lambda 和计算,减少重组传播
- weekNumber: remember(selectedDate) 缓存 getIsoWeekNumber 结果
- onDateClick/onMonthChanged/shiftKindAt: remember 稳定化,避免每次重组创建新 lambda
- onRowHeightMeasured: remember 稳定化

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:58:46 +08:00
xfy
6a4907f465 perf: layoutReady alpha() → graphicsLayer
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:55:15 +08:00
xfy
4664d352bd cleanup: 移除 CalendarMonthView 冗余的 offset 导入
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:51:12 +08:00
xfy
297a7a54d4 perf: 年视图/BottomCard alpha+offset → graphicsLayer
- YearGridView crossFadeAlpha: alpha() → graphicsLayer(年视图翻页淡入淡出)
- BottomCard slideProgress: offset()+alpha() → graphicsLayer(年视图切换滑出)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:50:02 +08:00
xfy
55000f64c9 perf: WeekPager alpha() → graphicsLayer 避免滑动重组
与 CalendarPager 同样的问题:周视图滑动时 alpha 每帧变化触发重组。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:48:09 +08:00
xfy
01a7d7aed8 perf: CalendarPager alpha() → graphicsLayer 避免滑动重组
月份切换滑动时 pageOffset 每帧变化,alpha() Modifier 触发重组。
改用 graphicsLayer 在 draw 阶段更新透明度,跳过 Composition/Layout。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:47:04 +08:00
xfy
da46204de4 perf: DayCell produceState 上移到页面级,减少协程数量
CalendarMonthPage 统一预计算整月 42 天的 lunarData(1 个协程),
通过参数传入 DayCell,避免每个单元格独立启动 produceState(42 协程)。

- holidayBadges produceState 扩展为 lunarDataMap,存储完整 DayCellInfo
- DayCell 添加可选 lunarData 参数,条件分支调用 DayCellImpl
- WeekPager 保持向后兼容(不传 lunarData 时内部获取)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:44:06 +08:00
xfy
e175bb07da perf: WeekRow 改用 graphicsLayer 避免折叠动画重组
将 offset() + alpha() 替换为 graphicsLayer { translationY / alpha },
collapseProgress 变化时跳过 Composition/Layout,仅更新 Draw 阶段。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:38:04 +08:00
xfy
6ab63eae53 fix(profile.sh): 修复帧率和内存数据提取逻辑
- Janky frames 百分比:grep -oP 替换为 BSD awk 兼容的 substr+index
- Slow UI thread / Slow draw commands / High input latency:改用 $NF 提取最后一个字段,
  避免 "Slow UI thread" 等中间空格导致 awk 列错位
- Java Heap / Native Heap:改用 $3 提取,避免 "Java Heap:" 中 $2 是 "Heap:" 而非数值
- 所有指标改用 awk + exit 取第一个匹配(整体统计),避免 tail -1 取到 per-window 数据

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:27:21 +08:00
xfy
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
xfy
28f777abe4 perf: 优化 Compose 渲染性能
- DayCell: 5 个 animate*AsState 合并为 updateTransition,减少 80% 动画状态对象
- CalendarMonthPage: produceState/remember key 从 List/Map 改为 year/month 原始值
- CalendarPager: derivedStateOf 提取 currentPageOffsetFraction,beyondViewportPageCount 设为 1
- CalendarViewModel: 三层嵌套 combine 扁平化为 6 参数 combine

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 15:36:18 +08:00
xfy
e934d33cfa cleanup: ComposeTrace 仅在 debug 构建中启用
- core/build.gradle.kts: 启用 buildConfig 生成
- ComposeTrace: 添加 BuildConfig.DEBUG 条件,release 构建中空操作
  避免 R8 full mode 下 Trace 调用的生产环境开销

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 15:15:29 +08:00
xfy
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
xfy
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
xfy
57eae41c65 feat: 日期检查器页面实现商品过期检查功能
- 顶部生产日期选择器(TextField + DatePickerDialog)
- 默认三行(30/60/180天),天数与到期日期双向联动
- 滑动删除行
- 底部右侧 FAB 添加新行
- 日期格式 ISO YYYY-MM-DD

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:58:17 +08:00
xfy
93c02810bf feat: 工具页面添加"日期检查器"入口,支持跳转详情页
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:24:12 +08:00
xfy
e30540b2dc feat: FAB 菜单添加"工具"入口,跳转空白工具页面
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:20:36 +08:00
xfy
134fc5a9c6 fix: 排班标记添加圆形底,避免与选中圆环重叠
- 将右上角排班 Text 包裹在 Box 中
- Box 添加 CircleShape + 背景色,遮挡选中状态的描边圆环
- 非选中时背景色与 cell 背景一致,视觉上仍是裸文字

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:12:58 +08:00
xfy
e97909ec34 feat: 法定假日改为背景色显示,支持连续边缘圆角
- 移除右上角 Text 角标,改用整格淡色背景("休"淡红、"班"淡蓝)
- 连续假日自动边缘圆角:开头左边、结尾右边、中间无、单个四边
- 排班标记固定右上角,不再随 showLegalHoliday 切换位置

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:06:38 +08:00
xfy
b1185da27a feat: 个人排班标记改为淡色圆形底+居中文字
- showLegalHoliday=true 时左上角标记改为 16dp 圆形淡色底
  背景 alpha 0.12,文字用原色居中
- showLegalHoliday=false 时保持右上角无背景直接浮于单元格
- 移除不再使用的 RoundedCornerShape import

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 00:01:57 +08:00
xfy
7f639f6c24 feat: FAB 菜单添加"显示调休"切换,修复个人排班标记样式
- CalendarViewModel 新增 toggleShowLegalHoliday() 方法
- FAB 菜单新增"显示调休"选项,选中高亮反馈开关状态
- DayCell 修复 showLegalHoliday=true 时个人排班标记样式:
  从"浅色背景+浅色文字"改为"accent 色实心胶囊+白色文字"
  默认模式(showLegalHoliday=false)恢复为无背景、直接浮于单元格

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 19:57:43 +08:00
xfy
8e65ae6f94 build: 缩小 app_icon 为 512x512 并转为 WebP,节省 446KB
原 2048x2048 PNG (457KB) → 512x512 WebP (11KB)。
同步更新 Platform.kt 中的资源引用。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 18:26:14 +08:00
xfy
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
xfy
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
xfy
5acad54384 build: 集成依赖更新检查与自动升级工具
- 添加 ben-manes/gradle-versions-plugin(0.54.0)用于检测依赖更新
- 添加 nl.littlerobots/version-catalog-update(1.1.0)用于自动升级版本目录
- 升级 Compose BOM 2025.05.01 → 2026.05.01
- 升级 profileinstaller 1.4.0 → 1.4.1
- 版本目录按字母顺序重新排序

使用方式:
  ./gradlew dependencyUpdates       # 检查更新
  ./gradlew versionCatalogUpdate    # 自动升级版本号

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 17:31:23 +08:00
xfy
1be1948f49 build: 集成 Spotless 8.5.1 代码格式化工具
- 在版本目录中添加 spotless 插件 8.5.1
- 配置 Kotlin 源码和 Gradle Kotlin DSL 脚本格式化
- 使用 ktlint 引擎,启用 trimTrailingWhitespace 和 endWithNewline

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:37:29 +08:00
xfy
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
xfy
2fc89d08c7 fix: 修复年视图翻页后共享元素转场动画失效
- 移除 baseYearForPager 和 scrollToPage(START_PAGE)
- HorizontalPager 的 pageYear 改用 yearViewYear + 相对偏移计算
- snapshotFlow 改为跟踪 settled page 差值更新 yearViewYear
- 避免再次进入年视图时强制滚动导致动画期间重组

Fixes #8

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 15:46:50 +08:00
xfy
ca02784d39 fix: 月视图和年视图添加背景色,修复共享元素过渡动画
在 CalendarMonthView 的月视图和年视图根布局添加
.background(MaterialTheme.colorScheme.background),确保共享元素
过渡时非共享元素有正确的背景动画(fade+slide)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 14:15:44 +08:00
xfy
0cdac663c9 refactor: 移除 fling 速度阈值,改用 spring 动画驱动折叠过渡
- ViewModel onDragEnd/onExpandDragEnd 移除 velocity 参数
- BottomCard 移除 VelocityTracker,简化回调签名
- CalendarMonthView 添加 animateFloatAsState spring 动画
- 更新单元测试:移除 fling 测试,调整阈值边界

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 13:36:58 +08:00
xfy
7f9db1dc1d perf: 聚合 CalendarUiState 减少 Compose 重组
- ViewModel 新增 CalendarUiState 数据类,通过 combine + stateIn
  将 6 个独立 StateFlow 合并为单一 uiState 流
- CalendarMonthView 从 5 个分散 collectAsState 改为单个
  uiState.collectAsState,减少重组次数
- CalendarPagerArea 改为显式传参,解耦对 ViewModel 的直接引用
- CalendarMonthPage 中 DayCell 外层包裹 key(dayData.date),
  稳定跨帧重组

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:09:05 +08:00
xfy
baedf878b4 perf: 动画性能优化 + 性能追踪工具
- CalendarMonthPage: 提取 WeekRow 子 Composable,graphicsLayer → offset + alpha
- DayCell: updateTransition → 独立 animateFloatAsState/animateColorAsState,
  共享 MutableInteractionSource 减少重组
- CalendarMonthView/WeekPager: graphicsLayer → offset + alpha,共享 interactionSource
- DEVELOPMENT.md: 补充性能追踪使用说明
- scripts/profile.sh: 新增 Perfetto trace 一键抓取脚本

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 10:29:58 +08:00
xfy
fb7e19ddc9 test: Wave 4 — 补充 fling 速度阈值交互测试
- test: onDragEnd 高速上滑强制折叠(无视 progress 阈值)
- test: onDragEnd 高速下滑强制展开(无视 progress 阈值)
- test: onExpandDragEnd 高速下滑强制展开
- test: onExpandDragEnd 高速上滑保持折叠

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:18:34 +08:00
xfy
6f4d62b78f refactor: Wave 3 — ViewModel 解耦 Compose 运行时,迁移到 StateFlow
- refactor: CalendarViewModel 从 mutableStateOf/Animatable 迁移到 StateFlow
- refactor: 继承 Android ViewModel,使用 viewModelScope 管理生命周期
- refactor: 拖拽/动画方法改为同步修改 StateFlow(移除协程 launch)
- refactor: onDragEnd/onExpandDragEnd 实现 fling 速度阈值判断
- refactor: BottomCard 解耦为纯参数驱动
- refactor: CalendarMonthView 使用 viewModel() + collectAsState()
- test: 适配 StateFlow API,139 测试全部通过

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:16:20 +08:00