feat(web): add demo-only Start tab to app shell nav

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-05-09 10:55:25 -04:00
parent 53c03a121f
commit dae5ea4c80
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -2,18 +2,20 @@ import { describe, expect, test } from "bun:test";
import { getVisibleNavigation } from "./app-shell";
describe("getVisibleNavigation", () => {
test("shows all nav items in demo mode", () => {
test("shows all nav items in demo mode with Start first", () => {
const items = getVisibleNavigation(true);
const names = items.map((i) => i.name);
expect(names[0]).toBe("Start");
expect(names).toContain("Workflows");
expect(names).toContain("Runs");
expect(names).toContain("Insights");
expect(names).toContain("Settings");
});
test("hides Workflows and Insights in production mode", () => {
test("hides Start, Workflows, and Insights in production mode", () => {
const items = getVisibleNavigation(false);
const names = items.map((i) => i.name);
expect(names).not.toContain("Start");
expect(names).not.toContain("Workflows");
expect(names).not.toContain("Insights");
expect(names).toContain("Runs");

View file

@ -14,6 +14,7 @@ import {
Cog6ToothIcon,
PlayIcon,
RectangleStackIcon,
SparklesIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";
import { Link, Outlet, useLocation, useMatches } from "react-router";
@ -24,6 +25,7 @@ import { useToggleDemoMode } from "../lib/mutations";
import { useAuthMe } from "../lib/queries";
const allNavigation = [
{ name: "Start", href: "/start", icon: SparklesIcon, demoOnly: true },
{ name: "Workflows", href: "/workflows", icon: RectangleStackIcon, demoOnly: true },
{ name: "Runs", href: "/runs", icon: PlayIcon, demoOnly: false },
{ name: "Insights", href: "/insights", icon: ChartBarIcon, demoOnly: true },