Skip to content

fix(webui): keep Mini App start failures actionable - #47

Draft
July-X wants to merge 3 commits into
mainfrom
fix/miniapp-preparation-error
Draft

July-X wants to merge 3 commits into
mainfrom
fix/miniapp-preparation-error

Conversation

@July-X

@July-X July-X commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Change

Refs #42.

Keep a failed Mini App start visible as an actionable “not opened” state after its error toast is dismissed. An explicit retry uses the normal open operation; polling does not restart a failed presentation. Only OWNED_ELSEWHERE receives the cross-client close-and-retry hint. Generic preparation errors retain their own message without inferring ownership.

This is a WebUI recovery-state fix, not a force-takeover feature or a change to the wire contract, runtime ownership, or underlying reasonCode diagnostics. Stop and lease failures do not create a failed-start state. The owning ADR and presentation inventory are updated.

Validation

Validation was performed on the exact patch against base 74b283209e2ffd50f9cad9c66fda864b6605bfd4 in Linux with Node.js 24; publication uses the same SHA-256-verified patch without further code changes.

  • Before the fix: two focused regression assertions failed.
  • After the fix: 59 focused tests passed, covering retained failure, explicit recovery, ownership-specific guidance, and refusal boundaries.
  • Passed: WebUI client and test TypeScript checks, WebUI build, source, dependency, presentation and feedback checks, and git diff --check.
  • Added browser regression coverage for preparation failure and OWNED_ELSEWHERE, toast dismissal, repeated refusal and explicit successful retry. The browser scenario did not run: the local harness was blocked at IPC socket setup with EPERM before Chromium testing began.
  • Performance profile: basic; no perf:full run. No full aggregate verification is claimed.
  • NOT RUN: real concurrent Desktop + WebUI acceptance, native Windows/macOS execution, and live-service validation. Publication from macOS is not macOS runtime-test evidence. Mock, SSR and offline checks do not establish live acceptance. CI for this new PR head remains to be checked.

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Added/removed source files were reviewed before regenerating release/public-source.json; new tests are declared in test/vitest-suites.json where applicable. This patch changes only existing files and existing test suites, so no source inventory or suite-list regeneration is required.
  • Shared English/Chinese documentation and capability/verification records are updated where applicable. The owning English ADR is updated; localized product strings remain Chinese. Mock/offline results are not described as live-service acceptance.

Maintainer handoff

Publication scope or license changes: none. The patch is limited to existing WebUI application/presentation code, tests, its owning ADR and the reviewed presentation fingerprint.

Shared-source port: not needed. This is a fork-local WebUI change, submitted only to mcode-webui/minimax-code.

Please verify the added browser scenario in an environment that can start the fixture server, then check real Desktop/WebUI ownership refusal and recovery before treating this as end-to-end acceptance. The underlying preparation failure diagnosis remains outside this patch.


中文说明

变更

关联 #42,本 PR 不关闭该问题。Mini App 启动失败后,关闭错误提示也会保留「应用尚未打开」和「重试打开应用」按钮。重试必须由用户主动触发,走常规打开流程;后台轮询不会自动重启。只有宿主明确返回 OWNED_ELSEWHERE 时才提示先在其他客户端关闭应用;其他准备失败保留原有错误信息,不判断为跨端占用。

本 PR 只修复 WebUI 的失败恢复界面,不做强制接管,不改变通信协议、运行时归属机制或底层 reasonCode 诊断。停止失败和页面租约失败不会生成启动重试状态。已同步对应 ADR 和界面组件清单。

验证

  • 在 Linux、Node.js 24 上针对 74b283209e2ffd50f9cad9c66fda864b6605bfd4 的同一份补丁验证;发布时核对了补丁 SHA-256,未额外改代码。
  • 修复前有 2 条定向回归断言失败;修复后 59 条定向测试通过,覆盖失败提示保留、主动重试、跨端占用提示和停止失败边界。
  • 通过 WebUI 客户端和测试的 TypeScript 检查、WebUI 构建、源码清单、依赖边界、界面组件使用、反馈规则和 git diff --check。
  • 已添加浏览器回归,覆盖两类启动失败、关闭提示、再次失败及手动重试成功。本地 Chromium 因 IPC 套接字 EPERM 未能启动,这些浏览器断言未在本地执行。三平台结果以本 PR 对应的 GitHub CI 为准。
  • 性能使用默认基础检查,不要求 perf:full,未在本地运行完整验证。未在真实 Desktop + WebUI 并行场景、Windows/macOS 原生运行时或在线服务上验收;模拟测试不能替代真机结果。

发布检查与维护者交接

  • 保留现有许可证及署名。没有引入凭据、账号数据、真实会话或内部材料,也未新增文件或测试套件。
  • 仅修改本仓库的 WebUI 行为、测试、关联 ADR 和组件清单,无须向上游移植。请复核浏览器回归,再用真实双客户端验证占用提示和重试。底层准备失败的原因仍待单独定位。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants