Fix #110: Private Message Chat Scrolling Issue #131

Open
typosaurus wants to merge 1 commits from typosaurus/ticket-110 into master
Collaborator

Resolves #110.

Plan

Implementation Plan

Problem
The constant AUTO_SCROLL_MARGIN_PX is set to 100 in devplacepy/static/js/components/AppChat.js (line 17). When a user scrolls up and the viewport is still within 100 px of the bottom, _stabilizeScroll() snaps back to the bottom, defeating the user’s attempt to read older messages. Reducing this margin to 0 makes auto-scroll fire only when the user is literally at the very bottom, matching the expected behavior of typical messaging applications.

Change

File Line Current Value New Value
devplacepy/static/js/components/AppChat.js 17 const AUTO_SCROLL_MARGIN_PX = 100; const AUTO_SCROLL_MARGIN_PX = 0;

No other functions or constants require modification. The inner stabilization check at line 872 (scrollTop < 10) already handles the “truly at bottom” case; setting the outer margin to 0 makes the two thresholds consistent.

Execution Steps

  1. Open devplacepy/static/js/components/AppChat.js and change line 17 as specified.
  2. Verify the file syntax is still valid JavaScript (no trailing issues).
  3. Ensure the project’s test environment has Playwright browsers installed (if not already):
    python -m playwright install
    
  4. Run the project’s verification command:
    pip install -e '.[dev]' -q && python -m pytest
    
    Confirm that all tests pass (no new failures; pre-existing failures unrelated to this change—such as missing browsers—must be resolved as part of the environment setup).

Definition of Done

  • The value of AUTO_SCROLL_MARGIN_PX in AppChat.js is changed from 100 to 0.
  • The project’s test command runs without errors (exit code 0).
  • Manual or automated verification confirms that scrolling up by any amount (including small keyboard steps) no longer triggers a snap back to the bottom, and that new messages still auto-scroll only when the user is at the very bottom of the chat thread.

Opened automatically by Typosaurus.

Resolves #110. ## Plan ## Implementation Plan **Problem** The constant `AUTO_SCROLL_MARGIN_PX` is set to `100` in `devplacepy/static/js/components/AppChat.js` (line 17). When a user scrolls up and the viewport is still within 100 px of the bottom, `_stabilizeScroll()` snaps back to the bottom, defeating the user’s attempt to read older messages. Reducing this margin to `0` makes auto-scroll fire only when the user is literally at the very bottom, matching the expected behavior of typical messaging applications. **Change** | File | Line | Current Value | New Value | |------|------|---------------|-----------| | `devplacepy/static/js/components/AppChat.js` | 17 | `const AUTO_SCROLL_MARGIN_PX = 100;` | `const AUTO_SCROLL_MARGIN_PX = 0;` | No other functions or constants require modification. The inner stabilization check at line 872 (`scrollTop < 10`) already handles the “truly at bottom” case; setting the outer margin to `0` makes the two thresholds consistent. **Execution Steps** 1. Open `devplacepy/static/js/components/AppChat.js` and change line 17 as specified. 2. Verify the file syntax is still valid JavaScript (no trailing issues). 3. Ensure the project’s test environment has Playwright browsers installed (if not already): ```bash python -m playwright install ``` 4. Run the project’s verification command: ```bash pip install -e '.[dev]' -q && python -m pytest ``` Confirm that all tests pass (no new failures; pre-existing failures unrelated to this change—such as missing browsers—must be resolved as part of the environment setup). **Definition of Done** - [ ] The value of `AUTO_SCROLL_MARGIN_PX` in `AppChat.js` is changed from `100` to `0`. - [ ] The project’s test command runs without errors (exit code 0). - [ ] Manual or automated verification confirms that scrolling up by any amount (including small keyboard steps) no longer triggers a snap back to the bottom, and that new messages still auto-scroll only when the user is at the very bottom of the chat thread. Opened automatically by Typosaurus.
typosaurus added 1 commit 2026-07-23 05:46:31 +02:00
ticket #110 attempt 1
Some checks failed
DevPlace CI / test (pull_request) Failing after 12s
c163fdfd3b
Some checks failed
DevPlace CI / test (pull_request) Failing after 12s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin typosaurus/ticket-110:typosaurus/ticket-110
git checkout typosaurus/ticket-110
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: retoor/devplacepy#131
No description provided.