fix(chat): suggestions slot projection via ngProjectAs (0.0.16)#188
Merged
Conversation
Live smoke testing of 0.0.15 surfaced that <chat-welcome-suggestion> elements projected via [chatWelcomeSuggestions] from the consumer's <chat> content slot weren't reaching the inner chat-welcome's matching slot. Root cause: re-projecting `<ng-content select="[chatWelcomeSuggestions]" />` inside the `<chat-welcome>` instance doesn't preserve the selector for the inner component's slot match — Angular's content projection looks at the projected element's own attributes, not at the wrapping ng-content's select. Fix: wrap the ng-content in `<ng-container ngProjectAs="[chatWelcomeSuggestions]">` so chat-welcome's `<ng-content select="[chatWelcomeSuggestions]" />` sees a matching projection target. Verified with the smoke harness: 3 vertical suggestion rows now render under the input on first load. Default greeting + subtitle still render their fallback content (we deliberately didn't re-project those — overriding via `<chat-welcome>` directly is the path for consumers who want custom greetings). Bumps @ngaf/chat 0.0.15 → 0.0.16. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Hotfix from live smoke testing 0.0.15. Suggestions projected via
[chatWelcomeSuggestions]from a consumer's<chat>content slot weren't reaching the inner<chat-welcome>'s matching slot.Root cause
Re-projecting
<ng-content select="[chatWelcomeSuggestions]" />inside the<chat-welcome>instance doesn't preserve the selector for the inner component's slot match — Angular's content projection looks at the projected element's own attributes, not at the wrappingng-content's select.Fix
Wrap the inner
<ng-content>in<ng-container ngProjectAs="[chatWelcomeSuggestions]">so chat-welcome's<ng-content select="[chatWelcomeSuggestions]" />sees a matching projection target.Live smoke verification (all features)
Versions
@ngaf/chat: 0.0.15 → 0.0.16Open follow-up (not in this PR)
The optimistic user message can drop after the user clicks Stop mid-stream. Visible only on certain streams; conversation continues fine but the user pill disappears from history. Worth a separate hunt — orthogonal to welcome-screen work.
🤖 Generated with Claude Code