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:
@@ -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 {
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user