Repository navigation
fix(react-core): stabilize pin-to-send scrolling - #5386
Merged
tylerslaton merged 1 commit intoJun 12, 2026
Merged
Conversation
westkite1201
requested review from
jpr5,
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
June 11, 2026 13:58
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@westkite1201 is attempting to deploy a commit to the CopilotKit Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Thank you for the contribution @westkite1201! |
tylerslaton
approved these changes
Jun 12, 2026
tylerslaton
added a commit
that referenced
this pull request
Jun 16, 2026
…er message pinned (#5423) ## What does this PR do? Ports the `usePinToSend` spacer fix from #5386 to the Vue package. `packages/vue/src/v2/hooks/use-pin-to-send.ts` is a documented 1:1 parity port of the React hook and retained the shrink-only `ResizeObserver`: when content below the anchored user message loses height (suggestions swapping in, input container resizing after streaming), the spacer could not grow back, so total scrollable height dropped and the pinned message shifted — the same defect class reported in #5355. - Lets the spacer adjust in both directions so total scrollable space below the pinned bubble stays constant. - Mirrors the test change from #5386 1:1 in the Vue suite (red/green: the updated assertion fails on the shrink-only implementation, passes with the fix). - Updates the `PARITY.md` row and hook JSDoc that documented the old shrink-only semantics. Vue has no scroll-to-bottom button, so the scroll-listener half of #5386 does not apply here. ## Related PRs and Issues - Follow-up to #5386 - Relates to #5355 (Vue side of the same spacer defect) ## Tests - `nx test @copilotkit/vue` — 1001 passed (94 files), including the mirrored `adjusts spacer as content height changes to keep the user message pinned` case - `nx build @copilotkit/vue` — green (dts build) - `oxfmt --check` clean on touched files - Pre-existing on main, untouched by this diff: 176 package-wide lint errors (identical count on clean main) and `@copilotkit/core:check-types` failures 🤖 Generated with [Claude Code](https://claude.com/claude-code)
huangyingting
pushed a commit
to repomesh/CopilotKit
that referenced
this pull request
Jun 16, 2026
…er message pinned Ports the usePinToSend half of CopilotKit#5386 to the Vue package, which is a documented 1:1 parity port and retained the shrink-only ResizeObserver. When content below the anchored user message loses height (suggestions swap, input resize), the spacer now grows back so total scrollable space below the bubble stays constant and the message stays pinned (CopilotKit#5355). Vue has no scroll-to-bottom button, so the listener half of CopilotKit#5386 does not apply.
This branch was successfully deployed
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 does this PR do?
Fixes
pin-to-sendscrolling in the v2 chat view.nonAutoScrollEl, not the stablescrollRefobject.usePinToSendspacer adjust in both directions as content below the pinned user message changes, so the user message stays anchored after streaming finishes and layout height changes.Related PRs and Issues
Fixes #5355
Tests
corepack pnpm -C packages/react-core exec vitest run src/v2/hooks/__tests__/use-pin-to-send.test.tsx src/v2/components/chat/__tests__/CopilotChatView.pinToSend.test.tsxcorepack pnpm exec oxfmt --check packages/react-core/src/v2/components/chat/CopilotChatView.tsx packages/react-core/src/v2/hooks/use-pin-to-send.ts packages/react-core/src/v2/hooks/__tests__/use-pin-to-send.test.tsx packages/react-core/src/v2/components/chat/__tests__/CopilotChatView.pinToSend.test.tsxgit diff --checkAttempted:
corepack pnpm -C packages/react-core run check-typesreact-markdownJSX namespace errors, missing@copilotkit/runtime-client-gqldeclarations, and existing e2e mockAbstractAgentprivate member mismatches.Checklist