fix: fix auto scroll + regression tests for incremental resize - #14
Merged
Conversation
Covers the two key behaviors introduced by 'fix: fix auto scroll': - Window clamps to available space when screen gap < MAX_CHAT_WINDOW_HEIGHT (Math.min cap), locking isPreExpandedRef once the cap is reached. - isPreExpandedRef resets on session reopen so incremental growth restarts correctly instead of being silently skipped. All 147 tests pass, 100% coverage maintained. Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
This was referenced Apr 5, 2026
quiet-node
added a commit
that referenced
this pull request
Apr 10, 2026
* fix: fix auto scroll * test: add regression tests for incremental scroll-anchor resize Covers the two key behaviors introduced by 'fix: fix auto scroll': - Window clamps to available space when screen gap < MAX_CHAT_WINDOW_HEIGHT (Math.min cap), locking isPreExpandedRef once the cap is reached. - isPreExpandedRef resets on session reopen so incremental growth restarts correctly instead of being silently skipped. All 147 tests pass, 100% coverage maintained. Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com> --------- Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node
added a commit
that referenced
this pull request
Apr 10, 2026
* fix: fix auto scroll * test: add regression tests for incremental scroll-anchor resize Covers the two key behaviors introduced by 'fix: fix auto scroll': - Window clamps to available space when screen gap < MAX_CHAT_WINDOW_HEIGHT (Math.min cap), locking isPreExpandedRef once the cap is reached. - isPreExpandedRef resets on session reopen so incremental growth restarts correctly instead of being silently skipped. All 147 tests pass, 100% coverage maintained. Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com> --------- Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node
added a commit
that referenced
this pull request
Apr 11, 2026
* fix: fix auto scroll * test: add regression tests for incremental scroll-anchor resize Covers the two key behaviors introduced by 'fix: fix auto scroll': - Window clamps to available space when screen gap < MAX_CHAT_WINDOW_HEIGHT (Math.min cap), locking isPreExpandedRef once the cap is reached. - isPreExpandedRef resets on session reopen so incremental growth restarts correctly instead of being silently skipped. All 147 tests pass, 100% coverage maintained. Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com> --------- Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
This was referenced Apr 11, 2026
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.
Summary
Fixes the chat window auto-scroll behavior and adds regression tests to prevent future regressions.
Fix (commit
aa3a5a5)Rewrote the
ResizeObserverwindow-sizing logic inApp.tsx:Math.min(MAX_CHAT_WINDOW_HEIGHT, availableSpace), pinning the bottom while expanding the top.isPreExpandedRefonly locks once max height is truly reached.Regression Tests (commit
9e957e8)Added two new tests to the
ResizeObserver window sizing with anchorsuite:MAX_CHAT_WINDOW_HEIGHT, the window is capped at the available space andisPreExpandedReflocks once that cap is hit.isPreExpandedRefresets on session reopen — after a locked session, closing the overlay resets the ref so the next session's first resize uses actual content height instead of being skipped.All 147 tests pass, 100% coverage maintained.