feat(projectworkflow): keep create in planning when key provided

Validate the catalog key only and stop writing lifecycle=active so
activation stays on the settings DutyMode path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-14 07:55:51 +00:00
co-authored by Cursor
parent 2e586c99b8
commit 22f65e5f24
3 changed files with 3 additions and 4 deletions
+1 -4
View File
@@ -77,10 +77,7 @@ func (s *Service) CreateProject(ctx context.Context, user *auth.UserAccount, in
WorkflowSelectionVersion: 1,
WorkflowPlanRevision: 0,
}
if initialWorkflow != "" {
p.LifecycleStatus = "active"
p.ActiveWorkflowKey = initialWorkflow
}
// initialWorkflow is catalog-validated only; activation stays on the settings path.
created, err := s.store.CreateProject(ctx, p)
if err != nil {
+1
View File
@@ -93,6 +93,7 @@ type CreateProjectInput struct {
DeviceType string `json:"device_type,omitempty"`
IntendedUse string `json:"intended_use,omitempty"`
TargetMarket string `json:"target_market,omitempty"`
// Deprecated: accepted for catalog existence checks only; never activates the project.
InitialWorkflowKey string `json:"initial_workflow_key,omitempty"`
}
+1
View File
@@ -63,6 +63,7 @@ export interface CreateProjectInput {
device_type?: string;
intended_use?: string;
target_market?: string;
/** @deprecated Accepted by API for catalog checks only; create dialog must not send this. */
initial_workflow_key?: string;
}