feat: remove ECG phase entirely

- Deleted src/components/ECGAnimation.tsx (686 lines)
- Removed 'ecg' from Phase type
- Removed ECG import, rendering, and cursor position handoff from App.tsx
- Cleaned up BootSequence: removed onCursorPositionReady prop,
  captureCursorPosition callback, cursorRef, and ECG-specific naming
- Renamed ecgStartDelay → completionDelay, ecg-seed-dot → boot-seed-dot
- Skip button now goes directly to dashboard ('pmr' phase)
- Boot flow simplified: boot → login → pmr (no ECG intermediary)
- Bundle size reduced ~8KB
This commit is contained in:
2026-02-17 03:26:17 +00:00
parent 0fc7985a7c
commit b266f1f149
5 changed files with 16 additions and 729 deletions
+5 -15
View File
@@ -1,7 +1,6 @@
import { useState, useRef, useEffect } from 'react'
import { useState, useEffect } from 'react'
import type { Phase } from './types'
import { BootSequence } from './components/BootSequence'
import { ECGAnimation } from './components/ECGAnimation'
import { LoginScreen } from './components/LoginScreen'
import { DashboardLayout } from './components/DashboardLayout'
import { AccessibilityProvider } from './contexts/AccessibilityContext'
@@ -46,13 +45,12 @@ function SkipButton({ onSkip }: { onSkip: () => void }) {
function App() {
const [phase, setPhase] = useState<Phase>('pmr')
const cursorPositionRef = useRef<{ x: number; y: number } | null>(null)
useEffect(() => {
initModel()
}, [])
const skipToLogin = () => setPhase('login')
const skipToDashboard = () => setPhase('pmr')
return (
<AccessibilityProvider>
@@ -66,18 +64,10 @@ function App() {
{phase === 'boot' && (
<BootSequence
onComplete={() => setPhase('ecg')}
onCursorPositionReady={(pos) => { cursorPositionRef.current = pos }}
onComplete={() => setPhase('login')}
/>
)}
{phase === 'ecg' && (
<ECGAnimation
onComplete={() => setPhase('login')}
startPosition={cursorPositionRef.current}
/>
)}
{(phase === 'login' || phase === 'pmr') && (
<DetailPanelProvider>
<DashboardLayout />
@@ -88,8 +78,8 @@ function App() {
<LoginScreen onComplete={() => setPhase('pmr')} />
)}
{(phase === 'boot' || phase === 'ecg') && (
<SkipButton onSkip={skipToLogin} />
{phase === 'boot' && (
<SkipButton onSkip={skipToDashboard} />
)}
</div>
</AccessibilityProvider>