Skip to content

fix(client-directive): fix build error - #1778

Merged
icecrasher321 merged 1 commit into
stagingfrom
fix/trigger-build-err
Oct 31, 2025
Merged

fix(client-directive): fix build error#1778
icecrasher321 merged 1 commit into
stagingfrom
fix/trigger-build-err

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

Fix build error related to not specifying useClient directive.

Type of Change

  • Bug fix

Testing

bun run build

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Oct 31, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedOct 31, 2025 3:25am

@icecrasher321
icecrasher321 merged commit 4a3c6d1 into stagingOct 31, 2025
9 checks passed

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Fixed build error by adding the 'use client' directive to use-workflow-diff.ts. This file exports a React hook that uses client-side hooks (useState, useCallback, useRef), which require the 'use client' directive in Next.js App Router to execute on the client side.

Key changes:

  • Added 'use client' directive at the top of the file to enable client-side React hooks

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a minimal, standard fix for Next.js App Router requirements. Adding the 'use client' directive is the correct and only solution for files that use React client hooks. No logic changes, no security concerns, and addresses the build error correctly.
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/lib/workflows/diff/use-workflow-diff.ts5/5Added 'use client' directive to fix build error for React hook file

Sequence Diagram

sequenceDiagram
participant Build as Next.js Build
participant Hook as use-workflow-diff.ts
participant React as React Runtime
Note over Build,Hook: Before Fix (Build Error)
Build->>Hook: Import and analyze file
Hook->>React: Uses useState, useCallback, useRef
React-->>Build: Error: Client hooks without 'use client'
Note over Build,Hook: After Fix (Successful Build)
Build->>Hook: Import and analyze file
Note over Hook: 'use client' directive present
Hook->>React: Uses useState, useCallback, useRef
React-->>Build: Success: Client-side execution enabled
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
waleedlatif1 deleted the fix/trigger-build-err branch November 7, 2025 20:18
@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
Sign up for freeto 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.

1 participant

@icecrasher321