Repository navigation
🕰️ fix: Send a Side Chat's Turns as Temporary Only When Its Own Conversation Is - #18455
danny-avila wants to merge 2 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
A turn sent in a side chat is posted as temporary whenever the chat on screen is a temporary one. Open a new chat, switch Temporary Chat on, open a saved conversation beside it from the sidebar, and send a message there: the request for the saved conversation carries
isTemporary: true.Whether a turn is temporary came from the page's setting for every pane. The route keeps that setting in step with the conversation main chat shows, so it describes main chat's conversation and nothing else. The side chat (#18417) builds its turns with the same services, at its own pane, and took the setting as its own.
The server takes the stored conversation's flag ahead of the request's when the record has one, so the saved conversation in the reproduction stayed saved. A record that stores no flag has only the request to go by.
With this change a pane other than main chat's two sends its turns as temporary when the conversation it holds is temporary (including one stored with only a deadline), or when the deployment forces temporary retention. Main chat is unchanged.
Related to #18417.
How it works
It is the same split
useTurnServicesalready makes for the conversation main chat is compared with: what belongs to main chat's turns stays with panes 0 and 1.Type of change
Testing
Reproduced in a real browser on the mock e2e lane before the change: with a temporary new chat on screen, the side chat's start request for a saved conversation posted
isTemporary: true; the stored conversation and its messages read backisTemporary: falsewith noexpiredAt.Both new tests were run without the fix and fail there (
Expected: false, Received: true).Tested environments/configuration:
Automated tests:
client: new case insrc/hooks/Chat/__tests__/services.readCodeInputs.spec.tsx(a saved conversation beside a temporary main chat, a temporary one beside a saved main chat, a record with only a deadline, forced retention).@scenario:side-chat-turn-is-not-temporary-beside-a-temporary-chatine2e/specs/mock/scenarios/side-chat-open-beside.spec.ts.npx jest src/hooks/Chatinclient: 20 of 21 suites pass.target.spec.tsxfails two cases locally withECONNREFUSED 127.0.0.1:3080(a real request leaves the test); it does not import the changed file and the same suite passes in CI ondev, so I am leaving it to this PR's CI run to confirm.