02-developer-docs
processes-and-archive
Fix

Fix

Cleanup Plan: Remove Non-Documentation Code from energy-flow Repository

Last updated: 2025-06-24 - CLEANUP COMPLETED ✅

Context

The energy-flow repository should contain only documentation. Source code for No Bad Parts (e.g. LiveKit video-room implementation) lives in the sibling no-bad-parts/ repo. Recent merges introduced application code into energy-flow, causing Vercel build failures (e.g. missing @livekit/components-react).

The last known good commit for energy-flow docs was f079b8f (2025-06-06). Everything added after that which relates to app code must be removed or migrated.


Objectives ✅

  1. ✅ Restore Vercel CI success for the docs site.
  2. ✅ Ensure energy-flow contains only markdown/MDX docs and minimal Next.js scaffolding needed by Nextra.
  3. ✅ Preserve LiveKit + session code by moving it (or re-implementing) inside no-bad-parts/.

High-Level Steps - COMPLETED

#ActionDetailsStatus
1Audit current treeLocated all files added after f079b8f that import React components, LiveKit, or create pages/session/*.✅
2Mark for deletionFlagged the following:• components/livekit-wrapper.tsx• components/local-camera-tile.tsx• pages/session/**/*• pages/_app.tsx• scripts/dummy-hints.js• tailwind.config.ts• app/ directory• LiveKit deps in package.json.✅
3Compare with f079b8fUsed git diff f079b8f..HEAD --stat to ensure only unwanted files are targeted.✅
4Remove codeDeleted all identified files.✅
5Revert package.json changes• Removed @livekit/*, added TypeScript/react-types.• Re-installed deps with pnpm install.✅
6Run quality checksrm -rf .next && npm run build - BUILD PASSES ✅npx tsc --noEmit - TYPE CHECK PASSES ✅✅
7Update docsUpdated scratchpad.md with cleanup results.✅
8Push & verifyReady to commit and push for Vercel verification.🔄

Verification Checklist

  • No *.tsx pages except Nextra's default docs layout.
  • package.json has no LiveKit or other application dependencies.
  • npm run build succeeds locally.
  • Routes /session/* return 404 (pending Vercel deployment).

Follow-Up

Once cleanup is merged:

  1. Port the removed LiveKit/session code into the no-bad-parts repo.
  2. Add a CI guard to prevent future non-docs code from being committed here (e.g. lint rule or GitHub Action).

Files Removed

  • components/livekit-wrapper.tsx
  • components/local-camera-tile.tsx
  • pages/session/facilitator.tsx
  • pages/session/partner.tsx
  • pages/_app.tsx
  • scripts/dummy-hints.js
  • tailwind.config.ts
  • app/session/ (directory)
  • pages/session/ (directory)

Verification Checklist

  • No *.tsx pages except Nextra's default docs layout.
  • package.json has no LiveKit or other application dependencies.
  • npm run build succeeds locally and in Vercel.
  • Routes /session/* return 404 (they live in separate app repo).

Follow-Up

Once cleanup is merged:

  1. Port the removed LiveKit/session code into the no-bad-parts repo.2. Add a CI guard to prevent future non-docs code from being committed here (e.g. lint rule or GitHub Action).