Skip to content

(CODUX-148) Persist new-project eligibility state - #2861

Merged
numnx merged 1 commit into
feature/CODUX-205-3d-chat-quickactionsfrom
task/feature-codux-20-t01-codex-f1dff6d9-mrfso8kb
Jul 11, 2026
Merged

(CODUX-148) Persist new-project eligibility state#2861
numnx merged 1 commit into
feature/CODUX-205-3d-chat-quickactionsfrom
task/feature-codux-20-t01-codex-f1dff6d9-mrfso8kb

Conversation

@numnx

@numnx numnx commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Persist new-project eligibility state

Automated task PR opened by Code UX for T01.

📋 Summary

Sprint: Sprint 205 · 3d Chat Quickactions · Task: T01

Make idle 3D Chat quickactions catalog-driven, responsively distributed, guidance-aware, and safe to show only for freshly initialized new projects where required.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.6-sol

⏱️ Timing

Started 2026-07-11 03:18:05 UTC
Finished 2026-07-11 03:30:37 UTC
Duration 12m 33s

📊 Token Usage

Metric Value
Input tokens 220,303
Cached input tokens 10,232,320
Output tokens 24,442
Total tokens 10,477,065
Invocations 1
Tool calls 77
Active time 12m 3s

Included usage estimate (subscription/local login): $6.95

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Persist new-project provenance and expose whether its repository is still in the initial seeded state so dashboard quickactions can fail closed.

## Scope
- `src/contracts/project-management-types.ts`
- `src/repositories/db/app-db-schema.ts`
- `src/repositories/db/app-db-migrations.ts`
- `src/repositories/project-management/project-summary-query.ts`
- `src/repositories/project-management-repository.ts`
- `src/domain/projects/project-initializer.ts`
- `src/services/project-initialization-state-service.ts`
- `src/server/project-routes.ts`, `src/server/dashboard-server.ts`, and `src/server/code-ux-server.ts`
- `dashboard/src/v2/lib/project-api.ts`
- `dashboard/src/v2/hooks/use-project-initialization-state.ts`
- `dashboard/src/v2/hooks/use-chat-page-data.ts`
- Focused repository, service, route, and dashboard hook tests

## Implementation Requirements
1. Preserve `new-local` and `new-remote` initialization provenance in project persistence, default legacy and imported projects to `existing`, and expose a typed `ProjectInitializationState` with initialization mode, repository state, and `canCreateInitialAppQuickactions`.
2. Compute the initial repository state from the actual checkout: require a persisted new-project mode, a clean working tree, exactly one initial commit, and only the seeded `README.md` plus the initializer-supported `.gitignore`; return unavailable/false when the repository cannot be inspected or contains setup artifacts or additional files.
3. Add a lightweight `GET /api/projects/:projectId/initialization-state` route and a realtime-aware dashboard resource that refreshes on project/git changes, then expose the state through `useChatPageData` without adding heavy git payloads to the project list.
4. Cover legacy rows, new local and remote projects, extra tracked files, dirty state, additional commits, missing repositories, and fail-closed route responses.

## Constraints
- Do not classify ordinary imported local or remote projects as new projects based only on `sourceType`, timestamps, or selected settings.
- Do not run repository inspection for every project-list request.
- Preserve existing project creation, setup, and git-status behavior.
- Treat unavailable or ambiguous repository state as ineligible.

## Verification
- Run focused project initialization, repository, route, and dashboard hook tests.
- Run `pnpm run lint` and confirm the endpoint returns eligible only for a clean seeded new-project checkout.
🌿 Branch Info

Base: feature/CODUX-205-3d-chat-quickactions
Head: task/feature-codux-20-t01-codex-f1dff6d9-mrfso8kb


🤖 Generated by Code UX

@numnx
numnx merged commit 6b7ecd2 into feature/CODUX-205-3d-chat-quickactions Jul 11, 2026
4 checks passed
@numnx
numnx deleted the task/feature-codux-20-t01-codex-f1dff6d9-mrfso8kb branch July 11, 2026 03:30
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.

1 participant