Repository navigation
refactor(canvas): establish TypeScript extension foundation - #51
Merged
lukasoppermann merged 2 commits intoOct 22, 2026
Merged
Conversation
Convert remote branch lookup to strict TypeScript while retaining its generated JavaScript runtime. Include migrated modules in lint, type checks, and plugin freshness checks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9d7306a9-9831-4c78-89e7-3c5b581c895e
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The command-runner declaration does not accurately describe all runtime failure results.
1 open issue
What changed in this PR
Establishes strict TypeScript checking for extension Node modules while preserving the existing plugin entry point and installation workflow.
Changes:
- Adds typed remote-branch lookup source and committed JavaScript output.
- Integrates module compilation, linting, and type checking into Hub commands.
- Extends freshness checks beyond browser assets and documents the contributor workflow.
| File | Description |
|---|---|
hub/package.json |
Adds module compilation and extends checks. |
hub/eslint.config.ts |
Includes extension TypeScript in linting. |
hub/docs/prototype-canvas.md |
Documents source editing and rebuilding. |
eslint.config.mjs |
Adapts extension lint patterns for root use. |
.github/extensions/replica-prototype/tsconfig.json |
Defines strict extension compiler settings. |
.github/extensions/replica-prototype/run-command/index.d.mts |
Declares the JavaScript command runner’s types. |
.github/extensions/replica-prototype/read-remote-branch/index.mts |
Adds typed remote-branch lookup source. |
.github/extensions/replica-prototype/read-remote-branch/index.mjs |
Commits generated runtime JavaScript. |
.github/extensions/replica-prototype/check-assets/index.test.mjs |
Covers generated modules outside browser assets. |
.github/extensions/replica-prototype/check-assets/index.mjs |
Expands freshness checks to the plugin directory. |
Review effort: Max
alliscode
approved these changes
Oct 21, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9d7306a9-9831-4c78-89e7-3c5b581c895e
lukasoppermann
deleted the
lukasoppermann-canvas-typescript-foundation
branch
October 22, 2026 06:06
lukasoppermann
added a commit
that referenced
this pull request
Oct 22, 2026
<!-- Use a conventional commit-style title, such as "fix(hub): retain prototype history". --> ## Why <!-- Explain the problem and why this change matters in a short, plain-English paragraph. Link the issue when applicable. --> Continue the canvas extension's TypeScript migration on top of #51. Shared command, storage, and repository helpers need compiler-checked implementations before the remaining workflows can migrate without relying on declarations for JavaScript behavior. ## What changes <!-- Describe what becomes different for a first-time reader. Explain necessary terms. Include accurate Mermaid diagrams when they clarify the proposal, using before/after diagrams when helpful. Add screenshots for meaningful UI changes. --> <!-- Omit validation sections, checklists, and routine test/CI summaries such as "CI is green" or "tests passed". Mention only known verification gaps that affect the change, not disclaimers about drafting this description. --> Move command execution, private storage, state-file reads and writes, and repository identity and context to strict TypeScript sources. Remove the temporary command declaration and share a checked error-code reader. Parsed storage data remains unknown until its consuming workflow checks the fields it uses; this change does not introduce a new stored-data format. Keep the generated runnable `.mjs` modules committed, with the same host entry point and no compiler or package installation required for plugin consumers. The module build now formats every compiler-emitted runtime file rather than naming a single module. Reuse Hub's locked Node types and document the migration boundary. Hub clients, publishing and review workflows, servers, browser assets, and SDK registration remain outside this layer. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9d7306a9-9831-4c78-89e7-3c5b581c895e Copilot-Session: 1aff284a-77f1-4bcf-8245-e30889a2f392
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.

Why
The canvas frontend already uses TypeScript, but the extension's Node modules remain JavaScript. This first layer of the migration establishes strict type checking without changing how people install or run the plugin.
What changes
Remote branch lookup now has TypeScript source and committed, generated JavaScript. The existing
extension.mjsentry point, plugin installation, and browser assets stay unchanged. A declaration describes the command runner until its later conversion.Hub's lint and type-check commands include migrated modules. The extension build compiles them before building browser assets, and the freshness check also detects stale generated Node modules outside the assets directory. The contributor guide explains which source to edit and how to rebuild it.