Repository navigation
fix: preserve reading position when unpinning messages - #1165
Merged
xHeaven merged 2 commits intoOct 26, 2026
Merged
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Track and release pin clearance resources/js/components/chat/conversation-thread.tsx |
ConversationThread enables clearance when pins appear. It releases clearance after pins are gone when the scroller is at the latest message or has enough room above. The list’s top padding follows the clearance state. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- dev-null-sh/dev-null.sh#1101: Adds pinned-message state, the pinned banner, and the top inset that this change modifies.
Suggested reviewers: simonhamp
Merge Risk: 
Minimal · up to 7f60c
-
No identified issue blocks merging the reading-position fix after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
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
Removing the final pinned message while reading the oldest messages moved the thread upward by 36 px. Keep the reading position fixed when that pin disappears, including when the same poll also delivers a new message.
Changes
Keep the banner's existing inset while removing it would clamp the reverse scroller. Check after restoring the reading anchor, then release it after scrolling away from the boundary or immediately at the latest messages. Unpinned chats keep their normal spacing on fresh loads.
Validation
composer test:lint— passed; existing warnings remain.composer test:type-coverage— 100%.bun run test:unit— 190 Node tests and 535 component tests passed.bun run test:typesandbun run build— passed.Visual evidence
Local seeded fictional conversations in Chrome. Each recording shows the last pin disappearing through a real server update and automatic polling.
Before desktop MP4 · After desktop MP4
Before mobile MP4 · After mobile MP4
Screenshot comparisons after final-pin removal
Combined message + final-unpin polling: desktop GIF · desktop MP4 · mobile GIF · mobile MP4
Compact dock · Simulated unpin 500 rollback · Short history
Device verification
Safari on an iPhone 18 Pro Max simulator running iOS 27.0: touch scrolling to the oldest messages, a new message and final unpin arriving together by polling, and stable reading position verified. The focused composer and enabled Push action remain usable above the navigation/browser controls. Checked fresh navigation and live updates.
iOS recording MP4 · Before · After
Independent review
Independent Sol 6.1 reviewer, high reasoning / fast service: CODE: PASS; VISUAL: PASS, no unresolved findings. Reviewed base
1481df136343248a704b8f06d97ce6a3a8450d63→ head7f60cd82a496b6621b965c057d7c07f4ca15eaaeand all 43 media assets in manifest SHA256cae933c7403a3a2a026c65a1ac3abe6dd31cd799e21a06387fadc16bd6a067b4. Independently replayed the combined poll twice and verified safe inset release afterward. Recordings inspected through sampled frames; native evidence and passing test logs inspected, not independently rerun.Limitations
Summary by CodeRabbit