[Dark Factory] Implement issue #1 as a strict TypeScript Next.js 14 full-stack portal with two routes (Project Brief Submission + Build Tracker Dashboard), exact premium dark UI per spec, complete API surface with Zod validation and structured errors, in-memory project/pipeline state, SSE live logs, and a 6-stage simulation engine with realistic timings and real-time stats.#2
Merged
[Dark Factory] Implement issue #1 as a strict TypeScript Next.js 14 full-stack portal with two routes (Project Brief Submission + Build Tracker Dashboard), exact premium dark UI per spec, complete API surface with Zod validation and structured errors, in-memory project/pipeline state, SSE live logs, and a 6-stage simulation engine with realistic timings and real-time stats.#2
Conversation
…s 14 full-stack portal with two routes (Project Brief Submission + Build Tracker Dashboard), exact premium dark UI per spec, complete API surface with Zod validation and structured errors, in-memory project/pipeline state, SSE live logs, and a 6-stage simulation engine with realistic timings and real-time stats. Generated by Dark Factory v4 pipeline job cmm7nrax40002mbk2h5kreygq
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dark Factory -- Automated PR
Implementation Plan
package.json, tsconfig.json, next.config.js, tailwind.config.ts, postcss.config.js, .env.examplesrc/lib/types/*.ts, src/lib/constants/design-tokens.ts, src/lib/constants/pipeline.tssrc/lib/validation/project-brief-schema.ts, src/lib/validation/common.tssrc/lib/api/response.ts, src/lib/api/errors.tssrc/lib/store/in-memory-store.ts, src/lib/store/event-bus.tssrc/lib/pipeline/simulation-engine.ts, src/lib/pipeline/stage-runner.ts, src/lib/pipeline/log-generator.ts, src/lib/pipeline/stats-calculator.tssrc/app/api/projects/route.ts, src/app/api/projects/[projectId]/route.ts, src/app/api/projects/[projectId]/stats/route.ts, src/app/api/projects/[projectId]/pipeline/start/route.ts, src/app/api/projects/[projectId]/events/route.tssrc/components/ui/* (shadcn generated), src/lib/utils.tssrc/components/project-brief/*.tsxsrc/app/page.tsx (or src/app/project-brief/page.tsx), src/app/layout.tsxsrc/components/build-tracker/*.tsx, src/hooks/use-sse.ts, src/hooks/use-pipeline-state.tssrc/app/tracker/[projectId]/page.tsx (or spec-defined route), src/app/globals.csssrc/lib/api/client.ts, src/lib/config/env.tstests/unit/pipeline-engine.test.ts, tests/unit/validation.test.ts, tests/integration/api-routes.test.ts, tests/integration/sse.test.ts, tests/e2e/project-brief-to-tracker.spec.tsREADME.mdCode Review Verdict
✅ Approved
Issues flagged:
src/lib/store/in-memory-store.ts: TTL cleanup is implemented but never scheduled/invoked anywhere, so stale projects are never actually evicted during normal runtime. This does not satisfy the intended unbounded-growth prevention behavior unless another caller runscleanup()periodically.src/hooks/use-sse.ts: Custom reconnect logic recreates a newEventSourcewithout preserving last processed event id. Server supports replay vialast-event-id, but client does not explicitly carry forward ids, so reconnect-safe replay can miss events in transient disconnect windows.src/components/project-brief/step-progress.tsx: Elements returned fromArray.mapare wrapped in an unkeyed fragment (<>...</>), which can trigger React key warnings and unstable reconciliation. Put a key on the fragment.src/lib/api/client.ts:requestJsonthrows a genericRequest failedon non-OK responses and discards structured API error payload details. This weakens debuggability and prevents actionable UI error states.tests/e2e/project-brief-to-tracker.spec.ts: E2E test coverage is very limited to heading visibility at breakpoints; it does not validate the required end-to-end flow (brief submission -> tracker navigation -> pipeline start -> live updates).src/app/api/projects/[projectId]/pipeline/start/route.ts: RequiringprojectIdin both URL and body adds redundant validation surface. Consider using only the route param for start requests to simplify API ergonomics.Pipeline Cost
Total: $1.0135 USD
This PR was opened automatically by Dark Factory v4.