[Repo] Port editors/vscode/src/extension.ts to .affine once #35 lands #63
Copy link
Copy link
Closed
Description
Problem
editors/vscode/src/extension.ts is the only TypeScript file under editors/. It exists because AffineScript currently has no Node-target backend, and VS Code extensions have to ship a Node-callable entry point pinned by package.json's main field.
It's documented as an approved exemption in .claude/CLAUDE.md (see TypeScript Exemptions table). The unblock condition is #35.
Acceptance criteria
- Add Node-target backend + vscode-API bindings to enable .affine VS Code extensions #35 has landed (Node-target codegen produces a JS file consumable as a CommonJS module).
- Port the extension to
editors/vscode/src/extension.affine. - Update
editors/vscode/package.jsonmainto point at the AffineScript-compiled artefact. - Verify activation, command registration, LSP client wiring, and disposable cleanup all work end-to-end.
- Remove the
editors/vscode/src/extension.tsrow from the TypeScript Exemptions table in.claude/CLAUDE.md.
Origin
TS-elimination audit, 2026-05-02 (recommendation #7). Local audit at ~/dev/affinescript/.claude/CLAUDE.md notes the exemption.
Dependencies
- Add Node-target backend + vscode-API bindings to enable .affine VS Code extensions #35 (Node-target backend + vscode-API bindings)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat: typed-wasm xmod + Node backend + extern + VS Code (#35, #42) (#90)
hyperpolymath commentedon May 15, 2026
This appears effectively complete — flagging for closure confirmation (not self-closing, per the ISSUE-CLOSURE rule).
Acceptance-criteria status:
lib/codegen_node.ml) produces arequire()-able CJS module; Codegen: --vscode-extension flag to inline extraImports wiring #105/Codegen: --vscode-extension flag to inline extraImports wiring #116 added--vscode-extensionto inline the adapter wiring.editors/vscode/src/extension.tsis gone; source of truth iseditors/vscode/src/extension.affine.mainupdated —editors/vscode/package.jsonmain→./out/extension.cjs, and itscompilescript now passes--vscode-extension(Codegen: --vscode-extension flag to inline extraImports wiring #116)..claude/CLAUDE.mdlistseditors/vscode/src/extension.tsunder Closed exemptions (closed 2026-05-03), withtools/check-no-extension-ts.shguarding regressions (wired intojust check+ CI).--vscode-extensionwiring is what makes theVscode/VscodeLanguageClientimports actually resolve at activation; full in-editor verification would need a live VS Code host.Everything except the live-host smoke test is done. @hyperpolymath — OK to close this (tracking any remaining in-editor verification under the #104 publish work / a dedicated QA pass), or would you like the e2e verification tracked here before closing?
Generated by Claude Code
hyperpolymath commentedon May 16, 2026
Closing as completed at owner request.
All mechanically-verifiable acceptance criteria are met:
lib/codegen_node.mlNode-CJS codegen +--vscode-extensionwiring (feat: typed-wasm xmod + Node backend + extern + VS Code (#35, #42) #90, Codegen: --vscode-extension flag to inline extraImports wiring #116); Add Node-target backend + vscode-API bindings to enable .affine VS Code extensions #35 closedcompleted2026-05-11.editors/vscode/src/extension.tsremoved; source of truth iseditors/vscode/src/extension.affine.mainupdated —editors/vscode/package.jsonmain→./out/extension.cjs..claude/CLAUDE.md(closed 2026-05-03), regression-guarded bytools/check-no-extension-ts.sh(wired intojust check+ CI).The remaining acceptance item — live-host activation / command / LSP / disposable verification — cannot be proven from the repo tree and is now tracked separately in #139 (to be folded into the #104 publish QA pass).
Generated by Claude Code