Skip to content

fix: remove unnecessary "use client" from pure presentational components#984

Merged
MODSetter merged 1 commit intoMODSetter:devfrom
LikiosSedo:fix/remove-unnecessary-use-client
Mar 26, 2026
Merged

fix: remove unnecessary "use client" from pure presentational components#984
MODSetter merged 1 commit intoMODSetter:devfrom
LikiosSedo:fix/remove-unnecessary-use-client

Conversation

@LikiosSedo
Copy link
Contributor

@LikiosSedo LikiosSedo commented Mar 26, 2026

Summary

  • Remove "use client" directive from 4 components that are purely presentational:
    • AnnouncementsEmptyState.tsx
    • sidebar-separator.tsx
    • public-chat-snapshots-empty-state.tsx
    • Logo.tsx
  • None of these use hooks, event handlers, or browser APIs

Test plan

  • Verify each component renders correctly
  • Verify no client-only API errors introduced

Closes #935

High-level PR Summary

This PR optimizes the Next.js application by removing unnecessary "use client" directives from four purely presentational components (Logo.tsx, sidebar-separator.tsx, AnnouncementsEmptyState.tsx, and public-chat-snapshots-empty-state.tsx) that don't require client-side interactivity. This allows these components to be rendered on the server, improving performance and reducing the client-side JavaScript bundle size.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_web/components/Logo.tsx
2 surfsense_web/app/docs/sidebar-separator.tsx
3 surfsense_web/components/announcements/AnnouncementsEmptyState.tsx
4 surfsense_web/components/public-chat-snapshots/public-chat-snapshots-empty-state.tsx

Need help? Join our Discord

Analyze latest changes

These components only render JSX with props and don't use hooks,
event handlers, or browser APIs.
@vercel
Copy link

vercel bot commented Mar 26, 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 0583ad5..3d762cc

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (4)

surfsense_web/app/docs/sidebar-separator.tsx
surfsense_web/components/Logo.tsx
surfsense_web/components/announcements/AnnouncementsEmptyState.tsx
surfsense_web/components/public-chat-snapshots/public-chat-snapshots-empty-state.tsx

@MODSetter MODSetter merged commit 420eed0 into MODSetter:dev Mar 26, 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