-
Notifications
You must be signed in to change notification settings - Fork 78
Description
⚠️ Before implementing, read and follow the Implementation Rules in the epic issue #5364. These rules cover mandatory patterns for React component structure, BAI component usage, reactToWebComponent bridge, state management, i18n, error handling, styling, and code quality. The reference implementation isreact/src/components/SignupModal.tsx.Goal: Complete Lit file removal. Each migration must fully replace the Lit source file with React — not just the dialog parts. The migrated Lit
.tsfile and its type declarations must be deleted. This epic is a critical step toward removing all Lit/MWC/Vaadin dependencies from the codebase.
Description
Migrate backend-ai-edu-applauncher.ts (Lit-Element, ~550 lines) to a React component. This is a specialized education-focused app launcher that wraps backend-ai-app-launcher and adds session creation/reuse logic for educational scenarios.
Part of epic #5364 — Phase 4 (App launcher)
Depends on: #5372 (App launcher main dialog must be migrated first, since edu-launcher delegates to it)
Current Implementation
File: src/components/backend-ai-edu-applauncher.ts
What it does:
- Simplified app launching experience for educational users
- Queries for existing compatible sessions and reuses them
- Creates new sessions using session templates if no compatible session exists
- Mounts specific vfolders for educational content
- Launches apps with specific credentials and bootstrap scripts
- Renders
<backend-ai-app-launcher>internally for actual app launching
Key state:
appName,sessionId,sessionUuid— Current session infoproject,group,resourcePolicy— Project/group info fromprepareProjectInformation()- Session templates — Fetched from backend for session creation
MWC components used: None directly (delegates to backend-ai-app-launcher)
Integration points:
- Uses
globalThis.backendaiclientfor Backend.AI API calls - Uses
globalThis.lablupNotificationandglobalThis.lablupIndicator - Navigates via
/edu-applauncherroute
Migration Plan
- Create
react/src/components/EduAppLauncher.tsx(orreact/src/pages/EduAppLauncherPage.tsx) - Extract session creation/reuse logic into a custom hook (
useEduSession) - Reuse migrated
AppLauncherModal(from feat: Migrate backend-ai-app-launcher main dialog and infrastructure to React #5372) directly as a React component - Use
useBAISignedRequestWithPromisefor Backend.AI API calls - Add React route for
/edu-applauncherinreact/src/routes.tsx - Register as web component via
reactToWebComponentfor backward compatibility during transition
Acceptance Criteria
- Lit file removed:
src/components/backend-ai-edu-applauncher.tsand its type declarations deleted from codebase - EduAppLauncher React component created
- Session query/reuse logic works correctly
- Session creation via templates works
- VFolder mounting for educational content works
- App launching delegates to React AppLauncherModal
- React route registered for
/edu-applauncher - i18n translations preserved
- Notification and indicator integration works