feat: 引入 miuix 双主题 UI(KMP commonMain,与 Material 3 页面级分流) - #398
Open
zyl6932 wants to merge 246 commits into
Open
Conversation
…avior/Card/Spinner)
merge/kmp 因 miuix 0.9.1 曾把 compileSdk 升到 37,但上游与本地 SDK 环境 对 base android-37 支持不稳(Google 仅发布 android-37.0 minor)。改回与上游 一致的 36,并加 android.experimental.disableCompileSdkChecks=true 跳过 miuix AAR metadata 的 ≥37 门槛。代码只用到 API 36 符号,miuix 运行正常;本地与 CI 均按 36 构建,无需伪平台或 --no-daemon。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
新增 MiuixCommentScreen + MiuixCommentSheet(WindowBottomSheet),复用评论 ViewModel 与主题无关辅助(dfsSimple/formatCommentTime/SwipeToReplyContainer/ClickableImageWithMenu/emoji 等,CommentScreen 内 4 个辅助 private→internal),仅重写 miuix 视觉层。接入想法页、问题页与段评(按 themeStyle 分流,M3 仍走 CommentScreenComponent)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 收藏夹信息流与首页对齐(去重复列表内边距)+收藏数包卡片; 2 评论列表 12dp; 4 导出弹层 miuix 化(MiuixExportSheet, 禁用 PDF 反相, Slider/Switch miuix); 5 分割线信息流竖向 12dp; 7 GitHub token 输入框用占位符去顶部留白; 3 全局 EdgeToEdge 导航栏强制透明消除澎湃小窗白条; 6 搜索浮层返回回到结果(后台 BackHandler 叠加 RESUMED 生命周期门控)。回答页改用 MiuixCommentSheet + MiuixExportSheet。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AutoHideTopBar 包装层只上报当前可见高度,顶栏与内容 inset 用同一 fraction 连续过渡,避免进入/退出时信息流跳变。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…6#441 AIGC投票) 解决冲突:导航相关全部取 fork 的 vendored miuix-nav 实现(ZhihuMain/MainActivity/DesktopZhihuMain/ZhihuMainAndroidContent);PinScreen 删除上游已重命名的 fetchLinkCardPreview(运行时改用 fetchPinLinkCardPreview);AccountData 保留 fork 的 d_c0 预取登录修复;JvmPlatformCapabilities 保留 fork 桌面设置即时生效。适配上游 zly2006#433 移除的包装函数:MiuixArticleScreen 分享/复制改走 shareRuntime+articleActionText、收藏夹时间用 formatArticleDateTime、问题详情预览用 Ksoup 文本。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
回答页更多菜单加「标记疑似 AIGC」+ miuix 弹层(复刻 M3 AigcFlagSheet:积分/进度/有效标记/记名投票/提交);系统与更新设置加「启用 AIGC 标记」SwitchPreference(AIGC_MARKING_ENABLED_PREFERENCE_KEY,默认关)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CommentScreen 内容列底部内边距由 navigationBarsPadding() 改为 navigationBars.exclude(ime),避免与弹层外层 imePadding 叠加:键盘弹出时不再多顶一截导航栏高度形成空隙露出后面的回答页。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
WindowBottomSheet 默认 insideMargin 横向 24dp 与评论列表自带 12dp 叠加成每边 36dp,评论被挤成中间窄条。评论/回复两层弹层都设 insideMargin=DpSize(0,0),评论横向只保留 12dp,与信息流一致。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
新增 MiuixShareSheet、MiuixVotersSheet、MiuixConfirmDialog;分享(想法/问题)、赞同者列表(回答/想法)改用 miuix WindowBottomSheet;收藏夹导出选项+进度、清除历史、清空屏蔽、开发者(剪贴板/Cookie/签名请求/Token/ZSE96)对话框改用 miuix WindowDialog + 组件。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MiuixCommentScreen 点评论作者/被回复者用位置参数 Person(id,name,urlToken),但构造器是 (id,urlToken,name),导致 urlToken=作者名。改为具名参数。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
同步上游 zly2006#438/zly2006#489 清理重构与新功能(写回答/发布想法/想法投票/段间距/ 主标签重选滚动/刷新按钮拖回等)。 冲突解决要点: - 保留本分支 miuix 化与 miuix-nav 迁移(entry<> 导航、ArticleAnswerSlot), 并把上游新增的 WriteAnswer/WritePin 路由接入 entry<> 体系 - HomeScreen/ZhihuMain/HotListScreen 合并 AutoHideTopBar+主题分流 与上游 发想法 FAB、reselect 滚动、新增 tab 入参 - 上游 zly2006#438/zly2006#489 删除了 base KMP 暴露的抽取层 API(remember*Runtime 包、 *UiState/*TestOverrides、tag 函数、BlocklistManager 等),48 个 miuix 文件 全部改用上游清理后的新 API(个体 remember* / 直接 dao / viewModel 状态) - 保留本分支登录 loginHttpClient 修复与鉴权刷新 NPE 防护 assembleLiteDebug / assembleLiteRelease 均通过。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
|
你好,最近有空吗?还打算继续开发吗?谢谢 |
对齐上游 356fdf7 的构建工具链,为后续合并上游 120 个提交做准备。 把工具链升级和合并冲突分开,避免两类错误混在一起。 - Kotlin 2.3.10 → 2.4.0,AGP 9.0.1 → 9.3.1,Gradle 9.5.0 → 9.6.0, Compose 1.11.0 → 1.11.1,KSP 2.3.2 → 2.3.9,aboutlibraries 14.0.1 → 15.0.0, compose-bom 2026.05.00 → 2026.06.00 - compileSdk 36 → 37(app / shared / sentence_embeddings)。AGP 9.3.1 已能直接 解析 minor 版本平台 android-37.0,不再需要 compileSdkMinor 或伪造 base 平台, 故删除 gradle.properties 里的 android.experimental.disableCompileSdkChecks (该项原本只为在 compileSdk=36 下跳过 miuix 的 AAR metadata ≥37 校验) - miuix 0.9.1 → 0.9.3。0.9.3 依赖 Kotlin 2.4.0 + Compose foundation 1.11.1, 与本次工具链严格对齐;不取 0.9.4-rc01,因为它会把 Compose 拉到 1.12.0-rc01 - 删除 vendored 的 squircle SquirclePath.kt:miuix-ui 0.9.3 起会传递引入官方 miuix-squircle,两份同包实现在 R8 阶段报重复类。改用官方实现,只保留官方 尚未提供的 absoluteSquircleClip(vendored miuix-nav 唯一用到的入口)。 官方 SQUIRCLE_CONTROL 是 internal,跨模块不可见,故在本文件内定义同值常量 - 修复 app/shared 两个 build.gradle.kts 的 UTF-8 BOM 与中文注释乱码 (曾被按 GBK 写坏,6 处注释不可读) 验证:assembleLiteDebug / assembleLiteRelease(R8)/ compileKotlinIosSimulatorArm64 全部通过,lite release APK 4.27MB。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
本机此前因非 ASCII 用户名跑不了 ktlint 插件,这批格式违规一直挂在仓库里。
GRADLE_USER_HOME 指到 ASCII 路径后可以正常运行,本次一并清掉。
纯格式改动,无语义变化:AutoHideTopBar 块内缩进、import 排序、
链式调用换行、"${x}" → "$x"。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
合入上游 120 个提交(576 文件),解决 34 处冲突,并把 fork 的 miuix 界面对接到上游 zly2006#489/zly2006#616/zly2006#617 重构后的新 API。 冲突解决的关键取舍: - 导航保留 fork 的 vendored miuix-nav(NavController/NavDisplay/entry<>),丢弃上游的 navigation-compose 一侧;上游所有 hasRoute<X>() 判断改为 currentTopDestination is X, popBackStack() 改为 pop()。 - d_c0 登录修复保留(上游 verifyAndSave 至今没做网页登录 udid 预取),改为预取后调用 上游 accountClient.verifyAndSave(map)。 - rememberSettingBoolean/String 保留(比上游的 remember{} 能响应设置变更),调用点统一用它。 - 跟随上游删除 ZhihuMainPlatformAdapter、ThemeSettingsRuntime、ZhihuMainNavigationState、 rememberFeedBlockActions、ShareDialogRuntime、duo3_nav_style。 miuix 侧功能移植: - ZhihuMain 接入朗读播放器浮层(ReadingPlayerBar / CompactReadingPlayerButton / ReadingQueueSheet + 两个 CompositionLocal)。 - MiuixNotificationScreen 按上游 zly2006#620 的时间线模型重写:分类入口、邀请回答、会话列表。 - MiuixHomeScreen 移植在线首页通知(上游已删除硬编码 QQ 群与内容过滤说明卡片)。 - MiuixFollowTopLevelPage 改为内层 pager,支持左右滑切换推荐/动态。 - 新增 6 条路由:IdentityManagement / ReadingSettings / SettingsSearch / Notification.Entry / Notification.Invitations / Notification.Message。 顺带修复: - ThemeManager.setXxx() 只改内存态,所有调用点补 settings.putXxx() 持久化, 否则主题与 miuix 风格开关重启即丢。 - LocalHomeFeedViewModel 恢复 onLocalItemFeedback(miuix 卡片上下滑反馈), 改用 recommendationEntries 保存整个 entry 以取得 LocalFeed.id。 - 补齐 JVM 缺失的 rememberDeveloperDiagnostics actual 实现。 - ZhihuMainAndroidState 补 MainActivity / LocalActivity import。 - rememberZhihuMainPreferenceState 调用点改用具名参数,避免 trailing lambda 绑到 observedKeys。 - shared-local-db 的 ktlint 不再格式化 Room KSP 产物(Windows 下反斜杠使 exclude 失效)。 验证::shared:compileKotlinJvm 0 错、assembleLiteDebug 与 assembleLiteRelease(R8) 通过、 ktlintFormat 通过。iOS 目标仍失败于上游 vendored 的 markdown-renderer(K/N 后端 IrErrorType 序列化崩溃,与本次改动无关,未走到 :shared)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
按 miuix 设计规范扫描 44 个 ui/miuix 文件后逐条修复。 按钮文字颜色(真实显示缺陷): miuix Button 会把 ButtonColors 的 contentColor / disabledContentColor 经 LocalContentColor 传给内容,写死 Color.White 会让按钮禁用时文字仍是纯白、不随禁用态变暗。 去掉 5 处硬编码白字,改由 ButtonColors 决定。 主按钮配色: 弹窗里「取消 + 确认」的确认按钮原本用默认(次要)配色,与项目自己的 MiuixConfirmDialog 不一致,补上 ButtonDefaults.buttonColorsPrimary():屏蔽关键词/用户/话题的添加与清空、 颜色选择弹层的确认。 滚动回弹: 6 处滚动容器缺 overScrollVertical,补齐——屏蔽设置的三个列表、评论列表、搜索建议、 赞同者弹层。 组件来源: MiuixFollowScreen 误用 M3 的 Icon 与 CircularProgressIndicator,换成 miuix 版本。 以下经确认不改: - MiuixArticleScreen 拖拽预览刻意使用 M3 headlineMedium,与正文页顶栏保持同形, 改用 miuix 字号会在滑动切换时跳变。 - MiuixDailyScreen 的 M3 TextButton 位于 M3 DatePickerDialog 槽位,miuix 无日期选择器。 - MiuixAboutScreen 的列表驱动 logo 视差,加回弹需先看实机效果。 - LazyRow 与 userScrollEnabled=false 的定高列表无需纵向回弹。 验证::shared:compileKotlinJvm、ktlintFormat、assembleLiteDebug、assembleLiteRelease 均通过。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
插桩测试没有被任何构建覆盖:assembleLiteDebug 不编译 androidTest,CI 的 Build Check 也只跑 ktlintCheck / test / assembleFullDebug / assembleLiteDebug,所以合并上游后这些源码一直编译不过。 失败均来自「导航保留 fork 的 vendored miuix-nav」这一合并取舍未同步到测试: - ComposeScreenTestHost 引了 miuix 的 rememberNavController,却没引 NavController 类型本身。 - ReadingPlayerUiInstrumentedTest 仍使用 androidx 的 NavHostController 与 navigate()/popBackStack(), 改为 NavController<NavDestination> 与 push()/pop()。 AppearanceSettingsScreenInstrumentedTest 依赖的 appearanceSettingsStartDestinationOptionTag 在上游 重构中被内联成了字符串字面量。恢复为公开函数并让生产代码改用它,避免生产与测试各写一份 tag 字面量后再次漂移。 验证:compileLiteDebugAndroidTestKotlin 通过;ktlintFormat、:app:testLiteDebugUnitTest、 assembleLiteDebug、assembleLiteRelease 均通过。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`test` 是 JVM 插件的生命周期任务,不包含 KMP 的 `jvmTest`,所以 shared 的 391 个单元测试
从未在 CI 跑过;插桩测试源码同样没有任何编译覆盖,合并上游后一直编译不过也无人察觉。
Build Check 增加 `:shared:jvmTest` 与两个变体的 androidTest 编译(执行仍需模拟器,这里只编译)。
启用 jvmTest 后暴露两个既有问题,一并修复:
1. io.github.zly2006:latex-* 发布的是 class file 65(Java 21)字节码,而工具链是 JDK 17,
运行时加载会 UnsupportedClassVersionError,公式相关的 markdown 测试全部起不来。
编译目标保持 JVM 17(Android 复用同一产物),仅让 :shared:jvmTest 跑在 21 的 launcher 上,
CI 相应多装一个 JDK 21。
2. ktlint 排除 Room KSP 产物的判断用了 `absolutePath.contains("/build/generated/")`,
Windows 下 absolutePath 是反斜杠,该判断永远为假 —— 同一份配置在 Linux CI 上碰巧通过,
在本机则对生成的 *_Impl.kt 报几千条。改用 invariantSeparatorsPath,并在任务级别再排一次,
因为 KSP 产物是通过 source set 加进来的,插件的 filter{} 拦不住。
shared-local-db 里按 source set 名枚举格式化任务的写法随之删除。
验证:本机 ktlintCheck、test、:shared:jvmTest、compileLiteDebugAndroidTestKotlin、
assembleLiteDebug、assembleLiteRelease 全部通过(Rust 任务因本机缺 cargo-ndk 跳过,CI 会装)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
系统比对 M3 与 miuix 两套界面后,先补「功能已存在但 miuix 侧没有入口」的一批 —— 这些改动小, 但缺了会让 miuix 用户完全用不到对应功能。 - 首页补创作 FAB 与展开菜单(提问题 / 写回答 / 发想法)。此前 miuix 首页没有任何发布入口, 只有刷新按钮。菜单用 miuix Card + MiuixSheetActionRow,展开时铺一层 windowDimming 遮罩接管外部点击。 - 问题页补「写回答」按钮,与关注按钮同排。 - 账号设置补三个入口:搜索设置项、身份管理(登录且平台支持时)、朗读与播放(平台支持时)。 这三个页面上一轮已接进导航,但 miuix 侧没有任何入口,等于进不去。 - 首页补 Cookie 不完整提示。登录态缺 d_c0 时 M3 会弹窗提示重新登录,miuix 侧只会显示 一直刷不出来的空列表。 顺带修 shared-local-db 的 ktlint 配置:上一轮改动把 format 侧的 setSource 一并删掉了, 导致 ktlintFormat 又开始格式化 Room KSP 产物。check 侧用 exclude(对 BaseKtLintCheckTask 生效), format 侧的 worker 任务连 exclude 都拦不住,只能改写 source 并关掉对应报告任务,两者都保留。 验证:ktlintFormat、ktlintCheck、:shared:jvmTest、:app:testLiteDebugUnitTest、 compileLiteDebugAndroidTestKotlin、assembleLiteDebug、assembleLiteRelease 全部通过。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
合并上游 38 个提交(507 文件),主要带来 zly2006#701 跨平台账户会话与多账号/马甲号切换、 zly2006#681 macOS Native 桌面端、zly2006#678/zly2006#698/zly2006#699 提椠 Markdown 与公式判定、zly2006#708 按问题连续朗读、 zly2006#690 私信链接解析,以及 zly2006#677/zly2006#685 的测试与测试专用代码精简。 25 个冲突全部解决,导航层一律保留 fork 的 vendored miuix-nav: navigate(x){opts} → push(x)、popBackStack() → pop()、 currentBackStackEntry?.toRoute<T>() → backStack.lastOrNull() is T、composable<T> → entry<T>。 上游基于 navigation-compose 的 articleEnterTransition/articleExitTransition 不接入 (fork 的回答切换转场在 ArticleAnswerSlot 内部处理);上游那条 popBackStack 的 PlatformBackHandler 也不接入,NavDisplay 已自带返回消费,叠加会双重出栈。 zly2006#660「主分页返回键优先回到首页」按 fork 形态接入。 上游 zly2006#701 把若干 fork 遗留的“大杂烩对象”拆成细粒度 expect/actual,miuix 侧同步跟进: - ArticleHost → LocalArticleNavController + consumePendingCommentId + rememberArticleTtsState + ArticleSpeechToggler + ArticleBrowserOpener;postHistoryDestination 归入 PaginationEnvironment, clipboardDestination 与 pending 内容归入 AndroidArticleNavigationHandoff。 - ArticleScreenSettingsState → 按 key 的 rememberObservedSetting。 - SystemUpdateRuntime → rememberSystemUpdateState/Checker/VersionSkipper/Downloader + DownloadedSystemUpdateInstaller + resetSystemUpdateState/setSystemUpdateError。 - DeveloperDiagnostics → rememberDeveloperInfo + rememberPlainTextClipboard; miuix 开发者页据此去掉「剪贴板调试」「导出所有配置」,与 M3 对齐。 - AccountData 的客户端职责 → ZhihuAccountClient / account store;miuix 账号页与账号弹层 改用 accountStore.client.refreshAndSaveProfile()、accountStore.clear()、requestLoginNavigation(), 并跟随 M3 移除扫码协助登录入口。 - SearchViewModel 的三个筛选字段 → SearchFilters + updateFilters。 保留的 fork 能力:autoHideTopBar、rememberZhihuMainPreferenceState 的设置变更实时重载、 Markdown 主题的 miuix 配色覆盖、分页失败时带响应体的诊断信息、 AndroidPaginationEnvironment 里缺少 d_c0 的加载失败提示。 顺带清理与上游重复或已无调用方的代码: parseCookieString(上游 parseCookieAssignments 更完整,会跳过 Domain/Path 等 cookie 属性)、 createLocalFeedDisplayItem(单调用点包装)、onTestRefreshClick/onTestLoadMore/ testHotSearchQueries/BlocklistSettingsTestConfig(测试专用参数,无任何调用方)。 rememberSettingBoolean/String/Int 保留但改为基于上游 rememberObservedSetting 实现, 全仓只保留一份设置观察机制。 d_c0 决策:上游已在 ZhihuPhoneLoginClient 修好手机号登录路径且它是默认登录方式, fork 原先针对网页登录/手动粘贴 cookie 的 udid 预取补丁不再保留。 验证::shared:compileKotlinJvm、assembleLiteDebug、ktlintFormat、:shared:jvmTest、 :app:testLiteDebugUnitTest、compileLiteDebugAndroidTestKotlin、assembleLiteRelease 全部通过。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTXL1Fn3ipNpM2j3sBX1to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 为知乎++ 引入完整的 miuix 双主题 UI(上游此前只有 Material 3)。采用页面级分流:由
ThemeManager.getThemeStyle()控制,每个页面在 Material 3 与 miuix 两套实现间切换,数据层 / ViewModel / 导航完全复用。全部 miuix 代码写在shared/commonMain,去除 Context/Toast/Intent/Activity 等安卓依赖,改用上游 KMP 平台抽象,因此同时支持 Android / 桌面 / iOS。已完成的 miuix 界面
首页、关注、热榜、日报、历史、账号设置、通知、问题页、想法页、用户主页、收藏夹、屏蔽设置、外观设置、系统与更新、开发者选项、关于、开源许可等大部分主要页面,搜索框 + 热搜/历史建议,以及回答页(骨架 + 上下/左右滑动切换 + 预览卡 + 标题/底栏自动隐藏)。
未完成的界面(仍是 Material 3,尚无 miuix 版本)
CommentScreen,~1300 行)— 最大缺口:问题页 / 想法页 / 回答页的评论入口目前直接复用 Material 3 的CommentScreenComponent。需新建MiuixCommentScreen+MiuixCommentSheet(WindowBottomSheet替MyModalBottomSheet),复用CommentViewModel,仅重写表现层。涉及富文本(buildAnnotatedString + emoji inline content)、子评论二级 sheet、左滑回复 / 右滑归档手势、图片长按菜单、排序 / 点赞 / IP 属地等。(注:本 PR 已为 miuix 主题补上从 miuix 调色板派生的MaterialTheme.colorScheme,复用 M3 组件的反色/露底问题已基本消除;评论区仍待真正 miuix 化以获得原生观感。)ArticleScreen,~2100 行)— 已有 miuix 骨架,附加功能逐步补齐:新建MiuixArticleScreen并接线分流。已完成:顶栏(标题/返回/分享)、作者卡、正文(RenderMarkdown)、底部操作栏(赞同/反对/收藏/评论)、收藏夹 BottomSheet、IP 属地、阅读进度条、上下/左右滑动切换上一答/下一答(含 miuix 竖向预览卡 + 横向全屏预览)、标题自动隐藏、底栏自动隐藏。仍待补:跳转下一答按钮、双击操作、置顶日期、duo3 操作药丸、WebView 正文、AI 摘要、语音朗读,以及评论区改用 miuix 版(见第 1 点)。SearchScreen,~514 行):搜索框(MiuixSearchBar)和热搜 / 历史建议已 miuix 化,但composable<Search>点击搜索后的结果列表页仍直接渲染 M3 的SearchScreen,尚无MiuixSearchScreen。MiuixPinScreen顶栏目前只有分享按钮,缺右上角「更多」弹出菜单(应参照MiuixFeedCard的WindowListPopup锚点菜单模式)。SentenceSimilarityTest):full 变体的 NLP 调试页,无 miuix 版(优先级低)。近期更新(本轮)
MaterialTheme.colorScheme:ZhihuMiuixTheme此前只套MiuixTheme,未提供 M3 配色,导致 miuix 页面内复用的 M3 组件(overscroll、Scaffold/NavHost 容器背景、预览卡、markdown 等)落到 M3 baseline 紫/粉默认色——转场 fadeOut、首页 overscroll、问题↔作者页返回时露出粉色底,深色 markdown 反色。现把 miuix 调色板映射成一套 M3ColorScheme兜底,统一消除。keep.xml保留@raw/aboutlibraries)、R8 反射 keep(MainActivity.navigateMainTab/navigate)、鉴权刷新失败兜底、热榜 miuix 标题超两行截断。破坏性变更
shared compileSdk36 → 37(miuix-preference要求 compileSdk ≥ 37;fork CI 已验证可正常构建)。DeveloperDiagnostics的expect声明(commonMain)→ 各平台需实现actual(已提供 android / jvm / native)。private→internal:fetchLinkCardPreview/linkCardTypeLabel(PinScreen)、loadSearchHistory/saveSearchHistory(SearchScreen)、loadedQuestionScreenData等,供 miuix 页面复用。MiuixBlocklistSettingsScreen新增nlpContent形参(与 M3BlocklistSettingsScreen对齐)。packaging { dex { useLegacyPackaging = true } }):lite release APK 7.6MB → 3.8MB(minSdk ≥ 28 时 AGP 默认不压缩 dex 导致体积翻倍,本应用走侧载分发下载体积优先)。代价仅首次安装略慢。-keep enum **收窄为-keep enum com.github.zly2006.**(省约 200KB)。风险
-keep enum收窄:理论上若某库 enum 仅通过反射使用、R8 fullMode 又检测不到可能被裁剪。已经 fork CI 构建 + 真机测试验证,未见问题。验证
ktlintCheck+assembleFullRelease+assembleLiteRelease均通过。upstream/master最新提交(无冲突)。🤖 Generated with Claude Code