Repository navigation
refactor(canvas): migrate Hub connection modules to TypeScript - #53
Merged
lukasoppermann merged 9 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
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Pending approvals with a null refresh token become unreadable, blocking connection completion.
1 open issue
What changed in this PR
Continues the canvas extension’s strict TypeScript migration for Hub connections while preserving its installable JavaScript runtime.
Changes:
- Adds typed Hub clients, connection coordination, discovery, origin handling, and learnings hooks.
- Strengthens external-data checks and adds malformed-data coverage.
- Commits generated runtime modules and updates contributor guidance.
| File | Description |
|---|---|
hub/docs/prototype-canvas.md |
Documents migration boundaries and validation contracts. |
.github/extensions/replica-prototype/read-hub-object/index.mts |
Adds an unknown-object reader. |
.github/extensions/replica-prototype/read-hub-object/index.mjs |
Generated object-reader runtime. |
.github/extensions/replica-prototype/read-hub-error/index.mts |
Adds typed error normalization. |
.github/extensions/replica-prototype/read-hub-error/index.mjs |
Generated error-reader runtime. |
.github/extensions/replica-prototype/parse-hub-url/index.mts |
Migrates URL validation to TypeScript. |
.github/extensions/replica-prototype/parse-hub-url/index.mjs |
Refreshes generated URL parser. |
.github/extensions/replica-prototype/normalize-selected-hub-origin/index.mts |
Types manual origin normalization. |
.github/extensions/replica-prototype/normalize-selected-hub-origin/index.mjs |
Refreshes generated selection normalizer. |
.github/extensions/replica-prototype/normalize-hub-origin/index.mts |
Types strict origin normalization. |
.github/extensions/replica-prototype/normalize-hub-origin/index.mjs |
Updates generated origin normalizer. |
.github/extensions/replica-prototype/invalid-hub-origin/index.mts |
Types origin errors and status metadata. |
.github/extensions/replica-prototype/discover-hub/index.test.mjs |
Covers malformed GitHub responses. |
.github/extensions/replica-prototype/discover-hub/index.mts |
Types discovery and cached-data checks. |
.github/extensions/replica-prototype/discover-hub/index.mjs |
Updates generated discovery runtime. |
.github/extensions/replica-prototype/create-learnings-hook/index.mts |
Types recall validation and session tracking. |
.github/extensions/replica-prototype/create-learnings-hook/index.mjs |
Updates generated learnings hook. |
.github/extensions/replica-prototype/create-hub-origin-store/index.test.mjs |
Covers malformed saved selections. |
.github/extensions/replica-prototype/create-hub-origin-store/index.mts |
Types origin storage and validation. |
.github/extensions/replica-prototype/create-hub-origin-store/index.mjs |
Updates generated origin store. |
.github/extensions/replica-prototype/create-hub-connection/index.mts |
Types connection selection and coordination. |
.github/extensions/replica-prototype/create-hub-connection/index.mjs |
Updates generated connection coordinator. |
.github/extensions/replica-prototype/create-hub-client/stored-credentials.test.mjs |
Covers malformed credentials and connection identities. |
.github/extensions/replica-prototype/create-hub-client/index.mts |
Adds typed client contracts and boundary checks. |
.github/extensions/replica-prototype/create-hub-client/index.mjs |
Updates generated Hub client. |
Review effort: Max
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Base automatically changed from
lukasoppermann-canvas-typescript-infrastructure
to
main
October 22, 2026 06:14
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
lukasoppermann
force-pushed
the
lukasoppermann-canvas-typescript-hub-connection
branch
from
October 22, 2026 06:14
80d9a74 to
552b466
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: 2e9f29a3-a43f-469a-a5aa-8318559d915a
alliscode
approved these changes
Oct 22, 2026
lukasoppermann
deleted the
lukasoppermann-canvas-typescript-hub-connection
branch
October 22, 2026 17:03
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. --> This is layer 4 of the canvas extension TypeScript migration, following #53. Publication and status orchestration need checked contracts before the remaining review and server modules can migrate. ## 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 publication targets, preferences, preparation, requests, results, prototype state refresh, repository status, and working-tree checks to strict TypeScript. Keep generated sibling JavaScript files and existing import URLs so installed plugins need no compiler or loader. Publishing permissions, target matching, request deduplication, and workflow evidence stay unchanged. Check saved publication fields at their consuming boundary without replacing unrelated fields or legacy requests. Export the contracts from their owning modules, retain unknown external fields until checked, add runtime coverage for malformed saved state and external responses, and update the contributor guide. Review, sharing, local servers, and SDK registration remain for later layers. --------- 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
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 extension is moving its authored Node code to strict TypeScript while keeping its installable JavaScript runtime. This is layer 3 of that migration, built on #52, and covers the Hub connection without changing the user flow.
What changes
Adds TypeScript sources for the Hub client, origin validation and selection, private credentials, repository discovery, connection coordination, and learnings hook. External JSON is checked before use, and client responses retain unknown field values for consuming workflows to validate. The client exports reusable connection, request, status, and recall types.
Commits generated sibling
.mjsmodules and keeps existing JavaScript imports and theextension.mjsentry point. Approval, renewal, request timing, and prompt-data minimization retain their existing flow. Adds focused malformed-data coverage and updates the contributor guide. Publishing, review workflows, local servers, SDK registration, and browser UI remain outside this layer.