import React, { useState, useEffect } from 'react'; import Icon from './CanvasIcon'; import { MOD } from './platform'; const TOUR_KEY = 'canvas-tour-seen-cyber-v1'; const STEPS = [ { title: 'Welcome to your Security Canvas', icon: 'shield', body: 'This is your security operations workspace. Two views ΓÇö Insights (highlights from your chats) and Workspace (a customizable dashboard of widgets). It starts empty so you can build it the way you want.', }, { title: 'Add widgets from the palette', icon: 'plus', body: `Click "Add widget" on the Workspace view, or hit ${MOD}+K and search. There are 30+ widgets ΓÇö incidents, deadlines, controls, reading, plus challenge widgets that push back on weak assumptions.`, }, { title: 'Make it yours', icon: 'layout', body: 'Drag widget headers to reorder. Click the size pill (S/M/L) to resize. Hover and click trash to remove. Layout and content auto-save to your browser.', }, { title: 'Try the challenge widgets', icon: 'gavel', body: 'Reviewer 2, Devil\'s Advocate, and Scope Realism are tuned to push back, not validate. They\'re where the real work gets sharpened. Add them last ΓÇö when you\'re ready for honest feedback.', }, ]; const CanvasWelcomeTour = ({ forceShow = false, onClose }) => { const [step, setStep] = useState(0); const [visible, setVisible] = useState(false); useEffect(() => { const seen = localStorage.getItem(TOUR_KEY); if (forceShow || !seen) setVisible(true); }, [forceShow]); const dismiss = () => { localStorage.setItem(TOUR_KEY, '1'); setVisible(false); if (onClose) onClose(); }; if (!visible) return null; const s = STEPS[step]; const isLast = step === STEPS.length - 1; return (
{s.body}