Repository navigation
refactor(canvas): type collaboration and diagnostics - #55
Merged
lukasoppermann merged 27 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
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1aff284a-77f1-4bcf-8245-e30889a2f392
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
There was a problem hiding this comment.
🔵 Needs a closer look
The migration affects saved feedback and request safeguards, with compilation, generated-output, and runtime checks still unverified.
1 open issue
What changed in this PR
Continues #54’s canvas extension migration by typing collaboration and diagnostics while retaining the plugin’s package-free JavaScript runtime.
Changes:
- Adds typed contracts for review, sharing, local comments, and Controls diagnostics.
- Validates saved records and adds corruption regression tests.
- Updates declarations, lint coverage, and contributor guidance.
| File | Description |
|---|---|
| hub/package.json | Includes declaration files in formatting checks. |
| hub/eslint.config.ts | Adjusts extension lint coverage. |
| hub/docs/prototype-canvas.md | Documents migration boundaries and storage validation. |
| .github/extensions/replica-prototype/validate-controls/index.mts | Types Controls validation and result projection. |
| .github/extensions/replica-prototype/validate-controls/index.mjs | Generated validation runtime. |
| .github/extensions/replica-prototype/validate-controls/controls-validator.d.ts | Declares the bundled validator interface. |
| .github/extensions/replica-prototype/tsconfig.json | Includes validator declarations. |
| .github/extensions/replica-prototype/share-links/index.mts | Types sharing workflows and response checks. |
| .github/extensions/replica-prototype/share-links/index.mjs | Generated sharing runtime. |
| .github/extensions/replica-prototype/share-control-preferences/index.mts | Types saved sharing preferences. |
| .github/extensions/replica-prototype/share-control-preferences/index.mjs | Generated preference runtime. |
| .github/extensions/replica-prototype/review-action/index.test.mjs | Tests corrupt snapshots and reply receipts. |
| .github/extensions/replica-prototype/review-action/index.mts | Types review actions and validates saved records. |
| .github/extensions/replica-prototype/review-action/index.mjs | Generated review-action runtime. |
| .github/extensions/replica-prototype/request-controls-diagnosis/prompt-data/index.mts | Types diagnosis evidence serialization. |
| .github/extensions/replica-prototype/request-controls-diagnosis/preview-url/index.mts | Types preview URL validation and filtering. |
| .github/extensions/replica-prototype/request-controls-diagnosis/preview-url/index.mjs | Generated preview URL runtime. |
| .github/extensions/replica-prototype/request-controls-diagnosis/index.test.mjs | Tests corrupt diagnosis receipts. |
| .github/extensions/replica-prototype/request-controls-diagnosis/index.mts | Types diagnosis requests and checks saved timestamps. |
| .github/extensions/replica-prototype/request-controls-diagnosis/index.mjs | Generated diagnosis-request runtime. |
| .github/extensions/replica-prototype/request-commenting-fix/index.test.mjs | Tests corrupt repair-request receipts. |
| .github/extensions/replica-prototype/request-commenting-fix/index.mts | Types repair requests and checks saved timestamps. |
| .github/extensions/replica-prototype/request-commenting-fix/index.mjs | Generated repair-request runtime. |
| .github/extensions/replica-prototype/create-reviewer-profile/index.mts | Types reviewer profiles and account validation. |
| .github/extensions/replica-prototype/create-reviewer-profile/index.mjs | Generated profile runtime. |
| .github/extensions/replica-prototype/create-local-review-comments/index.test.mjs | Tests preservation and rejection of corrupt drafts. |
| .github/extensions/replica-prototype/create-local-review-comments/index.mts | Types local comments and validates stored drafts. |
| .github/extensions/replica-prototype/create-local-review-comments/index.mjs | Generated local-comment runtime. |
| .github/extensions/replica-prototype/controls-status/index.mts | Types bounded runtime diagnostic projections. |
| .github/extensions/replica-prototype/controls-status/index.mjs | Generated diagnostic-status runtime. |
| .github/extensions/replica-prototype/comment-store/index.mts | Exports the private comment-store contract. |
| .github/extensions/replica-prototype/comment-store/index.mjs | Generated comment-store runtime. |
| .github/extensions/replica-prototype/comment-actions/index.mts | Types action registration and error mapping. |
| .github/extensions/replica-prototype/comment-actions/index.mjs | Generated comment-action registration runtime. |
| .github/extensions/replica-prototype/capture-review-revision/index.mts | Types source revision capture. |
| .github/extensions/replica-prototype/capture-review-revision/index.mjs | Generated revision-capture runtime. |
Review effort: Max
lukasoppermann
added this pull request to stack #58
October 21, 2026 13:49
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
lukasoppermann
force-pushed
the
lukasoppermann-canvas-typescript-collaboration
branch
from
October 22, 2026 06:14
6d665a4 to
10c6051
Compare
…-hub-connection' into lukasoppermann-canvas-typescript-hub-connection
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
alliscode
approved these changes
Oct 22, 2026
…ermann-canvas-typescript-publication
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
Base automatically changed from
lukasoppermann-canvas-typescript-publication
to
main
October 22, 2026 17:12
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056
lukasoppermann
deleted the
lukasoppermann-canvas-typescript-collaboration
branch
October 22, 2026 17:20
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. --> The canvas TypeScript migration needs typed local servers and lifecycle callbacks before its final SDK registration layer can move. This layer builds on #55 without changing how authors connect, preview, start a server, or publish. ## 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 the loopback canvas and setup servers, preview proxy, prototype connection storage, development-server lifecycle and discovery, start-page reader, HTML renderer, browser launcher, startup errors, and agent action queue to strict TypeScript. Keep compiled sibling `.mjs` files and existing import URLs so installed plugins need no compiler or packages. Export contracts from the modules that own them and check unknown JSON, HTTP chunks, and consumed Hub fields before use. Preserve host, origin, token and size safeguards, exact prototype URLs, action ownership and cancellation, cleanup, and explicit server-start consent. Add coverage showing malformed HTTP action results cannot consume a pending command, and update the contributor guide. Browser assets are unchanged. SDK registration, asset checking, test helpers and entry shims remain for the final integration layer. End-to-end Copilot-host smoke remains for that 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 Copilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448 Copilot-Session: 2c5cb6d7-c080-4957-a125-07380321d056 Copilot-Session: 20ca3725-52e8-4e11-9258-99515de7789d
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
Canvas collaboration and Controls diagnostics need checked Node contracts before the remaining server and registration code can move to TypeScript. This layer builds on #54 without changing the installed plugin's entry point, import URLs, or package-free runtime.
What changes
Move comment actions, retained review snapshots, local comments and reviewer profiles, share links and preferences, Controls status and validation, and chat diagnosis requests to strict authored
.mtsfiles. Commit their generated sibling.mjsmodules and export the owned contracts for the next layer. Keep the generated Controls validator in JavaScript with a narrow declaration outside the rebuilt assets directory.Check consumed stored fields before use so malformed snapshots, reply receipts, drafts, and diagnosis timestamps fail explicitly without discarding feedback or replaying an uncertain request. Preserve target checks, response bounds, sharing access, diagnosis approval instructions, and existing UI and protocols. Update the contributor guide and lint coverage; leave HTTP servers, preview lifecycle, browser launch, and SDK registration for the following layer.