[ef-12] fix: default binary to production mode and fix standalone next start#10
Conversation
- `failproofai` now launches production dashboard by default (was dev mode) - Removes `--start` flag from binary (production is the only mode for end users) - `scripts/launch.ts`: use `node .next/standalone/server.js` for start mode, fixing the "next start does not work with output: standalone" warning - `package.json`: add `predev`/`prestart` hooks to auto-run `bun link` so `which failproofai` resolves during local development without a manual step Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe CLI now defaults to production dashboard launch instead of dev mode. The launch script implements mode-specific behavior: "start" mode spawns Node with a standalone server and sets network environment variables, while "dev" mode continues using bunx with Next.js. Pre-scripts are added to run Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI (failproofai.mjs)
participant Launch as Launch Script
participant Env as Environment
participant Node as Node.js
participant Bunx as bunx/Next.js
CLI->>Launch: launch("start")
Launch->>Launch: Check mode === "start"
Launch->>Env: Set PORT=8020 (or from args)
Launch->>Env: Set HOSTNAME=0.0.0.0
Launch->>Node: Spawn node [.next/standalone/server.js]
Node->>Node: Start production server
alt Dev Mode
CLI->>Launch: launch("dev")
Launch->>Launch: Check mode === "dev"
Launch->>Bunx: Spawn bunx [--bun, next, dev, ...args]
Bunx->>Bunx: Start development server
end
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary
failproofaibinary now defaults to production dashboard (was incorrectly defaulting to dev mode);--startflag removed as it's no longer neededscripts/launch.tsnow usesnode .next/standalone/server.jsfor production mode, fixing the"next start" does not work with "output: standalone"warningpackage.jsonaddspredev/prestartlifecycle hooks to auto-runbun link, sowhich failproofairesolves correctly during local development without a manual stepTest plan
bun run build— builds.next/standalone/successfullybun run start— auto-links binary, starts production server at http://localhost:8020 without the standalone warningbun run dev— auto-links binary, starts dev server with HMRwhich failproofai→ returns~/.bun/bin/failproofaiafter running either scriptfailproofai→ launches production dashboard (no longer dev mode)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores