mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8910] [MERGED] perf(client): open chats and panels without waiting on the network #8877
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8877
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8910
Author: @Gunterlie
Created: 11/6/2026
Status: ✅ Merged
Merged: 11/6/2026
Merged by: @Gunterlie
Base:
staging← Head:perf/feel-3-instant-clicks📝 Commits (4)
1fe09e5perf(client): open chats and panels without waiting on the networkb641cd2fix(client): keep game and multiplayer chats on the detail before mounting39d073ffix(client): address Dottore review on instant chat and panel opens371dc35test(e2e): type the cold-chat list filter without a type argument on the untyped query client📊 Changes
10 files changed (+117 additions, -73 deletions)
View changed files
📝
e2e/advanced-memory-navigation.e2e.ts(+4 -0)📝
packages/client/src/components/chat/ChatArea.tsx(+3 -2)📝
packages/client/src/components/chat/RecentChats.tsx(+3 -0)📝
packages/client/src/components/layout/AppShell.tsx(+17 -2)📝
packages/client/src/components/layout/ChatSidebar.tsx(+10 -1)📝
packages/client/src/components/layout/RightPanel.tsx(+4 -46)📝
packages/client/src/components/layout/TopBar.tsx(+4 -1)➕
packages/client/src/components/layout/right-panel-panels.ts(+21 -0)📝
packages/client/src/hooks/use-chats.ts(+50 -20)📝
packages/client/src/localization/locales/en.json(+1 -1)📄 Description
Part of #8904.
Why
Opening a chat waited for two requests one after the other: the chat detail, then (only once it arrived) the transcript. Until the detail came back the whole chat area showed an opening state. The chat view and right-panel panels are lazy chunks, so the first chat or panel open in a session also waited for a code download, and React's Suspense throttle added up to 300 ms on top.
What changed
useChatstarts from the chat's entry in the chat list cache (placeholderData). The chat view mounts immediately and the transcript request starts at once instead of after the detail. If the detail request fails, the existing opening/error state still shows (placeholder data is not kept on error).pointerdown, before the click. Hook and prefetch share one query definition (chatMessagesQueryOptions).preloadedLazyhelper from a small module; hovering (or the pointerover of a tap on) a top-bar button preloads that panel, so the first open renders without a Suspense fallback.Not done here:
keepPreviousDataon messages (unsafe: old messages under a new chat id), a dedicated transcript skeleton (the surfaces already getisMessagesLoading), Spotify lazy loading (follow-up).Proof
Dev Mari, fresh page per run, 5 runs, medians. Numbers follow in a comment.
Manual verification
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.