Skip to content

🐛 fix(conversation): prevent synthetic scroll from shrinking spacer#14584

Merged
Innei merged 2 commits into
canaryfrom
codex/fix-conversation-spacer-scroll-intent
May 12, 2026
Merged

🐛 fix(conversation): prevent synthetic scroll from shrinking spacer#14584
Innei merged 2 commits into
canaryfrom
codex/fix-conversation-spacer-scroll-intent

Conversation

@Innei

@Innei Innei commented May 9, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • ✅ test
  • 📝 docs
  • 🔨 chore

🔗 Related Issue

Fixes LOBE-8626

🔀 Description of Change

  • Gate conversation spacer shrink on explicit user scroll intent so synthetic/layout-driven negative scroll offsets do not collapse the bottom compensation area.
  • Track wheel, touch, keyboard, and pointer drag intent at the chat list shell before passing scroll offsets into useConversationScroll.
  • Add regression coverage for layout-driven negative offsets and an E2E Gherkin scenario that simulates non-user scroll offset changes.

🧪 How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

Commands run:

bunx vitest run --silent='passed-only' src/features/Conversation/ChatList/hooks/useConversationScroll.test.ts -t 'ignores layout-driven negative offsets without user scroll intent'
bunx vitest run --silent='passed-only' src/hooks/useAutoScroll.test.ts src/features/Conversation/ChatList/hooks/useConversationScroll.test.ts
bunx cucumber-js --config cucumber.config.js --tags '@AGENT-SCROLL-006' --dry-run
bunx prettier --check e2e/src/steps/agent/scroll.steps.ts
git diff --check

TDD red check was confirmed by temporarily restoring the old condition; the new regression test failed with { cancelPin: true, shrinkSpacer: true } before the fix and passed after restoring the user-intent gate.

Full E2E execution was not run in this checkout because the harness starts next start, and there is no local .next production build in the workspace.

📸 Screenshots / Videos

N/A

📝 Additional Information

The E2E scenario avoids mouse.wheel() deliberately. It mutates scrollTop and dispatches a scroll event directly to simulate virtual-list or layout correction offset changes without any user wheel/touch/key/pointer input.

@vercel

vercel Bot commented May 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment May 11, 2026 6:35pm

Request Review

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 9, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Innei, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@codecov

codecov Bot commented May 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.18%. Comparing base (1a368ea) to head (3474006).

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #14584     +/-   ##
=========================================
  Coverage   66.18%   66.18%             
=========================================
  Files        2899     2899             
  Lines      253977   253979      +2     
  Branches    30854    24835   -6019     
=========================================
+ Hits       168085   168089      +4     
+ Misses      85739    85737      -2     
  Partials      153      153             
Flag Coverage Δ
app 60.56% <100.00%> (+<0.01%) ⬆️
database 91.83% <ø> (ø)
packages/agent-runtime 80.48% <ø> (ø)
packages/builtin-tool-lobe-agent 83.41% <ø> (ø)
packages/context-engine 83.99% <ø> (ø)
packages/conversation-flow 92.43% <ø> (ø)
packages/file-loaders 87.60% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.94% <ø> (ø)
packages/model-runtime 83.72% <ø> (ø)
packages/prompts 70.39% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 5.44% <ø> (ø)
packages/utils 88.02% <ø> (ø)
packages/web-crawler 88.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 66.83% <ø> (ø)
Services 54.17% <ø> (ø)
Server 71.62% <ø> (+<0.01%) ⬆️
Libs 56.16% <ø> (ø)
Utils 82.51% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Innei Innei merged commit 84c89f9 into canary May 12, 2026
35 checks passed
@Innei Innei deleted the codex/fix-conversation-spacer-scroll-intent branch May 12, 2026 16:18
emaxlele pushed a commit to emaxlele/lobehub that referenced this pull request May 12, 2026
arvinxx pushed a commit that referenced this pull request May 12, 2026
…14584)

🐛 fix: prevent synthetic scroll from shrinking spacer
lezi-fun pushed a commit to lezi-fun/lobehub that referenced this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant