qwen-code/packages
ChiGao 93af84f248
fix(cli): surface unhandled rejections and render errors instead of swallowing them (#7406)
* fix(cli): surface unhandled rejections and render errors instead of swallowing them

Unhandled promise rejections were emitted to AppEvent.LogError which has
no production listener, making crashes completely invisible in debug logs
and stderr. Additionally, the main App tree had no top-level
ErrorBoundary, so React render errors were caught only by Ink's internal
boundary which silently exits via exitPromise.catch(noop).

- Write unhandled rejection details to the debug logger so they appear
  in ~/.qwen/debug/<session>.txt
- Wrap the interactive UI tree in an ErrorBoundary that logs fatal
  render errors and shows a fallback message instead of silent exit

* fix(cli): address review feedback — normalize non-Error throws and add exit path

- Normalize non-Error thrown values (strings, null, etc.) to Error
  instances in ErrorBoundary before logging/rendering, preventing
  secondary TypeErrors from sanitizeTerminalText(undefined)
- Schedule a graceful exit (5s delay) from the fatal render error
  fallback so the session does not hang under the Kitty keyboard
  protocol where Ctrl+C is a keypress, not SIGINT

* test(cli): add test for non-Error thrown value normalization in ErrorBoundary

---------

Co-authored-by: 秦奇 <gary.gq@alibaba-inc.com>
2026-07-23 08:38:47 +00:00
..
acp-bridge fix(serve): detect stale SSE cursors across daemon restarts via epoch token; preserve turn attribution and surface compaction failures in replay (#7458) 2026-07-23 07:24:36 +00:00
audio-capture chore(release): v0.20.1 (#7461) 2026-07-22 02:00:22 +00:00
channels fix(feishu): await stream cancels in media download teardown (#7465) 2026-07-23 06:58:53 +00:00
chrome-extension chore(release): v0.20.1 (#7461) 2026-07-22 02:00:22 +00:00
cli fix(cli): surface unhandled rejections and render errors instead of swallowing them (#7406) 2026-07-23 08:38:47 +00:00
core fix(core): avoid empty transcript history pages (#7582) 2026-07-23 08:37:35 +00:00
cua-driver fix(mcp): add opt-in model payload filtering (#7413) 2026-07-21 09:49:04 +00:00
desktop fix: support context-inheriting subagents in headless mode (#7378) 2026-07-21 12:33:13 +00:00
mobile-mcp chore(release): v0.20.1 (#7461) 2026-07-22 02:00:22 +00:00
sdk-java fix(sdk-java): correct TIMEOUT_30_MINUTES to 30 minutes (#7188) 2026-07-18 22:36:22 +00:00
sdk-python fix(sdk-python): require canonical form in validate_session_id (#7532) 2026-07-23 06:26:32 +00:00
sdk-typescript fix(serve): detect stale SSE cursors across daemon restarts via epoch token; preserve turn attribution and surface compaction failures in replay (#7458) 2026-07-23 07:24:36 +00:00
vscode-ide-companion feat(serve): persist workspace channel configuration (#7514) 2026-07-23 06:20:35 +00:00
web-shell fix(web-shell): sync background agent status (#7561) 2026-07-23 06:35:04 +00:00
web-templates chore(release): v0.20.1 (#7461) 2026-07-22 02:00:22 +00:00
webui feat(serve): add workspace-level generation (#7552) 2026-07-23 05:17:03 +00:00
zed-extension chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860) 2026-05-11 17:29:50 +08:00