Repository navigation
fix: name what to change when a fallback shown through fill fallback= cannot be placed - #468
Merged
Merged
Conversation
JuroOravec
force-pushed
the
fix/fallback-slot-chains
branch
from
October 27, 2026 19:15
8fd3527 to
7af049d
Compare
… cannot be placed
In a component that uses Vue, <c-fill fallback=...> failed with the
internal message "direct slot result moved across unrelated receivers"
when the receiver puts the <c-slot> whose fallback is shown inside content
it passes to another component, even when the fallback held only plain
HTML. It now fails with a message that names the caller, the receiver,
the slot and the component the receiver passes its content to, and says
what to change. The message fires only when the fill around the fallback
is the caller's fill to that receiver.
A fallback that prints a Slot it received from Python, such as
{{ icon }}, was refused as "a '<c-slot>' outlet". Each slot render now
records whether a <c-slot> started it, the cache artifact stores that
flag so a replay gives the same message, and a printed nested template
gets its own label. The "Limits with Vue" docs note lists both cases.
Printing {{ fallback }} inside a component that is not transparent failed
with "selected direct fills were not consumed by their receiver call". It
now fails with a message that names the caller, the receiver, the slot and
the component around the fallback, and says what to change. The cache
artifact stores the fill's own slot name so a replay names the same slot.
Part of #429.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
JuroOravec
force-pushed
the
fix/fallback-slot-chains
branch
from
October 27, 2026 19:15
7af049d to
7f78f7d
Compare
This was referenced Oct 28, 2026
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.
What this does
This PR improves three error messages for
<c-fill fallback=...>in a component that uses Vue. Nothing that renders correctly changes. One shape that used to render without its fallback (item 3, with a transparent receiver) now fails with item 3's message.1. A fallback whose
<c-slot>sits in content passed to another component no longer fails with an internal message. It failed with "direct slot result moved across unrelated receivers: current='citryOccurrence…'", even when the fallback held only<i>x</i>. The issue lists two shapes:Receiverputs its<c-slot name="body">inside the content it passes to another component,Mid, and the caller shows that fallback throughfallback=.<c-slot name="mid">into a fill it givesReceiver, and the page showsmid's fallback throughfallback=.Both now fail with a message that names the caller, the receiver, the slot and the component the receiver passes its content to, and says what to change:
The message fires only when the fill around the fallback is the caller's fill to this same receiver. Other states keep the internal message.
2. A captured
Slotis no longer called a<c-slot>outlet. A fallback that prints a Slot it got from Python, such as{{ icon }}withicon = slots["icon"], was refused as "a '' outlet", although the author wrote no<c-slot>there. The error now says "a Slot value that it prints, such as one taken from slots". A printed nested template gets its own label too.<c-slot>started it (from_outletin_vue/direct.py);SlotNodesets it.ext/cache/artifact.py,replay.py), so a replayed render gives the same message. Entries cached before this change no longer match the artifact's shape, so each is read as a miss and rendered again once. The artifact version stays 1.3. A fallback printed inside a component that is not transparent no longer fails with an internal message.
<c-fill name="body" fallback="fallback"><c-Wrap>{{ fallback }}</c-Wrap></c-fill>failed with "selected direct fills were not consumed by their receiver call", even for plain HTML. It now fails when the page renders, with:fallback="..."names, printed as{{ fallback }}) normally lands in the outlet of the component that wrote the fallback. The check runs where Citry places slot content, intransform_parts(_vue/direct_capture.py), and fires when the handle lands in another component's outlet instead. It skips content that Citry copies in place for a transparent component, so a transparentWrapstill renders.Forwardwith<c-Inner><c-slot /></c-Inner>, now gets this message namingForward. Before, it got item 1's message with the wrong component and slot names. WhenForwardis transparent, it gets item 1's message, which now namesForwardas the component that passes the content on and uses the fallback's own slot name.<span class="w">). It now fails with this message.default). The cache artifact now also stores the slot name the fill was written for, when it differs, so a replay namesbodytoo. As withfrom_outlet, older entries no longer match the artifact's shape and are rendered again once.The docs note "Limits with Vue" in
docs_site/content/concepts/slots.mdnow lists all three cases.Not in this PR
c-attribute inside the caller's fill, such as<c-Tpl c-tpl="<b>{{ fallback }}</b>" />, still fails with the internal "moved across unrelated receivers" message. It is a separate path and is left for option A.describe_caller_fallback, fix: let a fallback shown through <c-fill fallback=...> hold components #430's message, still names the component a transparent caller lands in rather than the transparent component. Through a transparentWrapit also names Wrap's slot ('default') instead of the fallback's own slot. The new messages in this PR name it correctly.Tests
tests/test_vue_direct_relationships.py:The tests match the part of each message that names the components or the content. The citry suite and the fallback and slot-props e2e tests pass.
Part of #429.
🤖 Generated with Claude Code