Skip to content

refactor(canvas): type publication and state orchestration - #54

Merged
lukasoppermann merged 18 commits into
mainfrom
lukasoppermann-canvas-typescript-publication
Oct 22, 2026
Merged

lukasoppermann merged 18 commits into
mainfrom
lukasoppermann-canvas-typescript-publication

Conversation

@lukasoppermann

Copy link
Copy Markdown
Contributor

Why

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

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.

lukasoppermann and others added 4 commits October 21, 2026 14:25
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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-module persistence checks affect publication behavior and need human compatibility review alongside resolution of the validation defects.

3 open issues
What changed in this PR

Builds on #53 by migrating canvas publication and status orchestration to TypeScript while preserving the installed plugin’s JavaScript runtime.

Changes:

  • Add typed publication, repository-status, and working-tree contracts.
  • Validate saved state and external responses, with malformed-data coverage.
  • Retain generated .mjs modules and update contributor guidance.
File Description
hub/​docs/​prototype-canvas.md Document migration scope and validation boundaries.
.github/​extensions/​replica-prototype/​working-tree-changes/​index.mts Type working-tree collection.
.github/​extensions/​replica-prototype/​working-tree-changes/​index.mjs Update generated working-tree runtime.
.github/​extensions/​replica-prototype/​request-publish/​index.test.mjs Cover malformed skill catalogs.
.github/​extensions/​replica-prototype/​request-publish/​index.mts Type publication dispatch and deduplication.
.github/​extensions/​replica-prototype/​request-publish/​index.mjs Update generated dispatch runtime.
.github/​extensions/​replica-prototype/​report-publish-result/​index.mts Type publication outcome reporting.
.github/​extensions/​replica-prototype/​report-publish-result/​index.mjs Update generated reporting runtime.
.github/​extensions/​replica-prototype/​refresh-prototype-status/​index.mts Type the status-refresh wrapper.
.github/​extensions/​replica-prototype/​refresh-prototype-status/​index.mjs Regenerate the refresh wrapper.
.github/​extensions/​replica-prototype/​read-repository-stats/​index.test.mjs Cover malformed workflow responses.
.github/​extensions/​replica-prototype/​read-repository-stats/​index.mts Type repository and workflow status reads.
.github/​extensions/​replica-prototype/​read-repository-stats/​index.mjs Update generated repository-status runtime.
.github/​extensions/​replica-prototype/​read-publication-state/​index.test.mjs Cover malformed state and legacy preservation.
.github/​extensions/​replica-prototype/​read-publication-state/​index.mts Add saved publication-state validation.
.github/​extensions/​replica-prototype/​read-publication-state/​index.mjs Add generated state-validation runtime.
.github/​extensions/​replica-prototype/​publish-target/​index.mts Type target capture and matching.
.github/​extensions/​replica-prototype/​publish-target/​index.mjs Add null-safe target comparisons.
.github/​extensions/​replica-prototype/​publish-preferences/​index.mts Type publication preference storage.
.github/​extensions/​replica-prototype/​publish-preferences/​index.mjs Regenerate preference runtime.
.github/​extensions/​replica-prototype/​prepare-publish/​index.mts Type publication preparation.
.github/​extensions/​replica-prototype/​prepare-publish/​index.mjs Regenerate preparation runtime.
.github/​extensions/​replica-prototype/​get-prototype-state/​index.mts Type state refresh and request synchronization.
.github/​extensions/​replica-prototype/​get-prototype-state/​index.mjs Update generated state-orchestration runtime.

Review effort: Max

Comment thread .github/extensions/replica-prototype/read-publication-state/index.mts Outdated
Comment thread .github/extensions/replica-prototype/read-repository-stats/index.mts Outdated
@lukasoppermann
lukasoppermann added this pull request to stack #58 October 21, 2026 13:49
Comment thread .github/extensions/replica-prototype/read-publication-state/index.mts Outdated
lukasoppermann and others added 6 commits October 22, 2026 08:02
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: dbbad477-1ff0-4721-b2a8-01308dc63448
@lukasoppermann
lukasoppermann force-pushed the lukasoppermann-canvas-typescript-publication branch from 0130a1e to 4b03275 Compare October 22, 2026 06:14
lukasoppermann and others added 6 commits October 22, 2026 17:14
…-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: 2e9f29a3-a43f-469a-a5aa-8318559d915a
Base automatically changed from lukasoppermann-canvas-typescript-hub-connection to main October 22, 2026 17:03
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: dbbad477-1ff0-4721-b2a8-01308dc63448
@lukasoppermann
lukasoppermann merged commit 3d694ef into main Oct 22, 2026
39 checks passed
@lukasoppermann
lukasoppermann deleted the lukasoppermann-canvas-typescript-publication branch October 22, 2026 17:12
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. -->

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

<!-- 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 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 `.mts` files.
Commit their generated sibling `.mjs` modules 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.

---------

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
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.

3 participants