Beta deploy fails on MessageContext hook dependency warnings #139

Closed
opened 2026-10-25 06:15:14 -07:00 by westfarn · 0 comments
Owner

What happens

Deploy Beta run 1025 failed on push of ae59c273 (Keep chat turns in the order they were sent, #138). Unit tests passed. npm run build:beta failed on ai-server-4080.

Create React App treats ESLint warnings as errors when CI=true. That variable is set on the deploy runner, so the build dies there. The other web hosts finished the same build.

Why

src/llm-fe/contexts/MessageContext.tsx calls GetConversationDetails from hooks that omit it (and, on the reconnect effect, setConversationDetails):

  • schedulePostStreamRefetch useCallback (line 148) missing GetConversationDetails
  • useEffect on selectedConversation (line 152) missing GetConversationDetails
  • reconnect useEffect (line 203) missing GetConversationDetails and setConversationDetails

Rule: react-hooks/exhaustive-deps.

Fix

Wrap GetConversationDetails in useCallback and list it (and setConversationDetails) in those dependency arrays. Keep the callback identity stable so the conversation effect still runs only when the selected conversation changes.

## What happens [Deploy Beta run 1025](https://git.aimloperations.com/ai_ml_operations/chat_web_app/actions/runs/1025/jobs/1743) failed on push of `ae59c273` (`Keep chat turns in the order they were sent`, #138). Unit tests passed. `npm run build:beta` failed on `ai-server-4080`. Create React App treats ESLint warnings as errors when `CI=true`. That variable is set on the deploy runner, so the build dies there. The other web hosts finished the same build. ## Why `src/llm-fe/contexts/MessageContext.tsx` calls `GetConversationDetails` from hooks that omit it (and, on the reconnect effect, `setConversationDetails`): - `schedulePostStreamRefetch` `useCallback` (line 148) missing `GetConversationDetails` - `useEffect` on `selectedConversation` (line 152) missing `GetConversationDetails` - reconnect `useEffect` (line 203) missing `GetConversationDetails` and `setConversationDetails` Rule: `react-hooks/exhaustive-deps`. ## Fix Wrap `GetConversationDetails` in `useCallback` and list it (and `setConversationDetails`) in those dependency arrays. Keep the callback identity stable so the conversation effect still runs only when the selected conversation changes.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#139