Repository navigation
fix: let a fallback shown through <c-fill fallback=...> hold components - #430
Merged
Merged
Conversation
In a component that uses Vue, <c-fill fallback="fallback"> lets a caller's fill show the receiving component's slot fallback. The caller's template compiles that fallback and reads its values from the caller's data. A component call in it was recorded in the receiver's data, which that template does not read, so such a fallback raised an error. The calls in that fallback are now recorded in the data of the component whose template compiles it, the caller, with the receiver still as each child's parent. Components inside a keyed loop, a `<c-provide>`, or another transparent component in that fallback work the same way. Some content in that fallback needs something only the receiver has, so it raises an error that names the caller, the receiver and the slot: - a `<c-slot>` outlet, which would choose its content from the receiver's slots; - a component given fill content, which would be passed on through a slot in the caller's template; - a Vue binding that reads Vue data, or a `@c-` event handler, on an element or a component. Compiled in the caller's template, such a binding read the caller's Vue data, and a click ran the caller's handler of the same name, or did nothing when the caller had none. The walk over the fallback now uses the same check that refuses a fill copied outside its author. Part of #351. Slot outlets and components given fill content in that fallback are left for #429. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ixes Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 27, 2026
JuroOravec
added a commit
that referenced
this pull request
Oct 28, 2026
A PR merged while its checks were still queued kept those runs, and they ran in full after the merge: about 300 to 400 job-minutes each for #430, #435, #436 and #437, while the merge's own run on main tested the same change again. Every check workflow that runs on pull requests now also starts on the PR's `closed` event. That run joins the PR's concurrency group, whose cancel-in-progress cancels the PR's queued and running checks, and every job skips on that event, so the cancelling run itself needs no runner. The notification and relock workflows are left out because they run no checks. A test checks each check workflow's trigger types and that every job that can start a run skips on `closed`. This is step 1 of the #405 proposal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Part of #351. The rest is in #429.
In a component that uses Vue,
<c-fill fallback="fallback">lets a caller's fill show the receiving component's slot fallback. The caller's template compiles that fallback. A component call in it was recorded in the receiver's data, which the caller's template does not read, so such a fallback raised an error.What changes
<c-provide>and transparent components in the fallback work the same way (packages/py/citry/citry/_vue/direct_capture.py).<c-slot>outlet, which chooses its content from the receiver's slots (left for Show slot outlets and filled components in a fallback that <c-fill fallback=...> shows #429);<slot>in the caller's template (left for Show slot outlets and filled components in a fallback that <c-fill fallback=...> shows #429);@c-event handler, on an element or a component.<i :class="message">in that fallback read the caller's Vue data, and<b @c-click="go">ran the caller's handler namedgo(or did nothing when the caller had none), with no error. The walk over the fallback now uses the same check that already refuses a fill copied outside its author (browser_read_trackers). A binding that reads no Vue data, such as:title="'fixed'", andc-inputs such asc-titlestill work.docs_site/content/concepts/slots.mdgets a "Limits with Vue" note in "Wrap the fallback". In the CHANGELOG, the refusal of Vue bindings and@c-handlers is a new "Changed" entry that says how to fix affected templates. The "Fixes" bullet covers the components, and the captured-Slotfix that shared that bullet now has its own.Tests
tests/test_vue_direct_relationships.py:test_a_fallback_shown_by_a_fill_shows_its_componentscovers 8 kinds of content, each with and without receiverjs;test_a_fallback_shown_by_a_fill_refuses_content_that_needs_the_receivercovers 10 cases (outlet, filled component, bindings and handlers on elements and components,ref, an assignment, and bindings inside a transparent component) and checks the full start of the message;test_a_fill_that_shows_the_fallback_keeps_its_own_vue_bindingschecks that the caller's own bindings around{{ fallback }}still work.test_a_fallback_shown_by_a_fill_cannot_hold_a_component, which locked in the old error.tests/e2e/test_fill_fallback_components_e2e.py(new) checks four things in a browser: hydration with no mismatch, the child reacting to a click, an Events render of the caller showing a new child in the fill, and an Events render of the receiver alone showing its own fallback.Evidence
Run locally with the installed
citry_core, which is newer than this branch's base:test_native_render_leaf_json.pyandtest_vue_hydration_regions.py, plustest_a_v_pre_elements_colon_attribute_is_written_on_the_server.--platform linux, andscripts/validate.pyall pass.Two independent reviews with a prose pass, plus a docs cold read, were folded in.
🤖 Generated with Claude Code