-
Notifications
You must be signed in to change notification settings - Fork 2k
test(max): Add ThreadCanceledDuringReasoning story #39790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
const { askMax, setMessageStatus } = useActions(threadLogic) | ||
const { threadRaw, threadLoading } = useValues(threadLogic) | ||
const { dataProcessingAccepted } = useValues(maxGlobalLogic) | ||
|
||
useEffect(() => { | ||
if (dataProcessingAccepted) { | ||
setTimeout(() => { | ||
setConversationId(CONVERSATION_ID) | ||
askMax('Show me trends for user signups') | ||
}, 0) | ||
} | ||
}, [dataProcessingAccepted, setConversationId, askMax]) | ||
|
||
useEffect(() => { | ||
if (threadRaw.length === 2 && !threadLoading) { | ||
setMessageStatus(1, 'canceled') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call setMessageStatus with unsupported "canceled" value
This story sets setMessageStatus(1, 'canceled')
, but setMessageStatus
is typed to accept only the MessageStatus
union 'loading' | 'completed' | 'error'
from maxLogic
/maxThreadLogic
. Because no variant named 'canceled'
exists, TypeScript will flag this line and the frontend typescript check will fail. Either extend the MessageStatus
union and downstream handling to include a canceled state or use one of the existing statuses here.
Useful? React with 👍 / 👎.
Size Change: 0 B Total Size: 3.06 MB ℹ️ View Unchanged
|
Changes
Adding a story for the case when generation was canceled when the last message was an ai/reasoning one:
(screenshot from #39717)