"use client" /** * Spotlight — the third home layout. * * ## Why it is shaped nothing like the other two * * Storefront and Focus are both single columns you read top to bottom: a * greeting, then sections, then cards. They differ only in how much catalog * they show. A third variant built the same way is a rearrangement, not a third * answer, so this one changes the geometry and the interaction model together. * * **Split canvas.** The page is two halves that do different jobs and never * interleave. The left is you and your day and stays put; the right is * everything Exxat could be to you and scrolls past it. Nothing on the left is * marketing and nothing on the right is a task, which is the separation the * other two layouts blur by stacking both in one column. * * **Search is the palette, not a field on the page.** This layout used to open * with a jump field that filtered your products, the record hubs, and the catalog * in place, with Leo as the last result. It is gone. The shell already carries one * search surface on every route, reachable here from the utility bar or ⌘K, and a * second one on a single page splits the answer to "where do I search" by which * page you happen to be on. * * ## Everything is type * * Nothing on the page is allowed a border, a fill, or a shadow. Products, record * hubs, and the whole catalog are set as type on the page background, separated by * space and hairlines rather than by boxes, and they earn contrast only on hover. * Colour is rationed the same way: each product's hue survives at the size of its * mark and nowhere else. * * This is what makes the layout scan in one pass. Ten bordered cards give the eye * ten equal entry points and no answer to "where do I start"; two columns of type * under one heading give it the heading. * * ## Why this shape and not a prettier grid * * The 2026 Gravyty survey of 1,058 enrolled US students: 58% say consumer apps * reset what they expect from institutional software, 85% have hit a concrete * friction point, and the most common one is "couldn't find what I needed and * gave up". They rank finishing a task in one place, personalisation, and * visible status above everything else. A catalog answers none of that. A field * plus live state answers all three. * * ## Everything on it is real * * No invented counts and no fake recents. The waiting list reads the * `needsAttention` numbers from `directoryLaunchSummaries()` that the other two * layouts discard, and the promoted product takes one stat from the same * social-proof mock the marketing page uses. */ import * as React from "react" import { useNavigate } from "react-router" import { MarketingBanner } from "@/components/ui/marketing-banner" import { usePersistedState } from "@exxatdesignux/ui/lib/persisted-state" import { directoryLaunchSummaries } from "@/lib/product-home" import { getProductBrand } from "@/lib/product-brand" import { NAV_USER } from "@/lib/mock/navigation" import { ProductIllustration } from "./product-illustration" import { canReadDirectory } from "@/lib/workspace-role" import { INDEX_LIST, MosaicCatalogRow, MosaicOwnedRow, MosaicWaitingRow, SectionLabel, } from "./home-mosaic" import { FEATURED_DISMISSED_KEY, FEATURED_PRODUCT, firstName, greetingForHour, HomeGreetingShelfCard, HomeVariantBody, NoProductsCard, WhatsNewSection, type HomeBodyProps, } from "./product-home-parts" export function SpotlightHome({ owned, available, workspaceName, onOpen, showYourApp, showMoreFromExxat, }: HomeBodyProps) { const navigate = useNavigate() // Read once. The clock is not state this page reacts to, and re-reading it // during render would make the component's output depend on when React // happened to call it. const [greeting] = React.useState(() => greetingForHour(new Date().getHours())) const records = React.useMemo(() => directoryLaunchSummaries(), []) const waiting = records.reduce((sum, record) => sum + record.needsAttention, 0) const featured = available.find(card => card.product === FEATURED_PRODUCT) ?? available[0] const [dismissed, setDismissed] = usePersistedState(FEATURED_DISMISSED_KEY, false, { debounceMs: 0, }) const showFeatured = Boolean(featured) && !dismissed return ( {/* Above both columns rather than inside the left one. In the left column it pushed that column's first heading down by its own height, so `Your App` and `More from Exxat` started on different lines and the two halves read as unrelated. `max-w-xl` keeps the status line to a readable measure instead of running the width of the page. */}

{greeting}, {firstName(NAV_USER.name)}

{workspaceName} {waiting > 0 ? ( <> {" · "} {waiting} {waiting === 1 ? "record is" : "records are"} waiting on someone ) : ( " · Nothing is waiting on you." )}

{/* A main column and a rail, not two halves. Your apps and the rest of the catalog are one reading order — what you have, then what you could have — so they stack in the same column; the directory is a different kind of thing entirely (records, not products) and sits beside them where it can be reached without scrolling past the store. Placement is explicit rather than by DOM order, so the stack below `lg` can be products, directory, what's new, catalog — your day first, marketing last — while the wide screen still puts the directory level with the first section. The rail sticks inside the shell's own scroller rather than owning one, so the page keeps a single scrollbar (`exxat-page-scroll-ownership`). Not an even split: the catalog carries a banner whose headline sits beside artwork, and at half the page that headline broke onto two lines with the drawing crushed into 130px next to it. */}
{!showYourApp ? null : owned.length === 0 ? (
) : (
Your App
    {owned.map(card => ( ))}
)} {/* Spans the main column's rows so the catalog starts under what's new rather than under whichever column happens to be taller — level tops, ragged bottoms. Everyone but a student, like `HomeDirectorySection` in the other three variants. This variant draws its own rail rather than calling that component, so it has to carry the same gate itself. */} {canReadDirectory() ? (
Directory
    {records.map(object => ( ))}
) : null} {showMoreFromExxat ? (
More from Exxat {/* The DS promo primitive rather than a hand-built one. */} {showFeatured && featured ? ( } primaryAction={{ label: "Learn more", onClick: () => navigate(featured.slug), }} // No beta opt-in on the banner. The promoted product keeps its row // in the index below, which carries `BetaAccessAction` already, // and that state is per instance — two controls for one product // would have disagreed as soon as either was pressed. onDismiss={() => setDismissed(true)} > {/* Tagline only. The proof stat used to sit here behind a middot, which broke across the line and left the number stranded from the noun it counts. It reads properly on the page Learn more goes to, which is where someone weighing the product is. */} {featured.tagline} ) : null} {/* The promoted product keeps its row here too. Holding it out made dismissing the banner change the length of the index below it. */}
    {available.map(card => ( ))}
) : null}
) }