Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Navigation: Chat beside Assist

Adarsh044239decbdb
diff --git a/src/components/areas/area-page.tsx b/src/components/areas/area-page.tsx
index b7be93da..c02a0052 100644
--- a/src/components/areas/area-page.tsx
+++ b/src/components/areas/area-page.tsx
@@ -149,10 +149,10 @@ function StudioFeatures({ section, subs }: { section: string; subs: AreaShowcase
);
}
-/** The pills at the end of an area page: the other areas, then Canvas and Assist. */
+/** The pills at the end of an area page: the other areas, then Canvas, Assist and Chat. */
export function MoreInFuobe({ current }: { current: AreaId }) {
const others = AREAS.filter((a) => a.id !== current).map((a) => entry(a.entryId));
- const list = [...others, entry("canvas"), entry("assist")].filter((e): e is NavEntry => !!e);
+ const list = [...others, entry("canvas"), entry("assist"), entry("chat")].filter((e): e is NavEntry => !!e);
return (
<section aria-labelledby="more-in-fuobe" data-reveal className="mt-10 sm:mt-14">
<h2 id="more-in-fuobe" className="mb-2 font-sans text-[13px] font-medium">
diff --git a/src/components/nav-items.ts b/src/components/nav-items.ts
index 13b6e407..8d39e03a 100644
--- a/src/components/nav-items.ts
+++ b/src/components/nav-items.ts
@@ -32,7 +32,7 @@ export interface NavGroupDef {
const GROUPS: { label: string; ids: string[]; collapsible?: boolean }[] = [
{
label: "Create",
- ids: ["home", "assist", "image", "video", "edit", "live-edit", "layers", "inpaint", "color-grade", "motions", "effects", "storyboard", "canvas", "apps"],
+ ids: ["home", "assist", "chat", "image", "video", "edit", "live-edit", "layers", "inpaint", "color-grade", "motions", "effects", "storyboard", "canvas", "apps"],
},
{ label: "Library", ids: ["library", "favorites"] },
{
diff --git a/src/components/nav/bar-split.tsx b/src/components/nav/bar-split.tsx
index d61dd9c3..742ef0c1 100644
--- a/src/components/nav/bar-split.tsx
+++ b/src/components/nav/bar-split.tsx
@@ -17,9 +17,12 @@ import { useBarMenu, type TriggerHandlers } from "./bar-menus";
* chevron and the bar's one open highlight (BarIndicator) behind it.
*/
-/** The item: 40 px (44 to tap), 10 px left and 8 px right of the words (14 and 10 from 1600 px), then the chevron. */
+/**
+ * The item: 40 px (44 to tap), 10 px left and 8 px right of the words (8 and 8 from 1440 px, 12 and 10 from 1600 px), then
+ * the chevron.
+ */
export const BAR_TRIGGER =
- "nav-row nav-mark-under group/bar-item inline-flex h-10 shrink-0 items-center gap-1 rounded-[10px] pr-2 pl-2.5 text-[14px] whitespace-nowrap text-foreground/80 nav-hover:text-foreground focus-visible:text-foreground data-[open]:text-foreground data-[active]:font-semibold data-[active]:text-foreground min-[1600px]:pr-2.5 min-[1600px]:pl-3.5 [@media(pointer:coarse)]:h-11 [@media(pointer:coarse)]:min-w-11";
+ "nav-row nav-mark-under group/bar-item inline-flex h-10 shrink-0 items-center gap-1 rounded-[10px] pr-2 pl-2.5 text-[14px] whitespace-nowrap text-foreground/80 nav-hover:text-foreground focus-visible:text-foreground data-[open]:text-foreground data-[active]:font-semibold data-[active]:text-foreground min-[1440px]:pl-2 min-[1600px]:pr-2.5 min-[1600px]:pl-3 [@media(pointer:coarse)]:h-11 [@media(pointer:coarse)]:min-w-11";
/** The chevron: a quiet mark inside the item (no box of its own); it turns while the menu is open. */
export const BarChevron = () => (
diff --git a/src/components/nav/nav-prefetch.tsx b/src/components/nav/nav-prefetch.tsx
index 6271559a..38d40f95 100644
--- a/src/components/nav/nav-prefetch.tsx
+++ b/src/components/nav/nav-prefetch.tsx
@@ -15,7 +15,7 @@ import { entriesFor, type ViewerKind } from "@/lib/nav-model";
/** A panel whose routes load when it opens: the launcher (and the Studios sheet), Create, More, Fuobe FX. */
export type NavPanel = "studios" | "create" | "more" | "fx";
-const MORE_IDS = ["apps", "motions", "effects", "canvas", "assist", "area-motions"];
+const MORE_IDS = ["apps", "motions", "effects", "canvas", "assist", "chat", "area-motions"];
/** Each panel's "See all": its area page loads with the panel's rows. */
const AREA_OF: Record<NavPanel, string> = { studios: "area-studios", create: "area-create", more: "area-motions", fx: "area-fx" };
diff --git a/src/components/nav/top-bar.tsx b/src/components/nav/top-bar.tsx
index a3040d14..991b7b0b 100644
--- a/src/components/nav/top-bar.tsx
+++ b/src/components/nav/top-bar.tsx
@@ -27,12 +27,12 @@ import { ViewerSlot } from "./viewer-slot";
export { prefetchHrefs } from "./nav-prefetch";
/*
- * The top bar (md and up): the wordmark, Create, Studios (the launcher), Fuobe FX, Apps, Motions & effects, Canvas, Assist and
- * Library; search; New creation; who is looking. 56 px on every page. What doesn't fit moves into More, by CSS alone
+ * The top bar (md and up): the wordmark, Create, Studios (the launcher), Fuobe FX, Apps, Motions & effects, Canvas, Assist,
+ * Chat and Library; search; New creation; who is looking. 56 px on every page. What doesn't fit moves into More, by CSS alone
* (nothing is measured, so nothing moves after the first paint):
- * 1600 and up everything, search 280 px, a guest's Log in
- * 1440-1599 the same, search 220 px, items 4 px narrower a side (Apps, Motions & effects and Canvas each carry a chevron)
- * 1280-1439 Canvas and Assist in More, search 200 px
+ * 1600 and up everything, search 280 px, a guest's Log in, items 12 px left of the words
+ * 1440-1599 the same, search 184 px, items 8 px left of the words (Apps, Motions & effects and Canvas each carry a chevron)
+ * 1280-1439 Canvas, Assist and Chat in More, search 200 px, items 10 px left of the words
* 1024-1279 Fuobe FX, Apps and Motions & effects in More too
* 768-1023 the same, search and New creation as icon buttons
* Measured with the site's fonts for a guest, an account and the owner, a classic scrollbar's width to spare at every
@@ -40,17 +40,17 @@ export { prefetchHrefs } from "./nav-prefetch";
*/
/**
- * A plain bar link (Assist, Library). Its states are the nav's (nav-states.css): the highlight on hover or keyboard
+ * A plain bar link (Assist, Chat, Library). Its states are the nav's (nav-states.css): the highlight on hover or keyboard
* focus, and for the open page (aria-current) a pip under the words, never a fill. The items with a menu are
* BAR_TRIGGER (bar-split.tsx).
*/
export const BAR_ITEM =
- "nav-row nav-mark-under group/bar-item inline-flex h-10 shrink-0 [@media(pointer:coarse)]:h-11 items-center gap-1.5 rounded-[10px] px-2.5 text-[14px] whitespace-nowrap text-foreground/80 nav-hover:text-foreground focus-visible:text-foreground data-[state=open]:text-foreground data-[active]:font-semibold data-[active]:text-foreground aria-[current=page]:font-semibold aria-[current=page]:text-foreground min-[1600px]:px-3.5";
+ "nav-row nav-mark-under group/bar-item inline-flex h-10 shrink-0 [@media(pointer:coarse)]:h-11 items-center gap-1.5 rounded-[10px] px-2.5 text-[14px] whitespace-nowrap text-foreground/80 nav-hover:text-foreground focus-visible:text-foreground data-[state=open]:text-foreground data-[active]:font-semibold data-[active]:text-foreground aria-[current=page]:font-semibold aria-[current=page]:text-foreground min-[1440px]:px-2 min-[1600px]:px-3";
/**
* Which bar item holds the open page, one item per page (areaOfPath): Create for the create tools, Studios for a studio
* or one of its tools, Apps for the apps, Motions & effects for both galleries, each for its own area page; Canvas,
- * Assist and Library for theirs. `page`: the area whose own page this is (its name is marked aria-current).
+ * Assist, Chat and Library for theirs. `page`: the area whose own page this is (its name is marked aria-current).
*/
export function barActive(pathname: string): {
create: boolean;
@@ -63,6 +63,7 @@ export function barActive(pathname: string): {
/** /canvas itself (the Canvas item's own page). */
canvasHome: boolean;
assist: boolean;
+ chat: boolean;
library: boolean;
page: AreaId | undefined;
} {
@@ -77,6 +78,7 @@ export function barActive(pathname: string): {
canvas: e?.id === "canvas",
canvasHome: pathname === "/canvas",
assist: e?.id === "assist",
+ chat: e?.id === "chat",
library: e?.kind === "library",
page: pathname ? areaPageOf(pathname) : undefined,
};
@@ -141,7 +143,7 @@ function MoreItems() {
<SeeAllRow href={MOTIONS_AREA_HREF} name="See all motions & effects" data-col={0} data-row={4} className="mt-1" />
<div role="separator" className="mx-2.5 my-1.5 h-px bg-border" />
</div>
- {pick(["canvas", "assist"]).map((e, i) => (
+ {pick(["canvas", "assist", "chat"]).map((e, i) => (
<IntentLink key={e.id} href={e.href} eager={e.eager} aria-current={on(e) ? "page" : undefined} data-col={0} data-row={5 + i} className={cn(CARD_ROW, MENU_ROW_2)}>
<span className="grid h-[27px] w-9 shrink-0 place-items-center rounded-[6px] bg-muted">
<NavIcon name={e.icon} className="nav-icon size-4 text-muted-foreground" />
@@ -169,8 +171,8 @@ function MoreMenu({ active }: { active: Active }) {
onOpen={warmMore}
cardClassName="w-80"
className="min-[1440px]:hidden"
- // Marked when it holds the open page at this width: Canvas and Assist always; Fuobe FX, Apps, Motions and Effects below xl.
- active={active.canvas || active.assist}
+ // Marked when it holds the open page at this width: Canvas, Assist and Chat always; Fuobe FX, Apps, Motions and Effects below xl.
+ active={active.canvas || active.assist || active.chat}
data-narrow={active.apps || active.motions || active.fx || undefined}
>
<MoreItems />
@@ -197,6 +199,9 @@ function BarLinks({ active, onTap }: { active: Active; onTap?: (href: string) =>
<IntentLink href="/assist" eager data-bar-item="" onClick={tap("/assist")} aria-current={cur(active.assist)} className={cn(BAR_ITEM, "hidden min-[1440px]:inline-flex")}>
Assist
</IntentLink>
+ <IntentLink href="/chat" data-bar-item="" onClick={tap("/chat")} aria-current={cur(active.chat)} className={cn(BAR_ITEM, "hidden min-[1440px]:inline-flex")}>
+ Chat
+ </IntentLink>
<IntentLink href="/library" eager data-bar-item="" onClick={tap("/library")} aria-current={cur(active.library)} className={BAR_ITEM}>
Library
</IntentLink>
@@ -226,7 +231,7 @@ function SearchField() {
className={cn(
"nav-focus inline-flex h-10 shrink-0 items-center gap-2 rounded-[10px] text-[13.5px] [@media(pointer:coarse)]:h-11 text-muted-foreground motion-safe:transition-colors",
"w-10 justify-center nav-hover:bg-[var(--nav-hi)] nav-hover:text-foreground active:bg-[var(--nav-press)] [@media(pointer:coarse)]:w-11",
- "lg:max-[1439.98px]:w-[200px] lg:justify-start lg:border lg:border-input lg:bg-background/60 lg:px-3 lg:nav-hover:border-border-strong lg:nav-hover:bg-background lg:active:bg-background min-[1440px]:max-[1599.98px]:w-[220px] min-[1600px]:w-[280px]",
+ "lg:max-[1439.98px]:w-[200px] lg:justify-start lg:border lg:border-input lg:bg-background/60 lg:px-3 lg:nav-hover:border-border-strong lg:nav-hover:bg-background lg:active:bg-background min-[1440px]:max-[1599.98px]:w-[184px] min-[1600px]:w-[280px]",
)}
>
<Search aria-hidden className="size-[18px] shrink-0 lg:size-4" />
diff --git a/src/lib/nav-areas.ts b/src/lib/nav-areas.ts
index 837cb1d3..710004ff 100644
--- a/src/lib/nav-areas.ts
+++ b/src/lib/nav-areas.ts
@@ -127,8 +127,8 @@ export const PILL_ONLY: readonly string[] = ["canvas", "layers", "explainer", "v
*/
function createSections(): AreaSection[] {
const [make, editPicture] = CREATE_COLUMNS;
- // Make's own column, less what has a section of its own (Image and Video lead) and Assist (an item of the bar).
- const makeRest = make.ids.filter((id) => !["image", "video", "assist"].includes(id));
+ // Make's own column, less what has a section of its own (Image and Video lead) and Assist and Chat (items of the bar).
+ const makeRest = make.ids.filter((id) => !["image", "video", "assist", "chat"].includes(id));
return [
{
id: "make",
@@ -255,9 +255,9 @@ export function rankCards(ids: readonly string[], band: (cover: string) => numbe
const NO_SEARCH = new URLSearchParams();
/**
- * The bar item that holds a page, one per page: Create for its tools (not Canvas or Assist, which have items of their
- * own), Studios for a studio and its tools, Apps for the apps, Motions & effects for both galleries, Fuobe FX
- * for its studios (FX_HOME); and each for its own area page. None for Home, Canvas, Assist, Library and settings.
+ * The bar item that holds a page, one per page: Create for its tools (not Canvas, Assist or Chat, which have items of
+ * their own), Studios for a studio and its tools, Apps for the apps, Motions & effects for both galleries, Fuobe FX
+ * for its studios (FX_HOME); and each for its own area page. None for Home, Canvas, Assist, Chat, Library and settings.
*/
export function areaOfPath(pathname: string): AreaId | undefined {
const e = pathname ? activeEntry(pathname, NO_SEARCH) : undefined;
@@ -266,7 +266,7 @@ export function areaOfPath(pathname: string): AreaId | undefined {
if (own) return own.id;
if (e.id === "motions" || e.id === "effects") return "motions";
if (inFx(e)) return "fx";
- if (e.kind === "create" && e.id !== "canvas" && e.id !== "assist") return "create";
+ if (e.kind === "create" && e.id !== "canvas" && e.id !== "assist" && e.id !== "chat") return "create";
if (e.kind === "studio") return "studios";
return undefined;
}
diff --git a/src/lib/nav-model.ts b/src/lib/nav-model.ts
index 21e7249a..18130c83 100644
--- a/src/lib/nav-model.ts
+++ b/src/lib/nav-model.ts
@@ -120,6 +120,7 @@ const PAGES: NavEntry[] = [
{ id: "home", href: "/", label: "Home", what: "Start from words or a picture", kind: "home", goals: [], keywords: "start new creation home", icon: "Home", eager: true },
{ id: "new", href: NEW_CREATION_HREF, label: "New creation", what: "A fresh composer on Home", kind: "action", goals: [], keywords: "new creation start fresh blank compose", icon: "Plus" },
{ id: "assist", href: "/assist", label: "Assist", what: "Plan it with an agent", kind: "create", goals: [], keywords: "agent chat plan assistant ai helper", icon: "MessageCircle", eager: true },
+ { id: "chat", href: "/chat", label: "Chat", short: "Chat", what: "Talk, plan and write with AI", kind: "create", goals: [], keywords: "chat talk advice ideas roleplay characters write ask brainstorm", icon: "MessageCircle", newUntil: newFor30Days("2026-11-07") },
{ id: "image", href: "/image", label: "Image", what: "Text to image", kind: "create", goals: [], keywords: "text to image picture photo generate", cover: "app-poster", icon: "ImageIcon", eager: true, popular: true },
{ id: "video", href: "/video", label: "Video", what: "Text or image to video", kind: "create", goals: ["film"], keywords: "text to video image to video animate clip", cover: "motion-fpv-drone", icon: "Video", eager: true, popular: true },
{ id: "edit", href: "/edit", label: "Edit", what: "Change a picture with words", kind: "create", goals: ["edit"], keywords: "edit image change photo retouch", cover: "app-relight", icon: "Wand2" },
@@ -499,7 +500,7 @@ export const NAV_ENTRIES: readonly NavEntry[] = [...PAGES, ...STUDIOS, ...HUB_TO
* starts from them). Storyboard plans a film, so it sits with Make (its card is in the launcher's Film column).
*/
export const CREATE_COLUMNS = [
- { label: "Make", ids: ["image", "video", "assist", "canvas", "storyboard"] },
+ { label: "Make", ids: ["image", "video", "assist", "chat", "canvas", "storyboard"] },
{ label: "Edit a picture", ids: ["edit", "live-edit", "inpaint", "layers", "color-grade"] },
] as const;
diff --git a/src/lib/nav-search.ts b/src/lib/nav-search.ts
index 4c75f22c..18511e2c 100644
--- a/src/lib/nav-search.ts
+++ b/src/lib/nav-search.ts
@@ -78,6 +78,7 @@ export const INTENTS: readonly Intent[] = [
{ id: "channel", triggers: ["youtube", "channel", "faceless", "episode", "series", "podcast"], targets: ["faceless", "content-factory", "explainer", "audio"] },
{ id: "film", triggers: ["film", "movie", "cinematic", "scene", "shot", "director", "trailer", "music video"], targets: ["cinema", "storyboard", "motions", "katana"] },
{ id: "dance", triggers: ["dance", "choreography", "pose", "moves", "tiktok dance"], targets: ["motion-control", "app-dance", "genjutsu"] },
+ { id: "chat", triggers: ["chat", "chatbot", "talk to", "talk with", "talk about", "ask", "advice", "roleplay", "role play", "brainstorm"], targets: ["chat", "assist"] },
{ id: "talk", triggers: ["talk", "talking", "speak", "lipsync", "lip sync", "avatar", "presenter", "spokesperson"], targets: ["lipsync", "app-talking-photo", "audio-speech"] },
{ id: "sound", triggers: ["sound", "audio"], targets: ["audio", "audio-clean", "audio-sfx", "audio-music"] },
{ id: "voice", triggers: ["voice", "voiceover", "voice over", "narration", "narrator", "tts", "text to speech", "read aloud"], targets: ["audio-speech", "audio", "lipsync"] },
diff --git a/tests/__snapshots__/home-studios.html b/tests/__snapshots__/home-studios.html
index 324c80f5..89797a14 100644
--- a/tests/__snapshots__/home-studios.html
+++ b/tests/__snapshots__/home-studios.html
@@ -2,7 +2,7 @@
<div class="mb-4">
<div class="flex items-center justify-between gap-4">
<h2 id="home-studios" class="font-heading text-[24px] leading-tight sm:text-[28px]">Studios and tools<span aria-hidden="true" class="ml-2 inline-block rounded-full bg-muted px-2 align-[0.3em] font-sans text-[13px] leading-6 tracking-normal text-muted-foreground tabular-nums">
-<span style="display:inline-block;min-width:2ch;font-variant-numeric:tabular-nums">42</span>
+<span style="display:inline-block;min-width:2ch;font-variant-numeric:tabular-nums">43</span>
</span>
</h2>
<a aria-label="See all 23 studios" class="group relative inline-flex shrink-0 items-center gap-1 text-[13px] text-muted-foreground transition-colors after:absolute after:-inset-x-2 after:-inset-y-3 after:content-[&#x27;&#x27;] hover:text-foreground" href="/studios">See all 23 studios <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right size-3.5 transition-transform duration-150 group-hover:translate-x-0.5" aria-hidden="true">
@@ -395,6 +395,13 @@
<div class="fade-x scrollbar-none max-sm:-mx-4 max-sm:overflow-x-auto max-sm:px-4">
<ul class="flex flex-wrap gap-1.5 max-sm:w-[72rem]">
<li>
+<a class="group inline-flex h-8 items-center gap-1.5 rounded-full border px-3 text-[13px] transition-colors hover:bg-accent" href="/chat">
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-circle size-3.5 text-muted-foreground transition-colors group-hover:text-brand-text" aria-hidden="true">
+<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719">
+</path>
+</svg>Chat</a>
+</li>
+<li>
<a class="group inline-flex h-8 items-center gap-1.5 rounded-full border px-3 text-[13px] transition-colors hover:bg-accent" href="/video">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video size-3.5 text-muted-foreground transition-colors group-hover:text-brand-text" aria-hidden="true">
<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5">
diff --git a/tests/nav-areas.test.ts b/tests/nav-areas.test.ts
index 549b248c..2bf9e845 100644
--- a/tests/nav-areas.test.ts
+++ b/tests/nav-areas.test.ts
@@ -151,10 +151,11 @@ describe("/studios", () => {
});
describe("/create", () => {
- it("shows every entry of the Create menu but Assist (an item of the bar), as a card or a pill, and the menu reads the model's own columns", () => {
+ it("shows every entry of the Create menu but Assist and Chat (items of the bar), as a card or a pill, and the menu reads the model's own columns", () => {
const all = ids("create", "guest");
- for (const c of CREATE_COLUMNS) for (const id of c.ids) if (id !== "assist") expect(all, id).toContain(id);
+ for (const c of CREATE_COLUMNS) for (const id of c.ids) if (id !== "assist" && id !== "chat") expect(all, id).toContain(id);
expect(all).not.toContain("assist");
+ expect(all).not.toContain("chat");
expect(all).not.toContain("new");
expect(createMenu.CREATE_COLUMNS).toBe(CREATE_COLUMNS);
});
@@ -251,7 +252,7 @@ describe("Motions & effects and Apps", () => {
});
describe("which bar item and tab a page marks", () => {
- it("gives each page one area, and Canvas and Assist none (they have items of their own)", () => {
+ it("gives each page one area, and Canvas, Assist and Chat none (they have items of their own)", () => {
const cases: [string, string | undefined][] = [
["/create", "create"],
["/image", "create"],
@@ -260,6 +261,8 @@ describe("which bar item and tab a page marks", () => {
["/canvas/p1", undefined],
["/assist", undefined],
["/assist/skills", undefined],
+ ["/chat", undefined],
+ ["/chat/t1", undefined],
["/studios", "studios"],
["/extend", "fx"],
["/genjutsu", "fx"],
@@ -290,7 +293,8 @@ describe("which bar item and tab a page marks", () => {
expect(barActive("/studios")).toMatchObject({ studios: true, create: false, page: "studios" });
expect(barActive("/motions-and-effects")).toMatchObject({ motions: true, page: "motions" });
expect(barActive("/canvas")).toMatchObject({ canvas: true, create: false });
- expect(barActive("/assist")).toMatchObject({ assist: true, create: false });
+ expect(barActive("/assist")).toMatchObject({ assist: true, chat: false, create: false });
+ expect(barActive("/chat")).toMatchObject({ chat: true, assist: false, create: false });
});
it("selects the Create and Studios tabs on their own pages, and none on the galleries' page", () => {
diff --git a/tests/nav-bar.test.ts b/tests/nav-bar.test.ts
index de0b52ee..f0b7fdf2 100644
--- a/tests/nav-bar.test.ts
+++ b/tests/nav-bar.test.ts
@@ -117,13 +117,15 @@ describe("which bar item holds the page", () => {
expect(barActive("/live-edit").create).toBe(true);
});
- it("marks the galleries, Canvas, Assist and Library on their pages", () => {
+ it("marks the galleries, Canvas, Assist, Chat and Library on their pages", () => {
expect(barActive("/apps")).toMatchObject({ apps: true, studios: false });
expect(barActive("/apps/app-billboard-ad").apps).toBe(true);
expect(barActive("/motions").motions).toBe(true);
expect(barActive("/effects").motions).toBe(true);
expect(barActive("/canvas/p1").canvas).toBe(true);
expect(barActive("/assist/skills").assist).toBe(true);
+ expect(barActive("/chat").chat).toBe(true);
+ expect(barActive("/chat/abc123")).toMatchObject({ chat: true, assist: false, create: false });
expect(barActive("/library").library).toBe(true);
});
@@ -281,7 +283,7 @@ describe("the bar's shell", () => {
expect(html).toContain('aria-expanded="false"');
// Studios is its name only: no count beside it.
expect(html).not.toContain(`>${studioCount()}<`);
- for (const h of ["/", "/assist", "/library", "/?new=1"]) expect(hrefs(html), h).toContain(h);
+ for (const h of ["/", "/assist", "/chat", "/library", "/?new=1"]) expect(hrefs(html), h).toContain(h);
for (const h of ["/create", "/studios", "/apps", "/motions-and-effects", "/canvas"]) expect(html, h).toContain(`data-href="${h}"`);
// Search's name is the words it shows (sr-only below lg).
expect(html).toContain(">Search Fuobe</span>");
@@ -516,22 +518,23 @@ describe("menu items: one button each, the area's page inside its menu", () => {
});
describe("create and prefetch", () => {
- it("puts the create tools in two columns of five", () => {
+ it("puts the create tools in two columns, Chat beside Assist", () => {
const cols = createColumns(undefined);
expect(cols.map((c) => c.label)).toEqual(["Make", "Edit a picture"]);
expect(cols.map((c) => c.entries.map((e) => e.id))).toEqual([
- ["image", "video", "assist", "canvas", "storyboard"],
+ ["image", "video", "assist", "chat", "canvas", "storyboard"],
["edit", "live-edit", "inpaint", "layers", "color-grade"],
]);
- expect(CREATE_HREFS).toHaveLength(10);
- for (const kind of ["guest", "account", "owner"] as const) expect(createColumns(kind).flatMap((c) => c.entries)).toHaveLength(10);
+ expect(CREATE_HREFS).toHaveLength(11);
+ expect(CREATE_HREFS).toContain("/chat");
+ for (const kind of ["guest", "account", "owner"] as const) expect(createColumns(kind).flatMap((c) => c.entries)).toHaveLength(11);
});
it("prefetches every launcher, create and library route once, and nothing off the site", () => {
const list = prefetchHrefs(undefined);
expect(new Set(list).size).toBe(list.length);
for (const c of launcherColumns(undefined)) for (const e of [c.lead, ...c.rest]) expect(list).toContain(e.href);
- for (const id of ["image", "video", "edit", "live-edit", "inpaint", "layers", "color-grade", "canvas", "assist", "library", "favorites"]) expect(list).toContain(entry(id)!.href);
+ for (const id of ["image", "video", "edit", "live-edit", "inpaint", "layers", "color-grade", "canvas", "assist", "chat", "library", "favorites"]) expect(list).toContain(entry(id)!.href);
for (const h of list) expect(h.startsWith("/") && !h.includes("#"), h).toBe(true);
// The same for every viewer: none of these is owner-only.
expect(prefetchHrefs("owner")).toEqual(list);
diff --git a/tests/nav-model.test.ts b/tests/nav-model.test.ts
index dbb7df25..4e4a0de8 100644
--- a/tests/nav-model.test.ts
+++ b/tests/nav-model.test.ts
@@ -142,14 +142,17 @@ describe("nav model: entries", () => {
for (const [, rows] of OLD_NAV) for (const [href, label] of rows) expect(NAV_ENTRIES.find((e) => e.href === href)?.label, href).toBe(label);
});
- it("derives the groups as they were, with Kinetic Motion, and the FX studios moved from Studios to Fuobe FX: 46 rows", () => {
+ it("derives the groups as they were, with Kinetic Motion, Chat beside Assist, and the FX studios moved from Studios to Fuobe FX: 47 rows", () => {
const FX_HREFS = ["/genjutsu", "/character-swap", "/motion-control", "/video-tools", "/extend", "/reframe"];
- const old = OLD_NAV.map(([label, rows]) => [label, label === "Studios" ? rows.filter(([href]) => !FX_HREFS.includes(href)) : rows] as (typeof OLD_NAV)[number]);
+ const withChat = (rows: [string, string][]) => rows.flatMap((r): [string, string][] => (r[0] === "/assist" ? [r, ["/chat", "Chat"]] : [r]));
+ const old = OLD_NAV.map(
+ ([label, rows]) => [label, label === "Studios" ? rows.filter(([href]) => !FX_HREFS.includes(href)) : label === "Create" ? withChat(rows) : rows] as (typeof OLD_NAV)[number],
+ );
const moved = OLD_NAV.find(([l]) => l === "Studios")![1].filter(([href]) => FX_HREFS.includes(href));
expect(moved).toHaveLength(6);
const fx: (typeof OLD_NAV)[number] = ["Fuobe FX", [["/fx", "Fuobe FX"], ...FX_HREFS.map((h) => moved.find(([href]) => href === h)!)]];
expect(NAV.map((g) => [g.label, g.items.map((i) => [i.href, i.label])])).toEqual([...old.slice(0, 3), fx, ...old.slice(3)]);
- expect(NAV.flatMap((g) => g.items)).toHaveLength(46);
+ expect(NAV.flatMap((g) => g.items)).toHaveLength(47);
expect(NAV.find((g) => g.label === "Fuobe FX")?.collapsible).toBe(true);
expect(NAV.find((g) => g.label === "Studios")?.collapsible).toBe(true);
// The same rows prefetch eagerly, with an icon each and search words.
diff --git a/tests/nav-search.test.ts b/tests/nav-search.test.ts
index cea796f5..58a35765 100644
--- a/tests/nav-search.test.ts
+++ b/tests/nav-search.test.ts
@@ -66,6 +66,18 @@ describe("search by what you want to make", () => {
const top = labels("talking photo");
expect(top).toContain("Lipsync & avatars");
expect(top).toContain("Talking Photo");
+ expect(top).not.toContain("Chat");
+ });
+
+ it("“chat”, “talk”, “ask”, “advice”, “roleplay” → Chat, for every viewer", () => {
+ for (const entries of [GUEST, ACCOUNT, OWNER]) {
+ expect(searchNav("chat", entries).best[0]).toMatchObject({ label: "Chat", href: "/chat" });
+ for (const q of ["ask", "advice", "roleplay", "role play", "ask for advice", "talk to ai", "talk about ideas", "brainstorm ideas"]) {
+ expect(searchNav(q, entries).best.map((h) => h.href), q).toContain("/chat");
+ }
+ // "talk" alone is mostly lipsync and voices: Chat is listed with them, first of the rest.
+ expect(all("talk", entries).map((h) => h.href)).toContain("/chat");
+ }
});
it("“make my product video for amazon” → Marketing Studio first", () => {
diff --git a/tests/phone-nav.test.ts b/tests/phone-nav.test.ts
index 5242fbac..50aef659 100644
--- a/tests/phone-nav.test.ts
+++ b/tests/phone-nav.test.ts
@@ -66,7 +66,7 @@ describe("the selected tab", () => {
it("is Studios in a studio, its pages and the apps, and Create in a create tool", () => {
for (const p of ["/cinema", "/cinema/abc", "/marketing/click-to-ad", "/audio/clean", "/apps", "/apps/app-3d-figure", "/fashion-factory"]) expect(tabFor(p), p).toBe("studios");
- for (const p of ["/image", "/video", "/edit", "/assist", "/canvas"]) expect(tabFor(p), p).toBe("create");
+ for (const p of ["/image", "/video", "/edit", "/assist", "/chat", "/chat/abc", "/canvas"]) expect(tabFor(p), p).toBe("create");
});
it("is none on a page no tab leads to", () => {