Skip to content

fix(chat): 修复 20261201 报告全部 5 项 Bug - #109

Draft
leeyisoft wants to merge 9 commits into
mainfrom
fix/flutter-report-five-bugs-20261202
Draft

leeyisoft wants to merge 9 commits into
mainfrom
fix/flutter-report-five-bugs-20261202

Conversation

@leeyisoft

@leeyisoft leeyisoft commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

问题与修复

覆盖《imboy-flutter Bug 报告 20261201.docx》的全部 5 项问题:

# 报告问题 本 PR 的修复
1 普通输入框触发小米安全键盘,无法正常切换输入法 正文、搜索、昵称及备注等普通文本启用 suggestions;聊天尊重 autocorrect 配置,密码和恢复口令保留原有保护。
2 首页群聊头像只显示左半 每个合成格独立保存并恢复 Canvas 裁剪状态,包含首格缺省头像的提前返回分支。
3 聊天页系统返回/侧滑返回无效 用真实键盘和面板状态决定返回,移除 composerHeight <= 52 的判断;先关闭当前输入层、图库或多选,再离开会话,移除延时自动 pop。
4 已显示发送成功的群图片仍为灰占位,无法打开 对本账号已确认、实际加载失败的单图/多图预览最多补偿加载一次;覆盖失败与 ACK 的两种顺序、手动重试、气泡卸载后重挂;补齐多图状态映射,移除终止失败的图片缓存项,让图库可重新授权;失败缩略图或迟到的旧失败只能清理自己的流,保留成功及替换图片流。账号/session/cache、完整性失败及取消边界继续校验。
5 重启后已有私聊从列表消失 /conversation/mine 的有限保留列表缺席不能代表删除。同步合并返回行并保留本地有效会话;明确隐藏、删除及退群路径继续处理自身状态。

附件持久化补充了直接回调的开封 descriptor 登记和冷 reader 回归。搜索错误视图的重复分支同时收敛,以满足已有文件行数门禁;没有放宽门禁或基线。未混入独立的上传恢复体验 PR #108。

已完成的多层验证

五项修复的实跑验证绑定提交 8ea1a55be9b458c0fb4cac76969a17196470a774。当前 head e4ec926222865266df115ea9c9f7ebafbe74ce6b 仅修正一个既有路由测试的数据库 fixture;已逐项核对,全部生产代码、依赖与配置,以及本节 15 个定向测试文件均与该验证版本完全一致。

独立验证 run 46774736955 已成功完成:

  • 15 个目标、170 个用例全部通过,0 失败、0 跳过。
  • 12 项隔离故障注入全部被测试抓到,合计取得 54 个具有源码位置、Expected/Actual 和原始机器日志的业务断言失败;编译、初始化、插件和清理异常不计作反证。
  • 每次故障注入后恢复生产文件;全部恢复后再次运行 170/170 通过,0 失败、0 跳过。
  • 运行态 3,226 个 lib/test/依赖与配置路径的 SHA256 与 8ea1a55 的干净检出逐项一致;格式化补丁、运行时源码补丁均为空。
  • 两轮正向结果的 30 个目标执行记录均已核对日志、测试源码及进程收据哈希;进程退出码为 0,原始机器事件无 error、失败或跳过。
  • 原始结果保存在该 run 的 five-bug-regression-evidence artifact。诊断工具和工作流仅在独立验证分支,没有合入本 PR,也没有放宽主 PR 门禁。

以下通过数包含复用的既有保护用例,并非全部为新增测试;每项故障注入都在原测试不变的情况下替换对应生产逻辑。

问题 正向验证方式 每轮通过数 故障注入抓获
普通输入与秘密字段 C2C/C2G 实际 TextInput 平台配置、共享 composer、密码显隐、备份页面 34 2/2
群头像 2/3/4/9 格、首格有图/缺省图的像素检查及既有合成测试 17 1/1
返回行为 GoRouter + 真实 ChatPage 的 9 例,另含输入层、键盘 metrics、图库、多选等 11 例 20 2/2
群图片 单图/多图/重挂/ACK 竞态、HTTP 拒绝后恢复、密文解码与图库、缓存流身份、SQLite journal 冷恢复、附件 handler 76 6/6
会话保留 磁盘 SQLite 多次关闭重开、生产 API 完整/部分/空响应、显式隐藏与群移除 23 1/1

补充核对 Flutter 3.50.0 的固定版本 Android 输入源码:普通文本在 enableSuggestions=false 时会额外添加 TYPE_TEXT_VARIATION_VISIBLE_PASSWORD,与 autocorrect 的判断独立;改为 true 后消除该标记,obscureText 密码分支仍独立保留。官方文档也说明关闭建议可能影响依赖候选的输入语言切换。这是原生映射的静态证据,未代替小米真机验收。

图片 HTTP 用例实际走生产 API client、授权 resolver、缓存 provider、密文开封及图片解码,连到 loopback HTTP 服务;服务端锚点和 ACK 输入为合成 fixture。新增缓存 4 例使用生产 provider,重点验证缓存流归属。上述证据不能代替两个真实账号的完整后端和设备验收。

常规 CI 与本次 CI 修复

  • 原 head e4ec926 的 CI run 46778158586 唯一上游失败是 macOS component 多靶进程超时。原始 batch receipt 记录 RUNNER_TIMEOUT、exit 124;进程默认预算为 900 秒。失败批次没有业务断言失败,已完成的测试用例均成功,未完成目标按 BLOCKED 处理。
  • 根因是 macOS component 将 64 个 Flutter test target 放入同一个 flutter test --machine 进程,重型组件套件使该进程超过 900 秒预算;这不是通过重试、跳过测试或放宽门禁可以解决的问题。
  • 本次 head a6c845cc99c3fb409bf05551f4b39ffc515e3738 已修复 CI 分组:仅 macOS component PR worker 将 IMBOY_EXECUTION_HOST_BATCH_MAX 设为 16。冻结计划中的 target、平台、测试断言、覆盖率要求和重试规则均保留;其他 worker 仍使用 64 默认值。
  • 新增 tooling 回归:64 个目标在 batch max=16 时必须形成 4 个 16-target 批次,顺序与执行身份完整保留,每个目标恰好执行一次。更新 docs/testing/execution.md 记录实测原因与边界。
  • 最新提交的 CI run 46802253064(#741) 已启动:DCO、测试归属/计划、自动化框架、协议合同、错误码合同、密钥扫描已通过;Flutter Analyze 主分析与 Dart Format 步骤已通过;Linux tooling 正在执行新增的批次覆盖测试,macOS component 与 macOS tooling 仍在队列中。同一提交的 Security Scan 46802253018 已通过。最终修复是否成立,以新 CI 的 macOS component、tooling、汇总、coverage 和构建结果为准。
  • 既有定向 170/170、12/12 故障注入证据不替代主 CI。没有 Flutter SDK 的本地执行声明;自动化实跑由 GitHub Actions 提供。

尚待报告环境验收

CI 和上述实跑证据不能替代报告所用设备的实际验收。当前没有可访问的小米/Android 真机连接,以下项目保持未勾选:

  • 报告所用小米机型、系统和输入法:普通输入可切换输入法,密码输入行为正确。
  • 首页群头像完整显示,刷新缓存及重新进入后仍正常。
  • Android 系统返回键和返回手势覆盖折叠输入、键盘、面板、多选及图片预览。
  • 两个真实测试账号完成群图片收发、打开大图、弱网恢复和重启后查看。
  • 实际账号的文本/图片私聊多次冷启动仍在列表,历史保留,主动隐藏/退群有效。

旧数据边界

旧版误隐藏和用户主动隐藏共用 is_show=0,无法安全批量区分。已误隐藏的会话从联系人进入一次恢复后,新同步逻辑不会再因服务端列表缺席而自动隐藏。

基线为 main ab6f6cd4f2099643153d927a5a9c16bd3d64f190。保留原修复分支,无强推、无合并操作。

Restore normal IME suggestions outside secret inputs, isolate each group
avatar tile's canvas clip, drive back handling from the real input layer,
register outgoing attachment descriptors before first render, and retain
local conversations omitted from the message-derived server list.

Add platform input, avatar pixel, guarded navigation, durable encrypted
attachment and SQLite cold-start regressions. Preserve explicit hides and
password semantics. Consolidate the earlier unreviewed fix branch without
rewriting its history or mixing the separate upload recovery PR.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Retry a failed outgoing preview once after the existing trusted message
status reaches sent, delivered or seen. Evict the failed stream before
rebuilding Flyer and recheck account, session and media-cache ownership.
Also evict terminal image-provider failures so galleries can reauthorize.

Cover both ACK/error orders, successful-cache stability, cleanup/account
boundaries and attachment integrity rejection. Apply the exact first-run
CI formatter patch and remove two redundant test imports.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Keep the new gallery regression's provider constructors within Dart's
standard page width.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Reuse the bounded, account-scoped ACK image reload for single and grouped images. Preserve send status through the production multi-image mapper and recover previews when a failed message is reopened before manual retry.

Add retry-order and multi-image regressions, plus keyboard-metrics coverage for both system and edge back. Apply the exact CI formatter correction without changing the gates.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Allow a failed outgoing preview to recover after its bubble remounts with an
already-confirmed message. Preserve account/session/cache checks, integrity
errors and the one-reload budget.

Exercise real ChatPage return paths, encrypted image authorization over a
loopback HTTP server and production conversation decoding across DB reopens.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
…essions

Initialize storage before process-wide message services, retain the shared
retry instance for the suite, and close real HTTP clients before Flutter's
pending-timer check. Apply the exact Dart formatter output.

The matching runtime sources passed all 166 focused cases with zero skips
in diagnostic run 46771180874. Counterfactual checks remain separate.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Preserve a successful original image when its resized thumbnail fails, and preserve replacement streams when an older load fails late. Add production-provider regression coverage for pending and decoded cache entries.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Keep the route-only suite on a deterministic unavailable database boundary. Its native channel stub cannot provide SQLCipher and could leave initialization pending across fakeAsync test lifetimes. Preserve every HTTP, route ownership, button recovery assertion and the existing wait budget.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
The 64-target macOS component invocation reached the runner's 900s
process timeout despite zero business assertion failures. Limit only
that PR worker to 16 targets per Flutter process while preserving every
frozen target and assertion. Add a tooling regression for the override
and document the CI evidence.

Signed-off-by: leeyi <leeyisoft@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant