Repository navigation
chore(vscode): release 1.2.0 and cap the nesting of inline marks - #128
Merged
Merged
Conversation
…t wording, fake_model path fix - vscode/package.json and package-lock.json: 1.2.0 (even minor, stable). CHANGELOG: "Unreleased" is now "1.2.0 (2026-11-13)". - test/support/fake_model.py: REPO is parents[3] (the move to vscode/ left parents[4], which broke the opt-in real-agent tests). - Design doc D38 no longer says that ci.yml has no paths filter (D39 added it) and records the fake_model.py miss. - Windows wording (README, site en and zh, AGENTS.md, design doc, RELEASING.md): the owner tested the install of 1.0.0 and the update from 0.1.0 to 1.0.0 on Windows (2026-11-12); the rest of the Windows flow, macOS and Linux in a real VS Code are not verified. - Statements of the published version: no version number where the sentence reads well (README, site, AGENTS.md); VSIX file name examples use a glob.
markdown-it limits the nesting of blocks (maxNesting 100) but not the nesting of bold, italic, strikethrough and links. A text with thousands of nested marks made a DOM tree as deep. The recursive builder in webview/dom.ts then overflowed the stack (from about 2,750 levels), or the page froze for seconds (a `~~` nest of 1,000 levels took 5.7 s). An error in the chat reload also left out every later item, a permission card included. readInline now keeps at most 32 marks open. A deeper mark is dropped and its text stays in the mark that is open, so the cost stays linear and the DOM stays shallow. Two tests: the depth of the parse result (`*`, `**` and `~~`, 5,000 levels) and a chat reload in headless Chrome where an item follows a deeply nested answer. The CHANGELOG, the README limits and the design doc (section 2, rule 5) state the limit: marks nest at most 32 levels, and a deeper one shows only its text.
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.
Summary
Release changes for the VS Code extension
zycode.zycode1.2.0, and one fix that goes in the same release: a cap on the nesting of inline marks. Two commits on top ofmain(0d375c4). This PR publishes nothing.vscode/ package.json, package-lock.json version 1.0.0 -> 1.2.0 CHANGELOG.md "## Unreleased" -> "## 1.2.0 (2026-11-13)"; one sentence on the 32-level limit README.md Limits: one sentence on the 32-level limit RELEASING.md 1.0.0 record: owner's Windows test added; "Not verified" narrowed PACKAGING.md, scripts/*.mjs VSIX file name examples use a glob, not 1.0.0 src/core/markdown.ts MAX_INLINE_DEPTH = 32 (readInline keeps at most 32 marks open) test/markdown.test.ts, webview.test.ts 2 new tests for the cap test/support/fake_model.py REPO = parents[3] (was parents[4]) README.md, AGENTS.md no version number; Windows wording docs/specs/2026-11-04-vscode-extension-design.md D38 corrected; rule 5 (32 marks); Windows wording web/src/i18n/en.ts, zh.ts same keys; no version number; Windows wordingAGENTS.md, sitevscode/README.md) had no such claim and gets nonefake_model.py:parents[3]. After the move tovscode/,parents[4]pointed above the repository, and the opt-innpm run test:agentfailed 7 tests. D38 of the design doc no longer says thatci.ymlhas no filter (D39 added it)Version rule.
RELEASING.md: an even minor is a stable release, an odd minor is a pre-release (the Marketplace rule). 1.0.0 is published, so the next stable version with new features is 1.2.0 (1.1.x is the pre-release line). A test fails if the minor is odd or the CHANGELOG has no entry for the version.Not in this PR: a 1.2.0 record in
RELEASING.md. It can only be written after the publish, and it goes in the next release. The Markdown reader is in no release yet, so the CHANGELOG and README state the 32-level limit as a limit, not as a fix.Evidence
F1 (the cap). Chrome 156, headless, the real
dist/webview.jsof this tree and of the tree without the cap. The page gets a chatresetwith one answer of N nested marks and a notice after it.~~ax 1,000 +a~~x 1,000 (8 KB)~~ax 2,000 (16 KB)*ax 3,000 (18 KB)~~ax 5,000 and*ax 5,000The review of #124 measured a freeze of 3 to 22 s at 1,000 to 2,000 levels and an overflow at about 2,750 levels. The timings above come from my own run on this VM and are larger in one case (34 s); times of this kind change with the machine, so read them as the same order. The DOM depth of the answer after the cap is 32 marks or less (the new test checks 33 or less).
Tests.
expected 5000 to be less than or equal to 33andexpected 'zycodeThinking' to contain 'NOTICE-AFTER'.Release checks (this tree, Node v22.23.4, ruff 0.16.0 from the repo
.venv):cd vscode && npm ci && npm run checknpm run test:agent(opt-in real-agent tests; run on the first commit)parents[3]fix: 7 failed)npm run package linux-x64,check-vsix.mjs,smoke-vsix.mjs(run on the first commit)zycode-linux-x64-1.2.0.vsix73.2 MiB; checkok; smoke exit 0. CI runs them again on this PRruff check .andruff format --check .cd web && npm ci && npm run check && npm run build(run on the first commit; the second commit changes noweb/file)Merge Danger
Door: two-way for this PR. The publish run after it is one-way.
This PR changes files only. Nothing publishes on this merge.
vscode-extension.ymlhas nopushor tag trigger. Only a manual run of that workflow onmainwithpublishticked (Actions > "VS Code extension" > Run workflow), approved in the environmentvscode-publish, publishes. A revert of this PR undoes the files.The version number is one-way once the registries have it. A published version cannot be changed or published again on Open VSX or the Marketplace. If 1.2.0 is wrong, the fix is a higher version. The CHANGELOG date (2026-11-13) and text are then fixed for 1.2.0, so read them before the run. A run on
mainwith the version unchanged ends green and publishes nothing (--skip-duplicate).Blast Radius: extension users, and the product site.
web/(web/src/i18n/en.ts,zh.ts), so a merge tomaindeployszycode.devby itself (Cloudflare Workers Builds). The site then says "the extension is published on both registries" (no version number) and carries the Windows wording, before the publish run. The wording says only what the owner tested.vscode/README.md,CHANGELOG) changes only when 1.2.0 is published.ci.ymlruns Ruff and pytest on this PR because it changesREADME.md,AGENTS.mdand a Python file (fake_model.py).