Skip to content

test: cover stale conversation switching - #18208

Closed
01JohnMa wants to merge 1 commit into
infiniflow:mainfrom
01JohnMa:codex/test-stale-session-switch
Closed

01JohnMa wants to merge 1 commit into
infiniflow:mainfrom
01JohnMa:codex/test-stale-session-switch

Conversation

@01JohnMa

@01JohnMa 01JohnMa commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add focused frontend regression coverage for stale conversation messages during chat session switching.

Why

When the URL already points to a newly created conversation while the child still receives the previous conversation prop, the old messages must not be hydrated into the new session. This reproduces the race fixed by #18140.

The production guard is already present on main; this PR adds the missing component-level regression test.

Validation

  • npm test -- --runInBand src/pages/next-chats/chat/chat-box/single-chat-box.test.tsx
  • npx oxfmt --check src/pages/next-chats/chat/chat-box/single-chat-box.test.tsx
  • npx oxlint src/pages/next-chats/chat/chat-box/single-chat-box.test.tsx
  • The stale-session test fails when the fix: prevent stale conversation messages during session switch #18140 guard is removed and passes with the guard restored.

Related: #18140

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82a6c5cd-31eb-4e0d-ad99-4af31dea9e46

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@01JohnMa

Copy link
Copy Markdown
Contributor Author

Superseded by #18211, which contains the same commit and diff under the renamed test/stale-session-switch branch.

@01JohnMa

Copy link
Copy Markdown
Contributor Author

Closing in favor of #18211.

@01JohnMa 01JohnMa closed this Aug 13, 2026
@01JohnMa
01JohnMa deleted the codex/test-stale-session-switch branch August 13, 2026 06:44
JinHai-CN pushed a commit that referenced this pull request Aug 19, 2026
## Summary

Add focused frontend regression coverage for stale conversation messages
during chat session switching.

Related: #18140.

Replaces #18208.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant