Skip to content

test: harden host compatibility and TypeScript tooling - #7

Merged
jimeh merged 3 commits into
mainfrom
t3code/harden-tests-and-automation
Aug 15, 2026
Merged

jimeh merged 3 commits into
mainfrom
t3code/harden-tests-and-automation

Conversation

@jimeh

@jimeh jimeh commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • exercise Better Markdown Preview through VS Code's real markdown.api.render path on the declared desktop floor, current desktop stable, and stable VS Code for the Web in Chromium
  • migrate supported repository tooling, configs, helpers, and Node contract tests to strictly checked .mts, retaining .vscode-test.mjs as the documented CLI compatibility exception
  • enforce all-files V8 coverage with global and per-file floors, and add focused Mermaid, preview-runtime, and entry-point coverage
  • split CI into one broad validation/artifact producer and narrow revision-bound desktop and web host consumers
  • document the compatibility, coverage, and TypeScript tooling contracts

Closes #6.

Verification

  • mise run verify
  • 12 Node contract tests passed
  • 36 Vitest tests passed across 5 files
  • coverage: 93.79% statements, 83.07% branches, 92.92% functions, 94.02% lines
  • desktop host contract passed on VS Code 1.125.0 and stable 1.133.0
  • web host contract passed in stable VS Code for the Web under headless Chromium
  • exact 12-file VSIX inventory passed
  • actionlint, offline zizmor, and pinact --check passed

Notes

  • Dependabot auto-merge and semantic-release remain deliberate follow-up work after this validation foundation is merged.
  • The accepted implementation contract is recorded in docs/plans/003-test-hardening-and-typescript-tooling.md.

Written on behalf of jimeh by gpt-5.6-sol using T3 Code.

@jimeh

jimeh commented Aug 15, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3617eb66-6343-410a-952a-ed413b6bae36

📥 Commits

Reviewing files that changed from the base of the PR and between 265aa36 and 69d6c12.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (46)
  • .github/workflows/ci.yml
  • .gitignore
  • .markdownlint-cli2.jsonc
  • .prettierignore
  • .vscode-test.mjs
  • .vscodeignore
  • AGENTS.md
  • README.md
  • docs/architecture.md
  • docs/plans/003-test-hardening-and-typescript-tooling.md
  • docs/testing.md
  • esbuild.js
  • esbuild.mts
  • eslint.config.mts
  • mise.toml
  • package.json
  • pnpm-workspace.yaml
  • scripts/clean.mts
  • scripts/generate-images.mts
  • scripts/lib/commands.mjs
  • scripts/lib/commands.mts
  • scripts/lib/host-tests.mts
  • scripts/package.mts
  • scripts/run-extension-tests.mts
  • scripts/run-web-tests.mts
  • src/extension.test.ts
  • src/preview/index.test.ts
  • src/preview/mermaid-runtime.test.ts
  • src/preview/runtime.test.ts
  • src/test/desktop/extension.test.ts
  • src/test/extension.test.ts
  • src/test/render-contract.ts
  • src/test/web/index.ts
  • test/commands.test.mjs
  • test/commands.test.mts
  • test/harness.test.mjs
  • test/harness.test.mts
  • test/manifest.test.mts
  • test/package-content.test.mts
  • test/presentation.test.mts
  • tsconfig.extension-tests.json
  • tsconfig.json
  • tsconfig.tooling.json
  • tsconfig.web-tests.json
  • vitest.config.mjs
  • vitest.config.mts
💤 Files with no reviewable changes (6)
  • scripts/lib/commands.mjs
  • src/test/extension.test.ts
  • esbuild.js
  • test/commands.test.mjs
  • vitest.config.mjs
  • test/harness.test.mjs

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved preview reliability for Mermaid diagrams, themes, SVG sizing, line ranges, and fallback content.
    • Preserved source content when Mermaid rendering or loading fails.
  • Quality Improvements

    • Added compatibility checks across desktop VS Code versions and stable VS Code for the Web.
    • Expanded validation for Markdown rendering, alerts, task lists, links, code blocks, tables, and Mermaid previews.
    • Added coverage tracking and stronger automated validation for packaged extension content.
  • Documentation

    • Updated development and testing guidance, including desktop and web compatibility workflows.

Walkthrough

The PR migrates build and test tooling to typed modules, adds coverage and focused tests, introduces desktop and web host compatibility contracts, restructures Mise tasks, and updates CI to prepare and reuse host artifacts.

Changes

Host compatibility and validation

Layer / File(s) Summary
Typed build and tooling foundation
esbuild.mts, tsconfig*.json, vitest.config.mts, scripts/*
Typed build targets, command helpers, TypeScript projects, coverage configuration, cleanup, and image generation are added or updated.
Focused tests and coverage
src/**/*.test.ts, test/*.mts, vitest.config.mts
Focused tests cover extension lifecycle, preview behavior, Mermaid failures, presentation rules, packaging, manifests, build targets, and coverage thresholds.
Desktop and web host contracts
.vscode-test.mjs, src/test/*, src/test/web/*, scripts/run-*-tests.mts
A shared render fixture is executed through desktop floor/stable hosts and stable Chromium VS Code Web.
Local and CI execution gates
mise.toml, .github/workflows/ci.yml, package.json
Validation prepares revision-bound artifacts. Dependent desktop and web jobs download those artifacts and run compatibility contracts.
Testing policy and repository boundaries
docs/*, README.md, AGENTS.md, ignore files
Documentation describes host compatibility, coverage, typed tooling, generated outputs, and host-test artifact exclusions.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 69d6c

The changes strengthen compatibility testing, tooling, coverage, and CI validation; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant Validate
  participant DesktopHost
  participant WebHost
  participant VSCode
  CI->>Validate: run validation and build host runners
  Validate-->>CI: upload dist/ and out/ artifact
  CI->>DesktopHost: download artifact and run floor/stable tests
  CI->>WebHost: download artifact and run stable Chromium tests
  DesktopHost->>VSCode: render compatibility fixture
  WebHost->>VSCode: render compatibility fixture
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #6 through real host rendering, floor and stable desktop tests, hosted web coverage, focused fixtures, documentation, and the verify gate.
Out of Scope Changes check ✅ Passed The reviewed changes support the linked issue and stated objectives, with no unrelated code changes identified.
Title check ✅ Passed The title uses valid Conventional Commits syntax and clearly describes the host compatibility and TypeScript tooling changes.
Description check ✅ Passed The description directly explains the host compatibility, TypeScript tooling, coverage, CI, documentation, and verification changes.

Comment @coderabbitai help to get the list of available commands.

@jimeh
jimeh marked this pull request as ready for review August 15, 2026 11:00
@jimeh
jimeh merged commit df2b5b4 into main Aug 15, 2026
5 checks passed
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.

test: exercise Markdown preview against host-supplied Markdown-It

1 participant