Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
Android 没有 Electron 主进程,但已有受限运行诊断(key 白名单 + 凭据脱敏)。 这次只让它多给两样东西:一对会话标记,和「原始事实」入口;报告的拼装、 脱敏、折叠与正文格式仍走共享纯函数,一份实现。 - Java:RuntimeDiagnostics.recent() 读最近事件;AndroidDiagnostics 补 session.started / session.ended 并按上次标记判定异常退出,bugReportFacts() 交出环境 / 会话 / 事件 / 投递配置;MainActivity 加桥方法与正常退出标记 - facade:window.ElecKoiPlatform.bugReport.facts()(两个变体共用同一门面) - 渲染层:bugReportBridge 统一桌面与 Android;Android 的报告用共享 buildBugReport 拼;报告对话框与移动端社区入口复用同一组件 - 共享:buildBugReport 从桌面主进程移到 packages/shared/src/foundation, 桌面侧保留旧路径再导出 - ADR 0041 决定 8 补充 Android 的分工与「只在 compat 变体提供入口」 测试:报告相关 74 条(含 Android 门面 2 条、Web 桥 5 条)。本机没有 Android SDK,Java 改动未编译,实机验收待做。
KuramiWan
force-pushed
the
feat/bug-report-android
branch
from
October 28, 2026 08:24
1db5b75 to
e4dead9
Compare
KuramiWan
force-pushed
the
feat/bug-report-contract
branch
from
October 28, 2026 08:24
889644f to
7335bc8
Compare
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.
Android 端接入 Bug 报告
What changed(改了什么)
Android 社区页也能点「报告问题」:看得到将要发送的报告,可以复制、导出 JSON;邮件与 GitHub 两个出口按配置出现(Android 上
mailto:由系统邮件客户端接管)。底层:
RuntimeDiagnostics/AndroidDiagnostics/MainActivity):Android 已经有一套受限运行诊断(key 白名单 + 凭据脱敏)。这次补三样:recent(n):读最近事件(旧到新,按字节预算截断,不会把 4MB 段全读进内存);session.started/session.ended:启动时先读上一次的尾巴再写本次标记,正常退出(onDestroy+isFinishing)补结束标记;没有配对结束就是异常退出;bugReportFacts():只交原始事实(环境 / 上次会话 / 最近事件 / 投递配置),不拼报告;诊断未开启的变体如实返回{"available":false}。platform-facade.js):window.ElecKoiPlatform.bugReport.facts(),两个变体共用同一门面。bugReportBridge.js统一平台差异——桌面直接透传dshDesktop.bugReport,Android 把事实交给共享纯函数拼装;BugReportDialog与移动端社区页复用同一组件。buildBugReport从桌面主进程移到packages/shared/src/foundation/bugReport.ts,桌面侧保留旧路径再导出。拼装、脱敏、折叠、正文格式因此仍然只有一份实现。Architecture route(架构归属)
packages/shared/src/foundation/bugReport.tsElecKoiAndroid门面eleckoi/lifecycle/not-ready等复用既有码)Data and compatibility(数据与兼容)
saved: falseschemaVersion: 1,与桌面完全一致Verification(验证)
pnpm test(报告相关 5 个文件共 74 条:契约 40、桌面 20、对话框 5、Android 门面 2、Android Web 桥 5)bash gates.sh全绿(10 步)pnpm test:android:17 个文件通过、70 条通过;android-apk-resources1 条失败,原因是本机缺 PythonPIL(环境问题,与本改动无关)javac,apps/android的 Java 改动只做了人工审阅,需要 CI 或实机编译确认win-dev/checklists/bug-report.md)Review scope(审查范围)
apps/android/app/src/main/java/com/eleckoi/app/{AndroidDiagnostics,RuntimeDiagnostics,MainActivity}.javaapps/android/app/src/main/assets/platform-facade.jsapps/web/src/app/windows/shell/components/bugReportBridge.js、BugReportDialog.jsx、apps/web/src/mobile/MobileAuxiliaryPages.jsxpackages/shared/src/foundation/bugReport.ts(从桌面主进程移入)apps/android/tests/android-bug-report-facts.test.js、apps/web/tests/ui/android-bug-report.test.jsxdocs/adr/0041-bug-report-delivery.md(决定 8)已知限制
bugReportFacts返回available:false)。mailto:)。