Skip to content

Linting, unit tests, CI pipeline, sidebar usePathname refactor#3

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/migrate-to-real-database
Draft

Linting, unit tests, CI pipeline, sidebar usePathname refactor#3
Copilot wants to merge 3 commits into
mainfrom
copilot/migrate-to-real-database

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

The repo had no linting, no tests, no CI, and a fragile sidebar that required every page to manually pass its own route as a prop.

Sidebar / AppShell

  • Sidebar converted to "use client", uses usePathname() for active-link detection
  • pathname prop removed from AppShell and all 9 pages

ESLint

  • eslint.config.mjs using eslint-config-next flat config; npm run lint script added
  • Fixed postcss.config.mjs anonymous-default-export warning

Unit tests (Vitest)

  • __tests__/scoring.test.ts — 16 tests covering clamp, computeOpportunityScore, computeEmpireScore (boundary values, weight ordering, integer output)
  • __tests__/validators.test.ts — 29 tests covering all 5 Zod schemas (required fields, string→number coercion, defaults, rejection cases)

GitHub Actions CI

Single job, runs in order: typecheck → lint → test → db:push+seed → build. Uses SQLite; no external DB needed.

Build fix

Added export const dynamic = "force-dynamic" to all 8 DB-reading pages so Next.js doesn't attempt static pre-rendering at build time without a database present. Pages are now correctly emitted as ƒ (Dynamic) in the build manifest.

Cleanup

Removed stray demo-db.json from repo root (canonical copy is at data/demo-db.json).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/AgentEmpire/AgentEmpire/node_modules/prisma/build/child {"product":"prisma","version":"7.5.0","cli_install_type":"local","information":"","local_timestamp":"2026-03-14T06:44:14Z","project_hash":"4825cfe7","cli_path":"/home/REDACTED/work/AgentEmpire/AgentEmpire/node_modules/.bin/prisma","cli_path_hash":"bfdfd4ef" (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 14, 2026

Deploy Preview for personalcommandcenter ready!

Name Link
🔨 Latest commit 4b63bd4
🔍 Latest deploy log https://app.netlify.com/projects/personalcommandcenter/deploys/69b505e91bb171000834af69
😎 Deploy Preview https://deploy-preview-3--personalcommandcenter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 14, 2026

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

Project Deployment Actions Updated (UTC)
agent-empire Error Error Mar 14, 2026 6:54am

…dule pages

Co-authored-by: saifsoub <35741624+saifsoub@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate to a real database and restructure the repository Migrate to Prisma + SQLite/Postgres, restructure into standard Next.js layout, add all module pages and API routes Mar 14, 2026
Copilot AI requested a review from saifsoub March 14, 2026 05:56
…mic pages

Co-authored-by: saifsoub <35741624+saifsoub@users.noreply.github.com>
Copilot AI changed the title Migrate to Prisma + SQLite/Postgres, restructure into standard Next.js layout, add all module pages and API routes Linting, unit tests, CI pipeline, sidebar usePathname refactor Mar 14, 2026
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