Skip to content

Projects page does not load in web UI #101

@itsmiso-ai

Description

@itsmiso-ai

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.tsxgetProjects() 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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions