8000 fix(chat): stop the recording chat's scroll effect from returning a Promise by adeelahmad · Pull Request #106 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(chat): stop the recording chat's scroll effect from returning a Promise - #106

Merged
adeelahmad merged 2 commits into
mainfrom
claude/chat-effect-fix
Oct 4, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/chat-effect-fix

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel

Description

Before: when you opened a recording's chat (for example with "Ask in chat" or "Chat about this"), the browser console showed a React error: an effect "must not return anything besides a function, which is used for clean-up".

After: the chat opens and scrolls to the latest message without the error.

Motivation and Context

Current Chromium returns a Promise from scrollIntoView. The chat's scroll effect was a one-line arrow, useEffect(() => end.current?.scrollIntoView(...)), so it returned that Promise to React. It now has braces and returns nothing. No other effect in the frontend has this shape.

Steps to reproduce (if appropriate):

Open a recording in Chrome, open its Chat tab, and check the console.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests. __tests__/recording-chat-tab.test.tsx mocks scrollIntoView to return a Promise, as Chromium's does. It fails without the fix and passes with it.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

🤖 Generated with Claude Code

…romise

Current Chromium returns a Promise from scrollIntoView, and the effect's
arrow returned it, so React logged an effect error when the chat opened.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@adeelahmad adeelahmad self-assigned this Oct 4, 2026
@adeelahmad
adeelahmad merged commit 051a2c6 into main Oct 4, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0