MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-127

2.5.16 `pnpm db:seed:large` — dev seed for a real-scale project

Done
Description

Estimate: 14m

A pnpm db:seed:large dev script (scripts/seed-large.ts + a package.json script) that seeds a real-scale project so the finding-#57 scale work is verifiable in the actual UI (you can't see pagination / lazy-load / virtualization with 7 issues). Creates a demo workspace + member + project and a large issue set: a multi-level tree of a few thousand issues — many roots, AND some parents with >50 children (to exercise "Load more children" + windowing) — plus enough rows to span many List pages. Idempotent / re-runnable (clears + reseeds its own demo workspace, never touches other data); prints the seeded project URL + login. Dev tooling only — may use Prisma / createWorkItem directly (NOT product code); kept out of the prod bundle.

(PR #117 merged 2026-06-05, merge commit 98f782fscripts/seed-large.ts + the pnpm db:seed:large package script (run via tsx). Seeds one self-contained demo tenant (fixed user seed-large@motir.dev / hunter2hunter2 + workspace + project) and a ~2,000-issue tree through the SHIPPED create path (allocate-key + repo.create — valid against the kind-parent triggers): 60 root epics (List spans many pages, roots paginate), epic #1 with 130 children (Tree "Load more children" at 50/page) + a deep 90-grandchild branch (nested load-more / virtualization), the rest a handful each. Idempotent (clears its OWN demo workspace by name; never touches other data); refuses NODE_ENV=production; dev-only (not in the Next bundle); size-tunable via SEED_ env; prints a sign-in + the /issues path; documented in the README. The 2.5.6 E2E scale check + the manual Story verification run against it. tsc/eslint(--max-warnings=0)/prettier clean.)*

Acceptance criteria

  • pnpm db:seed:large seeds a demo workspace/project with a few-thousand-issue tree (incl. ≥1 parent with >50 children) + many List-page-spanning rows; idempotent on re-run; prints the project URL + a usable login.
  • The data is valid per the kind-parent + workflow rules (goes through the create path / valid inserts — the DB triggers don't reject it); reasonably fast (batched).
  • Dev-only (excluded from the prod build); documented in the README / Story verification. The 2.5.6 E2E + the manual scale check run against it. tsc/eslint/prettier clean.

Context refs

  • scripts/db-up.sh + package.json scripts; the createWorkItem service / Prisma client + the kind-parent matrix (valid tree shapes)
  • How a workspace + member + project are created (the shipped services / fixtures) for a self-contained demo tenant
  • The Story verification recipe's scale check (the consumer) + 2.5.6's scale E2E
Status
Done
Type
Sub-task