Skip to content

fix: add missing type dependency in DocumentTypeChip truncation useEffect#972

Merged
MODSetter merged 1 commit intoMODSetter:devfrom
LikiosSedo:fix/document-type-chip-dependency
Mar 25, 2026
Merged

fix: add missing type dependency in DocumentTypeChip truncation useEffect#972
MODSetter merged 1 commit intoMODSetter:devfrom
LikiosSedo:fix/document-type-chip-dependency

Conversation

@LikiosSedo
Copy link
Contributor

@LikiosSedo LikiosSedo commented Mar 25, 2026

Summary

  • Add type to the useEffect dependency array in DocumentTypeChip so the truncation check re-runs when document type changes

Test plan

  • Verify truncation tooltip updates correctly when document type prop changes

High-level PR Summary

This PR fixes a React hook dependency issue in the DocumentTypeChip component by adding the type prop to the useEffect dependency array. This ensures that the truncation check re-runs whenever the document type changes, allowing the tooltip to update correctly when the component receives a new type prop.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentTypeIcon.tsx

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Mar 25, 2026

@LikiosSedo is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on a474c46..2a7b504

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (1)

surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentTypeIcon.tsx

@MODSetter MODSetter merged commit 8191eaf into MODSetter:dev Mar 25, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants