Skip to content

Fix: stop returning stale answers from NotebookLM's virtualized chat DOM - #47

Open
mihai-2026 wants to merge 1 commit into
PleasePrompto:masterfrom
mihai-2026:master
Open

Fix: stop returning stale answers from NotebookLM's virtualized chat DOM#47
mihai-2026 wants to merge 1 commit into
PleasePrompto:masterfrom
mihai-2026:master

Conversation

@mihai-2026

Copy link
Copy Markdown

Summary

  • NotebookLM keeps chat history server-side per notebook, so a fresh browser session can already have prior messages in the DOM before a new question is even asked.
  • The chat list is also virtualized, leaving stale/off-screen message nodes matching RESPONSE_SELECTORS positioned after the live messages in DOM order. Picking `elements[-1]%6

NotebookLM keeps chat history server-side per notebook, so a fresh
browser session can already have prior messages in the DOM. Its
virtualized chat list also leaves stale, off-screen message nodes
matching RESPONSE_SELECTORS positioned after the live messages in DOM
order. Picking elements[-1] therefore returned the same old answer
regardless of the new question asked.

Fix selects the response by visual position (largest bounding-box Y,
i.e. bottom-most on screen, where NotebookLM auto-scrolls the newest
message) instead of DOM order, and adds a pre-submit baseline check
that waits for a genuinely new response before polling for stability.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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