Program Configuration Confirmation
Process documentation extracted from code comments (strapi-docker).
Process Overviewβ
| Property | Value |
|---|---|
| Process ID | PROGRAM-CONFIGURATION-CONFIRMATION |
| Owner Teams | @team-platform |
| Repositories | platform, strapi-docker |
| Total Steps | 8 |
| Handoff | N/A |
Process Flow Diagramβ
Step-by-Step Breakdownβ
π€ Step 1.0: User confirms in modalβ
The user has reviewed the configuration in the confirmation modal and clicks Confirm. This locks the configuration so it can no longer be edited and saves it. The system then checks whether learning groups (batches) already exist and creates them if not.
β
Explicit
Repository: platform
Location: src/components/growthkit/ConfirmConfigurationButton.tsx:36
Triggers: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.1
π€ Step 1.1: Validate deal, confirm and saveβ
The system checks that a HubSpot deal is linked, marks the configuration as confirmed with the current date and time, and saves it to the server. The configuration becomes read-only after this.
β
Explicit
Repository: platform
Location: src/components/growthkit/ConfirmConfigurationButton.tsx:52
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.0 Triggers: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.2, 1.3, 2.0
π» Step 1.2: Store confirmation in memoryβ
The system stores that the configuration is confirmed and records the exact date and time. This happens in memory first; the actual save to the server follows in the next step.
π Implicit
Repository: platform
Location: src/hooks/useProgramConfiguration.tsx:450
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.1
Side Effects:
- Modifies programConfiguration.json.confirmed
π Step 1.3: Send configuration to serverβ
The confirmed configuration (including the new flag and timestamp) is sent to the server and stored permanently. The user sees a success message when done.
π Implicit
Repository: platform
Location: src/hooks/useProgramConfiguration.tsx:472
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.2 Triggers: Step PROGRAM-CONFIGURATION-CONFIRMATION:2.0 (Backend receives request)
π» Step 1.4: Check for existing batchesβ
After the configuration is confirmed and saved, the system checks whether any learning groups (batches) already exist for this program. This determines whether new ones need to be created.
π Implicit
Repository: platform
Location: src/components/growthkit/ConfirmConfigurationButton.tsx:67
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.1
π» Step 1.5: Create initial batchesβ
If no learning groups exist yet, the system creates the initial ones based on the confirmed configuration (e.g. number of participants and group size). The batch list is then refreshed.
π Implicit
Repository: platform
Location: src/components/growthkit/ConfirmConfigurationButton.tsx:85
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.4
Condition: Only executes if existingBatches.length === 0 Side Effects:
- Creates batch records, triggers batch reload
βοΈ Step 2.0: The server receives the confirmed configuration from the frontend (PUT request).β
This is handled by Strapiβs default update flow; the lifecycle hooks below run as part of that update.
π Implicit
Repository: strapi-docker
Location: src/api/program-configuration/content-types/program-configuration/lifecycles.js:8
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:1.3 (frontend save)
π Step 2.1: Runs before every program-configuration update, including confirmation.β
Compares incoming data with stored data and adds a change history entry (timestamp, changes, user) when something has changed.
π Implicit
Repository: strapi-docker
Location: src/api/program-configuration/content-types/program-configuration/lifecycles.js:327
Triggered by: Step PROGRAM-CONFIGURATION-CONFIRMATION:2.0 (API receives PUT)
Explicit vs Implicit Actionsβ
Understanding which actions are user-initiated versus automatic is crucial for troubleshooting.
β Explicit Actions (User-Initiated)β
No explicit actions documented.
π Implicit Actions (Automatic)β
No implicit actions documented.
Triggersβ
No triggers documented.
Side Effectsβ
No side effects documented.
Error Handlingβ
No error handling documented.
Testingβ
No testing information documented.
Monitoring & Debuggingβ
No monitoring information documented.
Related Processesβ
No related processes documented yet.
Code Referencesβ
Step 1.0 - Frontend (platform)β
File: src/components/growthkit/ConfirmConfigurationButton.tsx
Line: 36
Description: The user has reviewed the configuration in the confirmation modal and clicks Confirm. This locks the configuration so it can no longer be edited and saves it. The system then checks whether learning groups (batches) already exist and creates them if not.
Step 1.1 - Frontend (platform)β
File: src/components/growthkit/ConfirmConfigurationButton.tsx
Line: 52
Description: The system checks that a HubSpot deal is linked, marks the configuration as confirmed with the current date and time, and saves it to the server. The configuration becomes read-only after this.
Step 1.2 - Frontend (platform)β
File: src/hooks/useProgramConfiguration.tsx
Line: 450
Description: The system stores that the configuration is confirmed and records the exact date and time. This happens in memory first; the actual save to the server follows in the next step.
Step 1.3 - Frontend (platform)β
File: src/hooks/useProgramConfiguration.tsx
Line: 472
Description: The confirmed configuration (including the new flag and timestamp) is sent to the server and stored permanently. The user sees a success message when done.
Step 1.4 - Frontend (platform)β
File: src/components/growthkit/ConfirmConfigurationButton.tsx
Line: 67
Description: After the configuration is confirmed and saved, the system checks whether any learning groups (batches) already exist for this program. This determines whether new ones need to be created.
Step 1.5 - Frontend (platform)β
File: src/components/growthkit/ConfirmConfigurationButton.tsx
Line: 85
Description: If no learning groups exist yet, the system creates the initial ones based on the confirmed configuration (e.g. number of participants and group size). The batch list is then refreshed.
Step 2.0 - Backend (strapi-docker)β
File: src/api/program-configuration/content-types/program-configuration/lifecycles.js
Line: 8
Description: The server receives the confirmed configuration from the frontend (PUT request). This is handled by Strapiβs default update flow; the lifecycle hooks below run as part of that update.
Step 2.1 - Backend (strapi-docker)β
File: src/api/program-configuration/content-types/program-configuration/lifecycles.js
Line: 327
Description: Runs before every program-configuration update, including confirmation. Compares incoming data with stored data and adds a change history entry (timestamp, changes, user) when something has changed.
Team Handoff Detailsβ
No team handoff information documented.