Skip to content

Fix stale SME store closures in chat shell#375

Merged
BunsDev merged 1 commit into
mainfrom
okcode/fix-sme-chat-react-error
Apr 9, 2026
Merged

Fix stale SME store closures in chat shell#375
BunsDev merged 1 commit into
mainfrom
okcode/fix-sme-chat-react-error

Conversation

@BunsDev

@BunsDev BunsDev commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Switch SmeChatShell to read Zustand actions from useSmeStore.getState() inside effects instead of capturing them in closures.
  • Remove unnecessary effect dependencies so project/message subscriptions stay stable while still using the latest store actions.
  • Prevent stale action references from breaking SME message loading and stream updates after rerenders.

Testing

  • Not run (PR content only).
  • Reviewed the diff to confirm the effects now pull store actions at call time.
  • Verified the change is limited to apps/web/src/components/sme/SmeChatShell.tsx.

- Read SME store actions from current state inside effects
- Prevent unnecessary effect re-runs and React dependency issues
@vercel

vercel Bot commented Apr 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Apr 9, 2026 7:20pm
v0-compute-the-platform-to-build Ready Ready Preview, Open in v0 Apr 9, 2026 7:20pm

@github-actions github-actions Bot added size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Apr 9, 2026
@BunsDev BunsDev merged commit ccfca29 into main Apr 9, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant