Skip to content

chore(vscode): release 1.2.0 and cap the nesting of inline marks - #128

Merged
zy1233 merged 2 commits into
mainfrom
chore/vscode-release-1.2.0
Nov 13, 2026
Merged

zy1233 merged 2 commits into
mainfrom
chore/vscode-release-1.2.0

Conversation

@zy1233

@zy1233 zy1233 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

Release changes for the VS Code extension zycode.zycode 1.2.0, and one fix that goes in the same release: a cap on the nesting of inline marks. Two commits on top of main (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 wording
# Change Commit
1 Version 1.2.0 (package, lock, CHANGELOG heading), no version number in README, AGENTS.md, site 1
2 Windows wording: 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. Nothing says that Windows "works". Status stays Beta. The registry listing (vscode/README.md) had no such claim and gets none 1
3 fake_model.py: parents[3]. After the move to vscode/, parents[4] pointed above the repository, and the opt-in npm run test:agent failed 7 tests. D38 of the design doc no longer says that ci.yml has no filter (D39 added it) 1
4 F1 of the #124 review: cap the nesting of bold, italic, strikethrough and links at 32 levels. A deeper mark is dropped and its text stays 2

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.js of this tree and of the tree without the cap. The page gets a chat reset with one answer of N nested marks and a notice after it.

Text Before After
~~a x 1,000 + a~~ x 1,000 (8 KB) page busy 5.6 s 0.4 s, notice drawn
~~a x 2,000 (16 KB) page busy 34.1 s 0.4 s, notice drawn
*a x 3,000 (18 KB) stack overflow: the notice after the answer is missing 0.3 s, notice drawn
~~a x 5,000 and *a x 5,000 stack overflow: the notice is missing 0.4 s, notice drawn

The 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.

  • Before: the two new tests, run on the code without the cap, fail: expected 5000 to be less than or equal to 33 and expected 'zycodeThinking' to contain 'NOTICE-AFTER'.
  • After: both pass.
test "nests marks to a bounded depth and keeps the text"      (*, **, ~~ x 5,000: depth <= 33, all 10,000 letters stay)
test "draws the items that follow a deeply nested answer ..." (headless Chrome: a notice after a 5,000-level answer is drawn)

Release checks (this tree, Node v22.23.4, ruff 0.16.0 from the repo .venv):

Check Result
cd vscode && npm ci && npm run check 19 files passed, 3 skipped; 338 tests passed, 16 skipped (the webview tests run in Chrome, none skipped)
npm run test:agent (opt-in real-agent tests; run on the first commit) 16 of 16 passed (before the 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.vsix 73.2 MiB; check ok; smoke exit 0. CI runs them again on this PR
ruff check . and ruff format --check . All checks passed; 327 files formatted
cd web && npm ci && npm run check && npm run build (run on the first commit; the second commit changes no web/ file) 0 errors, 0 warnings; 3 pages built
Scan for the owner's mail domain (case-insensitive) in the diff, both commit messages, author and committer lines, this body 0

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.yml has no push or tag trigger. Only a manual run of that workflow on main with publish ticked (Actions > "VS Code extension" > Run workflow), approved in the environment vscode-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 main with the version unchanged ends green and publishes nothing (--skip-duplicate).

Blast Radius: extension users, and the product site.

  • This merge changes web/ (web/src/i18n/en.ts, zh.ts), so a merge to main deploys zycode.dev by 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.
  • The extension listing text (vscode/README.md, CHANGELOG) changes only when 1.2.0 is published.
  • ci.yml runs Ruff and pytest on this PR because it changes README.md, AGENTS.md and a Python file (fake_model.py).
Open in Web Open in Cursor 

…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.
@zy1233
zy1233 merged commit eedee46 into main Nov 13, 2026
11 checks passed
@zy1233
zy1233 deleted the chore/vscode-release-1.2.0 branch November 13, 2026 07:22
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.

2 participants