Skip to content

Commit 1fb4f70

Browse files
committed
Add Coding Assistant selection step between Getting Started and Prerequisites
Insert a new wizard stage (Stage 1) where users choose their AI coding assistant (Cursor, GitHub Copilot, VS Code — with CoDA and Genie Code as Coming Soon). The selection is persisted in session_parameters JSONB and restored on session load. Existing sessions with progress beyond this step are unaffected thanks to the priority-based deriveWizardStage waterfall. Removes the old "Install Code Assistant" prerequisite and its YouTube embed since the new dedicated section replaces it.
1 parent 905b88d commit 1fb4f70

File tree

7 files changed

+466
-78
lines changed

7 files changed

+466
-78
lines changed

src/App.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export default function App() {
7070
const [completedSteps, setCompletedSteps] = useState<Set<number>>(new Set());
7171
const [skippedSteps, setSkippedSteps] = useState<Set<number>>(new Set());
7272
const [prerequisitesCompleted, setPrerequisitesCompleted] = useState(false);
73+
const [codingAssistant, setCodingAssistant] = useState<string | null>(null);
7374
// Default to end-to-end which includes all chapters (complete workshop)
7475
const [workshopLevel, setWorkshopLevel] = useState<WorkshopLevel>('end-to-end');
7576
const [levelExplicitlySelected, setLevelExplicitlySelected] = useState(false);
@@ -203,6 +204,7 @@ export default function App() {
203204
setCustomDescription(sessionParams.custom_use_case_description || '');
204205
setLevelExplicitlySelected(!!sessionParams.level_explicitly_selected);
205206
setBrandUrl(sessionParams.company_brand_url || '');
207+
setCodingAssistant(sessionParams.coding_assistant || null);
206208

207209
// Find the next incomplete step using the actual section order for this workshop level
208210
const nextStep = getNextIncompleteStep(Array.from(restoredCompleted), skippedStepsArray, restoredLevel);
@@ -240,6 +242,7 @@ export default function App() {
240242
setCompletedSteps(new Set());
241243
setSkippedSteps(new Set());
242244
setPrerequisitesCompleted(false);
245+
setCodingAssistant(null);
243246
setLevelExplicitlySelected(false);
244247
setUseCaseLockedLevel(null);
245248
setWorkshopLevel('end-to-end');
@@ -326,6 +329,7 @@ export default function App() {
326329
setCustomDescription(sessionParams.custom_use_case_description || '');
327330
setLevelExplicitlySelected(!!sessionParams.level_explicitly_selected);
328331
setBrandUrl(sessionParams.company_brand_url || '');
332+
setCodingAssistant(sessionParams.coding_assistant || null);
329333

330334
// Navigate to the next incomplete step using the actual section order
331335
const nextStep = getNextIncompleteStep(Array.from(loadedCompleted), loadedSkippedSteps, loadedLevel);
@@ -428,6 +432,17 @@ export default function App() {
428432
}
429433
}, [sessionId, workshopLevel]);
430434

435+
// Handle coding assistant selection
436+
const handleCodingAssistantChange = useCallback((assistantId: string) => {
437+
setCodingAssistant(assistantId);
438+
if (sessionId) {
439+
apiClient.updateSessionMetadata({
440+
session_id: sessionId,
441+
coding_assistant: assistantId,
442+
}).catch(err => console.error('Error saving coding assistant:', err));
443+
}
444+
}, [sessionId]);
445+
431446
const handleSaveSession = async (name: string, description: string, rating?: 'thumbs_up' | 'thumbs_down', comment?: string) => {
432447
if (!sessionId) return;
433448

@@ -965,6 +980,8 @@ export default function App() {
965980
initialExpandedStep={initialExpandedStep}
966981
prerequisitesCompleted={prerequisitesCompleted}
967982
onPrerequisitesComplete={handlePrerequisitesComplete}
983+
codingAssistant={codingAssistant}
984+
onCodingAssistantChange={handleCodingAssistantChange}
968985
isSessionLoaded={!isSessionLoading}
969986
currentUser={currentUser}
970987
defaultCatalog={defaultCatalog}

src/api/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ export interface UpdateSessionMetadataRequest {
304304
custom_use_case_description?: string;
305305
level_explicitly_selected?: boolean;
306306
company_brand_url?: string;
307+
coding_assistant?: string;
307308
}
308309

309310
export interface SessionListItem {

src/backend/api/routes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4462,6 +4462,7 @@ class SessionUpdateMetadataRequest(BaseModel):
44624462
custom_use_case_description: Optional[str] = Field(None, description="User-edited use case description override")
44634463
level_explicitly_selected: Optional[bool] = Field(None, description="Whether the user explicitly clicked a level button")
44644464
company_brand_url: Optional[str] = Field(None, description="URL to company brand colors/assets page")
4465+
coding_assistant: Optional[str] = Field(None, description="Selected coding assistant: cursor, copilot, or vscode")
44654466

44664467

44674468
@router.post("/session/update-metadata")
@@ -4518,6 +4519,8 @@ async def update_session_metadata_endpoint(request_body: SessionUpdateMetadataRe
45184519
_session_param_patch['level_explicitly_selected'] = request_body.level_explicitly_selected
45194520
if request_body.company_brand_url is not None:
45204521
_session_param_patch['company_brand_url'] = request_body.company_brand_url
4522+
if request_body.coding_assistant is not None:
4523+
_session_param_patch['coding_assistant'] = request_body.coding_assistant
45214524

45224525
# Derive user_schema_prefix from email + use case name (or source schema for accelerator)
45234526
# Triggered when use case is selected, custom label is edited, or workshop_level changes

src/backend/prompts_config.yaml

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,6 @@ use_cases:
107107
# -----------------------------------------------------------------------------
108108
prerequisites:
109109
- id: 1
110-
title: "Install Code Assistant"
111-
description: |
112-
Install a code editor with AI-assisted coding capabilities.
113-
114-
**Cursor:** A powerful AI-first code editor built on VS Code.
115-
116-
**GitHub Copilot:** AI pair programmer that works with VS Code and other editors.
117-
icon: "code"
118-
icon_color: "blue"
119-
is_optional: false
120-
links:
121-
- label: "Download Cursor"
122-
url: "https://cursor.com"
123-
color: "blue"
124-
- label: "GitHub Copilot"
125-
url: "https://github.com/features/copilot"
126-
color: "purple"
127-
- label: "VS Code (for Copilot)"
128-
url: "https://code.visualstudio.com"
129-
color: "green"
130-
131-
- id: 2
132110
title: "Install Package Manager"
133111
description: |
134112
**macOS:** Homebrew is required to install the tools below. If you already have it, run the upgrade command to ensure it is up to date.
@@ -158,7 +136,7 @@ prerequisites:
158136
url: "https://learn.microsoft.com/en-us/windows/package-manager/winget/"
159137
color: "blue"
160138

161-
- id: 3
139+
- id: 2
162140
title: "Install Git"
163141
description: |
164142
Git is required for version control and cloning the workshop repository.
@@ -189,7 +167,7 @@ prerequisites:
189167
url: "https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"
190168
color: "blue"
191169

192-
- id: 4
170+
- id: 3
193171
title: "Install Python"
194172
description: |
195173
Python 3.8+ is required for the Databricks CLI and backend services.
@@ -224,7 +202,7 @@ prerequisites:
224202
url: "https://docs.databricks.com/en/dev-tools/cli/install.html#requirements"
225203
color: "green"
226204

227-
- id: 5
205+
- id: 4
228206
title: "Install Databricks CLI"
229207
description: |
230208
The Databricks CLI is used for workspace management and deployment.
@@ -255,7 +233,7 @@ prerequisites:
255233
url: "https://docs.databricks.com/en/dev-tools/cli/index.html"
256234
color: "blue"
257235

258-
- id: 6
236+
- id: 5
259237
title: "Install Node.js"
260238
description: |
261239
Node.js is required for building and running the frontend application.
@@ -291,7 +269,7 @@ prerequisites:
291269
url: "https://docs.npmjs.com/troubleshooting/common-errors"
292270
color: "orange"
293271

294-
- id: 7
272+
- id: 6
295273
title: "(Optional) Access to Figma"
296274
description: "For Option B (Rich UI Design), you'll need access to Figma for creating polished UI designs. This is optional if you plan to use Option A (Basic UI with AI Coding Assistant)."
297275
icon: "figma"

0 commit comments

Comments
 (0)