Describe the bug
The Projects page returns HTTP 500. All other pages (Board, Agents, Automation) return HTTP 200.
Root cause identified (from server logs)
The query in getProjects() uses include: { labels: true }:
const issues = await prisma.issue.findMany({
where: { repository: { enabled: true } },
include: { repository: true, labels: true }, // ← labels is a scalar, not a relation
});
Prisma include only accepts relation fields. labels is a String[] scalar field, so include: { labels: true } is invalid and throws a PrismaClientValidationError at runtime:
Invalid scalar field `labels` for include statement on model Issue.
Note that include statements only accept relation fields.
Why board works and projects doesn't
- Board page uses:
include: { repository: true } — only relations ✅
- Projects page uses:
include: { repository: true, labels: true } — extra scalar in include ❌
Fix
Remove labels: true from the include, or move it to select:
// Option A: just remove labels from include
include: { repository: true }
// Option B: select labels explicitly (correct for scalars)
include: { repository: true },
select: { labels: true }
Affected file
src/app/projects/page.tsx — getProjects() function, line ~16
Introduction date
Commit fa7427f (initial commit) — the bug has existed since the page was created, but the behavior changed between Prisma versions such that it now throws instead of silently ignoring it.
Environment
- Mission Control 0.2.0, Prisma 7.8.0, PrismaPg adapter
Describe the bug
The Projects page returns HTTP 500. All other pages (Board, Agents, Automation) return HTTP 200.
Root cause identified (from server logs)
The query in
getProjects()usesinclude: { labels: true }:Prisma
includeonly accepts relation fields.labelsis aString[]scalar field, soinclude: { labels: true }is invalid and throws aPrismaClientValidationErrorat runtime:Why board works and projects doesn't
include: { repository: true }— only relations ✅include: { repository: true, labels: true }— extra scalar in include ❌Fix
Remove
labels: truefrom the include, or move it toselect:Affected file
src/app/projects/page.tsx—getProjects()function, line ~16Introduction date
Commit
fa7427f(initial commit) — the bug has existed since the page was created, but the behavior changed between Prisma versions such that it now throws instead of silently ignoring it.Environment