Chat2DB Edition
Chat2DB Community
Chat2DB Version
5.3.0
Deployment
Web
Operating System
macOS
Operating System Version
12
Database and Version
No response
Problem Summary
In AISetting, const { curOrg } = useOrgStore(); destructures one field but subscribes to the entire org store, so the component re-renders on every org-store change instead of only when curOrg changes.
Steps to Reproduce
- Open the AI settings page.
- Trigger any unrelated org-store change.
- Observe the settings component re-renders unnecessarily.
Expected Behavior
Subscribe only to the needed field: const curOrg = useOrgStore((s) => s.curOrg);.
Actual Behavior
blocks/Setting/AISetting/index.tsx:24:
const { curOrg } = useOrgStore();
Logs
Screenshots or Additional Context
N/A
Impact
Limited or cosmetic impact
Workaround
N/A
Submission Checklist
Chat2DB Edition
Chat2DB Community
Chat2DB Version
5.3.0
Deployment
Web
Operating System
macOS
Operating System Version
12
Database and Version
No response
Problem Summary
In
AISetting,const { curOrg } = useOrgStore();destructures one field but subscribes to the entire org store, so the component re-renders on every org-store change instead of only whencurOrgchanges.Steps to Reproduce
Expected Behavior
Subscribe only to the needed field:
const curOrg = useOrgStore((s) => s.curOrg);.Actual Behavior
blocks/Setting/AISetting/index.tsx:24:Logs
Screenshots or Additional Context
N/A
Impact
Limited or cosmetic impact
Workaround
N/A
Submission Checklist