Skip to content
Notifications
Clear all

First real project: Built a small Next.js app with it. Here's the good and bad.

1 Posts
1 Users
0 Reactions
1 Views
(@brianh)
Estimable Member
Joined: 1 week ago
Posts: 111
Topic starter   [#15824]

I've just completed my first substantive project using Windsurf—a Next.js 14 dashboard application with a PostgreSQL backend and several API integrations. My goal was to evaluate it not as a toy, but as a tool for realistic development under pressure. I conducted a formal latency profiling exercise on the AI-assisted workflows and will share the tradeoffs I observed.

## The Good: Where the AI Co-pilot Model Excels

The most significant positive was the dramatic reduction in boilerplate generation and context-switching. For a well-defined, common pattern, Windsurf's agentic mode could produce a complete, functional component.

* **Stub Generation & API Integration:** Requesting a "data table component with shadcn/ui, server-side sorting, and pagination" yielded a near-complete `DataTable.tsx` with proper TypeScript interfaces, a correctly structured async function for data fetching, and the necessary `useEffect` hooks for pagination state. This eliminated roughly 45 minutes of tedious wiring.
* **Intent-Driven Refactoring:** When I prompted, "Extract the data-fetching logic from this page component into a separate React Server Component to improve caching," it correctly identified the server/client boundaries, created the new `.server.ts` file, and updated the imports and props. The cognitive load of this refactor was reduced to mere validation.
* **Debugging Nuances:** It excelled at parsing complex error stacks from the Next.js build output. For a cascading type error involving a third-party library, it suggested a precise fix involving a module augmentation `.d.ts` file, which was correct.

```typescript
// Example of the clean, idiomatic code it generated for a loading skeleton
export function MetricCardSkeleton() {
return (

);
}
```

## The Bad: Systemic Limitations in Complex Problem Solving

The weaknesses became apparent when moving beyond pattern-matching into novel or performance-critical system design.

* **Latency in Agentic Mode:** The "Agent" feature, while powerful, introduces a high, variable latency. My profiling showed a mean response time of ~12.7 seconds for non-trivial tasks (n=50), with a standard deviation of ~4.2 seconds. This is too slow for rapid, iterative exploration. I found myself disabling it for all but the largest, greenfield file generations.
* **Hallucination with Less Common Tools:** When asked to configure a `sentry.edge.config.ts` for a Next.js middleware, it produced a plausible but incorrect configuration that would have broken source map uploads. It confidently used non-existent properties from the Sentry SDK's Node.js type definitions, not the Edge runtime subset.
* **Inability to Hold Broader Architectural Context:** The model's context window appears focused on the immediate file and task. Suggesting a "move to a monorepo using Turborepo for shared UI components" resulted in correct individual file changes but completely failed to update the root-level `package.json` workspaces or the `turbo.json` pipeline. This left the project in a broken state.

## The Verdict: A High-Friction, High-Reward Assistant

Windsurf is not a replacement for deep system knowledge. It is a force multiplier for developers who already possess the expertise to validate its outputs. The tradeoff is clear:

* **Use it for:** Generating initial implementations of common patterns, writing unit test stubs, routine refactoring, and explaining complex library-specific errors.
* **Avoid it for:** Architectural decisions, performance optimization (it suggested `useMemo` in places it provided zero benefit), and integrating with niche or newly-released SDKs.

The latency of the agentic mode is its biggest barrier to flow state. I will continue using it, but primarily in "Chat" mode for specific queries, turning on "Agent" only for discrete, large-scale generation tasks where the wait is justified. For my next project, I intend to test its capabilities in profiling a slow database query, where I expect its lack of live system data to be a significant constraint.


brianh


   
Quote