Commit b2bface
fix(chat,langgraph): jank — stable id + global keyframes + round send + host overflow (#175)
* fix(chat,langgraph): stabilise optimistic message id for track-by-id
The 0.0.9 jank fix switched chat-message-list to `track message.id`, but
the optimistic human message injected at submit() had no id — so
toMessage() called randomId() on every BaseMessage→Message recompute.
Each token re-emission produced a fresh id for the user bubble, defeating
track-by-id and tearing down the chat-message DOM (and its caret /
typing-dot animations) on every streamed token.
- stream-manager.bridge: stamp optimistic input messages with an
`optimistic-<ts>-<rand>` id at injection time. Real LangGraph echoes
with a server id arrive as a separate merge, naturally taking over.
- agent.fn: WeakMap-cache projected Message objects by raw BaseMessage
identity so the projected `id` is stable across recomputes when the
raw reference is stable (additional belt-and-braces for caret/typing
animation continuity).
- chat.component: only mark the LAST assistant message as
`streaming=true` (was every assistant). Avoids re-painting historical
messages' caret/streaming attrs every token.
- Bumps: @ngaf/chat 0.0.9 → 0.0.10, @ngaf/langgraph 0.0.3 → 0.0.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(chat): hoist @Keyframes globally + round send + lock host overflow
Three additional jank fixes for 0.0.10:
1. Hoist @Keyframes (typing-dot, caret-blink, spin, pulse) into the
global ROOT_TOKEN_STYLES sheet that's already auto-injected into
<head>. Previously they lived in CHAT_HOST_TOKENS and were appended
to every chat component's styles array. Angular's emulated view
encapsulation scopes @Keyframes names per-component, which can
desynchronise from `animation: name` references when those live in
a sibling style helper string. Result: the typing dots rendered
but never animated. Hoisting to global scope makes the names match
what component CSS references (Angular leaves `animation:` props
untouched).
2. Make the send button fully round (`border-radius: 9999px`) instead
of the 8px button radius — matches the floating-launcher aesthetic.
3. Constrain the chat host with `overflow: hidden` and add
`flex: 1 1 auto; max-height: 100%` so content can never push the
embedding page into a scroll state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: re-trigger workflows
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 35e0712 commit b2bface
8 files changed
Lines changed: 51 additions & 11 deletions
File tree
- libs
- chat
- src/lib
- compositions/chat
- styles
- langgraph
- src/lib
- internals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
| |||
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
111 | | - | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| 144 | + | |
139 | 145 | | |
140 | 146 | | |
141 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
188 | 201 | | |
189 | 202 | | |
190 | 203 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
262 | 272 | | |
263 | | - | |
| 273 | + | |
264 | 274 | | |
265 | 275 | | |
266 | 276 | | |
| |||
0 commit comments