You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Sun-GLiang (via GitHub)" <gi...@apache.org> on 2026/09/01 03:04:48 UTC
[I] bug(ui): returning to a session loses its transcript reading position [maka]
Sun-GLiang opened a new issue, #4413:
URL: https://github.com/apache/maka/issues/4413
## What happened
When a reader scrolls away from the transcript tail in Session A to inspect earlier Turns, opens Session B, and then returns to Session A, Desktop resets Session A's viewport to its latest Turn.
This commonly occurs when Session B finishes while the reader is reviewing history in Session A:
1. The reader scrolls upward in Session A.
2. Session B finishes.
3. The reader opens Session B to inspect its result.
4. The reader returns to Session A.
5. Session A jumps to the transcript tail instead of restoring the previous reading position.
### Actual behavior
Returning to Session A discards its previous reading position and shows the latest Turn.
### Expected behavior
Transcript viewport state should follow the reader's per-Session intent:
- A Session opened for the first time should start at the transcript tail.
- A Session left while pinned to the tail should return to the latest tail.
- A Session left while reading earlier transcript content should restore its previous viewport and remain unpinned.
- Completing or viewing another Session should not change the stored reading position of the current Session.
## How to reproduce
1. Open Session A with enough Turns to make the transcript scrollable.
2. Scroll upward and stop at an earlier Turn.
3. Allow Session B to finish, or open any other existing Session.
4. Switch to Session B.
5. Switch back to Session A.
6. Observe that Session A opens at its latest Turn instead of the earlier Turn from step 2.
The behavior is deterministic when Session A has a sufficiently long transcript.
## Environment
- Maka commit: `6fca2f51` (`main`)
- OS: macOS 15.6 (`24G84`)
- Surface: Desktop development build
- Node.js: `v24.19.0`
- npm: `11.17.0`
## Logs, screenshots, or additional context
No logs are required to observe the issue; the viewport jump is visible and reproducible.
### Source-level failure path
The Desktop transcript uses a host-owned scroller that remains mounted across Session switches. In `useChatScroll`, changing `sessionId` unconditionally calls `authority.pinToTail()`.
As a result:
1. The shared transcript scroller survives the Session switch.
2. Session activation is treated as a request to pin to the tail.
3. No per-Session viewport position or pin intent is restored.
4. Returning to a Session that was left while reading history jumps to its latest Turn.
Relevant files:
- `packages/ui/src/use-chat-scroll.ts`
- `packages/ui/src/transcript-scroll-authority.tsx`
### Regression coverage
A regression test should cover at least the following sequence:
1. Open Session A at the tail.
2. Scroll upward to an earlier visible Turn.
3. Open Session B.
4. Return to Session A.
5. Verify that the same Turn is restored at approximately the same viewport position and that Session A remains unpinned.
6. Leave Session B pinned, allow its transcript to grow, and return to it.
7. Verify that Session B opens at its latest tail.
The fix should preserve the existing single scroll-authority model rather than introducing a second writer for the transcript scroller.
### Related issues
- #4099 established a single position authority for the transcript scroller.
- #4269 tracks a different snap-to-tail case caused by geometry changes within the same Session.
- #4112 covers the complementary behavior for Sessions intentionally left at the live tail.
_AI assistance disclosure: Drafted and published with Maka at the reporter's direction. The reporter owns the final review and submission._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [I] bug(ui): returning to a session loses its transcript reading position [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #4413: bug(ui): returning to a session loses its transcript reading position
URL: https://github.com/apache/maka/issues/4413
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org