From 0a1136424c251ff42431984f59ca86ae0575bbd8 Mon Sep 17 00:00:00 2001 From: Adam Siwiec <73085927+adamsiwiec1@users.noreply.github.com> Date: Mon, 26 Oct 2026 06:41:41 -0400 Subject: [PATCH] desktop: show app version in sidebar footer; demo tour as first-open popup Replace the bottom-left footer block (Alpha disclaimer + absolute kit path) with a clean app-version display sourced from Tauri's getVersion(), keeping only a short authorized-use note. Remove the persistent 'Demo tour' sidebar button; the tour now auto-opens once on first open (idle localStorage state) and stops after the user completes or skips it. --- apps/desktop/src/App.css | 12 +++++++++++ apps/desktop/src/App.jsx | 26 ++++++++++++------------ apps/desktop/src/components/DemoTour.jsx | 7 +++++-- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/apps/desktop/src/App.css b/apps/desktop/src/App.css index 13dc7a4..16751f2 100644 --- a/apps/desktop/src/App.css +++ b/apps/desktop/src/App.css @@ -336,6 +336,18 @@ code { font-size: 0.78rem; width: 100%; } +.sidebar-foot .app-version { + font-size: 0.8rem; + color: var(--text); + letter-spacing: 0.01em; +} +.sidebar-foot .app-version .mono { + color: var(--faint); +} +.sidebar-foot .foot-note { + font-size: 0.68rem; + color: var(--faint); +} .main { min-width: 0; diff --git a/apps/desktop/src/App.jsx b/apps/desktop/src/App.jsx index f481a98..25eb6b7 100644 --- a/apps/desktop/src/App.jsx +++ b/apps/desktop/src/App.jsx @@ -1,5 +1,6 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { invoke } from "@tauri-apps/api/core"; +import { getVersion } from "@tauri-apps/api/app"; import AssessmentsHome from "./AssessmentsHome"; import SetupWizard from "./SetupWizard"; import SettingsView from "./SettingsView"; @@ -89,6 +90,7 @@ export default function App() { const [setup, setSetup] = useState(null); const [persona, setPersona] = useState("cybersecStudent"); const demoTourOfferedRef = useRef(false); + const [appVersion, setAppVersion] = useState(""); const append = useCallback((msg) => { setLog((p) => @@ -111,6 +113,12 @@ export default function App() { })(); }, [append]); + useEffect(() => { + getVersion() + .then((v) => setAppVersion(v)) + .catch(() => {}); + }, []); + const activityRef = useRef(null); const openActivity = () => { @@ -260,7 +268,7 @@ export default function App() { return; } demoTourOfferedRef.current = true; - if (shouldAutoOfferDemoTour(assessments.length)) { + if (shouldAutoOfferDemoTour()) { startDemoTour(); } }, [sessionReady, setup, assessments.length, startDemoTour]); @@ -885,18 +893,10 @@ return ( {renderSidebar()}
- -
Alpha — not production
-
Authorized assessments only
-
{kit?.root || "locating kit…"}
+
+ phishkit v{appVersion || "…"} +
+
Alpha · authorized use only
diff --git a/apps/desktop/src/components/DemoTour.jsx b/apps/desktop/src/components/DemoTour.jsx index 463f5f2..c13ef0a 100644 --- a/apps/desktop/src/components/DemoTour.jsx +++ b/apps/desktop/src/components/DemoTour.jsx @@ -248,10 +248,13 @@ export default function DemoTour({ ); } -export function shouldAutoOfferDemoTour(assessmentCount) { +export function shouldAutoOfferDemoTour() { + // First-open popup: auto-offer once while the tour has never been + // completed or skipped. After the user finishes or dismisses it, the + // persisted localStorage state stops it from auto-showing again. const s = loadDemoTourState(); if (s.status === DEMO_TOUR_STATUS.completed || s.status === DEMO_TOUR_STATUS.skipped) { return false; } - return assessmentCount === 0; + return true; }