/* First-run welcome tour. 5 steps walking the user through the
* dashboard's main concepts. Persists `seen` flag in IndexedDB so it
* only shows the first time. ADR-092 §10 Pass 6.
*/
import { LitElement, html, css } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import { kvGet, kvSet } from '../store/persistence';
interface TourStep {
title: string;
body: string;
cta?: string;
}
const STEPS: TourStep[] = [
{
title: 'Welcome to nvsim',
body: `
nvsim is an open-source, deterministic forward simulator for
nitrogen-vacancy diamond magnetometry — a real Rust crate compiled to
WASM and running in your browser, right now.
This 30-second tour highlights the four panels you'll use most.
The middle panel shows your magnetic scene — sources you can
drag (rebar, heart proxy, mains hum, ferrous door) and a single NV-diamond
sensor in the centre. Field lines from each source connect to the sensor
and animate while the pipeline runs.
Click 2 on your keyboard any time to jump to the Frame inspector.
`,
},
{
title: '2. Run the pipeline',
body: `
Click the ▶ Run button (top-right) to start streaming
MagFrame records at the digitiser's sample rate. The B-vector
trace and Frame stream sparkline update live, and the FPS pill in the
topbar shows the simulator's throughput in kHz.
Space toggles run/pause from anywhere.
`,
},
{
title: '3. Witness panel',
body: `
The Witness tab is the heart of nvsim's determinism contract.
Click Verify and the pipeline re-derives the SHA-256 over a 256-frame
reference run and asserts it matches the constant pinned in the Rust crate.
Same input → same hash → byte-for-byte across browsers, OSes, transports.
If the hash drifts, your build is non-canonical.
`,
},
{
title: '4. App Store',
body: `
The grid icon on the left rail opens the App Store — every
hot-loadable WASM edge module RuView ships, plus the simulators. 66 apps
across 13 categories: medical, security, building, retail, industrial,
signal, learning, autonomy, and more.
Toggle any card to mark it active in this session; the WS transport
will push the activation set to a connected ESP32 mesh.
`,
},
{
title: 'You are ready',
body: `
Press ⌘K (or Ctrl K) any time for the command
palette, ? for the full shortcuts list, or just start clicking.
Source on GitHub:
github.com/ruvnet/RuView · ADR-089, ADR-092 · MIT/Apache-2.0.