Skip to content

Replace the Alpine ownership runtime with Vue - #137

Open
JuroOravec wants to merge 87 commits into
mainfrom
promotion/vue-runtime-migration
Open

JuroOravec wants to merge 87 commits into
mainfrom
promotion/vue-runtime-migration

Conversation

@JuroOravec

@JuroOravec JuroOravec commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Citry's Alpine renderer rebuilt component ownership in Python and again in the browser, then used range comments and a custom morph planner to preserve scopes across server updates. This change replaces that path with server-compiled Vue component definitions and retained native Vue instances. Interactive templates now use Vue directives and Options, while static output continues to serialize without loading a browser runtime.

The migration removes the ownership crate, client-graph protocol, Alpine/morph assets, and their browser reconstruction code. It adds the native Rust Vue compiler, typed prepared rendering, native component and slot relationships, component/marker Events targeting, Citry.vue, and onServerRender. The compiler uses the documented, MIT-licensed, Citry-patched Vize 0.420.0 sources merged separately in #140 so request-time compilation remains Node-free. Citry UI, i18n, Events, starters, docs, the linter, LSP, and VS Code extension are migrated to the same model. The Python component API remains the rendering entry point; the public browser migration and breaking changes are listed in CHANGELOG.md. Compiled templates support the qualified Vue syntax documented in the guide; Vue built-ins such as Teleport, Transition, Suspense, and KeepAlive remain outside this release's compiled-template contract.

Component wrappers can now forward undeclared Vue attributes and listeners explicitly with inheritAttrs: false and <c-Child v-bind="$attrs" />. The exact authored v-on="listeners" object form is preserved through parser provenance, prepared metadata, cache replay, native compilation, LSP analysis, and the browser protocol. Plain component attributes remain Python kwargs, and Python data cannot manufacture executable Vue directives.

Benchmark probes, framework-comparison projects, qualification captures, and generated performance reports are deliberately excluded from this promotion. The retained design documents describe the architecture and decisions without linking to those local artifacts.

Validation:

  • Full repository gate before the final focused additions: 9,105 Python tests passed, 3 skipped, 1 xfailed; 88.64% coverage.
  • Rust formatting, Clippy, and tests passed.
  • Ruff, mypy, pyright, repository validators, protocol checks, and package inventories passed.
  • Citry client: 94 tests passed; VS Code extension: 117 tests passed; Codemirror, Events, docs playground, and package checks passed.
  • Vue PreviewBridge regression: 4 browser tests passed. The migrated i18n plugin and production-payload browser set passes 16 tests; the Citry UI combobox/component set passes 183 tests.
  • Vue forwarding: 486 focused Python/LSP tests, focused Rust parser/compiler tests, and a real Chromium wrapper-forwarding test passed.
  • Citry UI formatting cleanup: Ruff passed and 143 focused tests passed.
  • Events standalone validator: 19 exchanges, 9 descriptors, and 7 manifests passed.
  • Independent adversarial promotion review and focused re-review found no unresolved blockers.

The refreshed GitHub Actions matrix is running after incorporating #140 and the final focused commits.

This branch has not been deployed

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

1 participant