What happened?
The current /export html architecture embeds the complete browser dependency graph reachable from WebShellTranscript into every exported file. The generated document is about 19.5 MB even for an empty session because the same React and Web Shell runtime is copied into each export.
Measured with equivalent empty-session data:
- Earlier lightweight export: 311,990 bytes
- Current Web Shell document export: 19,526,066 bytes raw / 4,772,314 bytes gzip
- Raw size increase: about 62.6x
- A real one-turn TUI
/export html file: 19,527,461 bytes
Most of this payload is identical across exports, making the default output unnecessarily expensive to store, attach, and share. This issue is about correcting the distribution model rather than attributing the behavior to one earlier change.
How to reproduce
- Build the current branch containing the Web Shell document exporter.
- Start Qwen Code and create any session.
- Run
/export html.
- Check the generated file size and inspect its script tags.
The HTML contains roughly 19.5 MB of inline JavaScript and has no external script source.
What did you expect to happen?
The exported HTML should contain transcript data, styles, and a small bootstrap. The complete React and Web Shell renderer should be a browser-ready asset in the matching @qwen-code/qwen-code npm package and loaded from an immutable, exact-version unpkg URL, consistent with the earlier HTML export distribution model.
The generated HTML must pin the final asset bytes with Subresource Integrity, fail closed when the renderer is unavailable or incompatible, and retain its existing restrictions against network requests originating from document content.
The generated HTML size should also have an automated budget so a large inline-bundle regression cannot land unnoticed.
Client information
Client Information
Qwen Code v0.23.0
Model: qwen3.8-max-2026-09-02
Fast Model: qwen3-coder-flash
Auth: openai
Platform: darwin arm64 (24.1.0)
Node.js: v22.22.0
Session: 40f93c8e-ec87-4381-a18b-48099cbd005c
Git commit: 98a9c96415
LSP: disabled
Anything else we need to know?
The renderer does not exist in previously published package versions. The first release containing the fix must include export-transcript-document.js at the npm package root, followed by a smoke test against the exact unpkg URL. No separate OSS synchronization is needed.
What happened?
The current
/export htmlarchitecture embeds the complete browser dependency graph reachable fromWebShellTranscriptinto every exported file. The generated document is about 19.5 MB even for an empty session because the same React and Web Shell runtime is copied into each export.Measured with equivalent empty-session data:
/export htmlfile: 19,527,461 bytesMost of this payload is identical across exports, making the default output unnecessarily expensive to store, attach, and share. This issue is about correcting the distribution model rather than attributing the behavior to one earlier change.
How to reproduce
/export html.The HTML contains roughly 19.5 MB of inline JavaScript and has no external script source.
What did you expect to happen?
The exported HTML should contain transcript data, styles, and a small bootstrap. The complete React and Web Shell renderer should be a browser-ready asset in the matching
@qwen-code/qwen-codenpm package and loaded from an immutable, exact-version unpkg URL, consistent with the earlier HTML export distribution model.The generated HTML must pin the final asset bytes with Subresource Integrity, fail closed when the renderer is unavailable or incompatible, and retain its existing restrictions against network requests originating from document content.
The generated HTML size should also have an automated budget so a large inline-bundle regression cannot land unnoticed.
Client information
Client Information
Anything else we need to know?
The renderer does not exist in previously published package versions. The first release containing the fix must include
export-transcript-document.jsat the npm package root, followed by a smoke test against the exact unpkg URL. No separate OSS synchronization is needed.