mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-09 22:33:37 +00:00
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:
parent
53c03a121f
commit
dae5ea4c80
2 changed files with 6 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue