Repository navigation
fix(ui): prevent chat rail flicker when switching conversations - #3218
Open
vedantlavale wants to merge 2 commits into
Open
vedantlavale wants to merge 2 commits into
vedantlavale wants to merge 2 commits into
Conversation
vedantlavale
requested review from
Charlesthebird and
supreme-gg-gg
as code owners
October 15, 2026 12:10
vedantlavale
force-pushed
the
fix/3078-chat-switch-flicker
branch
from
October 15, 2026 12:14
ba40386 to
abbafa0
Compare
Charlesthebird
left a comment
Collaborator
There was a problem hiding this comment.
This automated review is a first pass. A manual review will follow once the blockers are addressed.
Nothing blocks merge. The fix is correct, and the before/after recording in the next comment shows the rail and transcript stay stable during a switch.
✅ What I checked
- ✅ List entry vs.
instance.agent: both map throughtoAgentInstance, and the list reads every page. A conversation missing from the list falls back to the base behaviour. - ✅
isLoading={instance.isLoading}: true only on first load for a key. Background re-reads, polling and errors don't flash or stick the skeleton (shouldRetryOnError: false). - ✅
ChatTranscriptkeeps its hooks above the early return, and the composer lives inAgentChatPage, so the skeleton loses no state. - ✅ The new unit test fails on base; the new Playwright test fails on base only at its skeleton check (agent-rail.spec.ts#L174).
🤖 written by Claude
Collaborator
|
Before/after of switching to a sibling chat with pr3218-reel.mp4🤖 written by Claude |
Charlesthebird
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for adding this! I think removing the test would be fine for this and then I can approve.
Signed-off-by: vedantlavale <vedantlavale@gmail.com>
vedantlavale
force-pushed
the
fix/3078-chat-switch-flicker
branch
from
October 16, 2026 02:36
abbafa0 to
95df886
Compare
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.
Closes #3078
What changed
When a reader switches conversations, the route contains only the conversation ID while the selected instance is loading. The rail now resolves the Agent from the already-loaded conversation list during that gap, so the Agent identity, sibling filter, Agent Details link, and New chat link remain stable.
The transcript also keeps its loading skeleton visible until the selected conversation record is ready, instead of briefly rendering an empty conversation.
How it was tested
NODE_OPTIONS=--localstorage-file=/tmp/kagent-ui-test-storage corepack yarn vitest run src/components/agent/AgentRail.loading.test.tsx— 4 tests passed.corepack yarn typecheck— passed.git diff --check— passed.?mock=slowwhile switching from the seeded ready conversation to its sibling.Before and after
Captured from the same route and mock scenario. The before capture uses local
main; the after capture uses this branch.Risks and follow-ups
This is a UI-only change. It does not change the API, persistence, or conversation lifecycle. The Playwright browser executable was unavailable in the local environment, so the focused browser test remains for CI and manual verification.