[GH-ISSUE #5796] [Issue]: Changing Messages per page while a chat is open collapses the transcript to one message #3201

Closed
opened 2026-10-21 06:00:31 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Romuromylus on GitHub (Sep 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5796

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Changing Settings > General > Responses > "Messages per page" while a chat is open leaves the transcript with a single message (or two) mounted until the page is reloaded; no refetch with the new page size is issued.

Expected behavior

After changing the page size, the open chat should refetch (or at least keep) its loaded history at the new size, so the transcript shows the configured number of messages.

Actual behavior

With a 120-message Conversation chat open (20 loaded), changing the value from 20 to 100 leaves only message #120 rendered; changing from 0 (all 120 loaded) to 20 leaves #119-#120. The network log shows no new /messages?limit= request. Reloading the page restores a correct transcript at the new size.

Steps to reproduce

  1. Open a chat with more than 100 messages at the default "Messages per page" of 20.
  2. Open Settings > General > Responses and set "Messages per page" to 100, then Tab out to commit.
  3. Look at the chat: only the newest message is mounted.
  4. Reload the page: 100 messages load correctly.

Environment

  • Marinara Engine version: staging @ d277828ac (2026-09-03)
  • Install type: docker
  • OS + version: Linux container (server), Windows 11 (client)
  • Browser or app shell: Chrome 143

Logs, screenshots, or video

No console errors. Reproduced on the staging build and on the #5794 branch (which changes only the render window, not the fetch/trim path); the collapse is in the loaded message list itself, so it predates that change.

Additional context

Found while verifying #5794. The page-size change flows into useChatMessages(activeChatId, messagePageSize) and the trimNewestLoadedMessagePage effect in ChatArea.tsx (~640-650); the shared query key does not include the page size (#4721 note in use-chats.ts), which is likely where the loaded pages and the new size fall out of step. Workaround: reload after changing the setting.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (Sep 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5796 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Changing Settings > General > Responses > "Messages per page" while a chat is open leaves the transcript with a single message (or two) mounted until the page is reloaded; no refetch with the new page size is issued. ## Expected behavior After changing the page size, the open chat should refetch (or at least keep) its loaded history at the new size, so the transcript shows the configured number of messages. ## Actual behavior With a 120-message Conversation chat open (20 loaded), changing the value from 20 to 100 leaves only message #120 rendered; changing from 0 (all 120 loaded) to 20 leaves #119-#120. The network log shows no new `/messages?limit=` request. Reloading the page restores a correct transcript at the new size. ## Steps to reproduce 1. Open a chat with more than 100 messages at the default "Messages per page" of 20. 2. Open Settings > General > Responses and set "Messages per page" to 100, then Tab out to commit. 3. Look at the chat: only the newest message is mounted. 4. Reload the page: 100 messages load correctly. ## Environment - Marinara Engine version: staging @ d277828ac (2026-09-03) - Install type: docker - OS + version: Linux container (server), Windows 11 (client) - Browser or app shell: Chrome 143 ## Logs, screenshots, or video No console errors. Reproduced on the staging build and on the #5794 branch (which changes only the render window, not the fetch/trim path); the collapse is in the loaded message list itself, so it predates that change. ## Additional context Found while verifying #5794. The page-size change flows into `useChatMessages(activeChatId, messagePageSize)` and the `trimNewestLoadedMessagePage` effect in `ChatArea.tsx` (~640-650); the shared query key does not include the page size (#4721 note in `use-chats.ts`), which is likely where the loaded pages and the new size fall out of step. Workaround: reload after changing the setting. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:00:31 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.

<!-- gh-comment-id:5551230169 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Completed on staging in #5865 (merge 314a71a586).

Committed page-size edits before resetting the active transcript and preserved changes made while its query is disabled.

Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.

<!-- gh-comment-id:5552144298 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Completed on staging in #5865 (merge 314a71a5862f120284bb24014e401e226be79866). Committed page-size edits before resetting the active transcript and preserved changes made while its query is disabled. Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
Pasta-Devs/Marinara-Engine#3201
No description provided.