Login
You're viewing the f.duriansoftware.com public feed.
  • Oct 19, 2026, 8:05 PM

    LLM code constantly dares to ask the question "how hard could you make it to have a constant." In this case, "how on earth can we set the page title to "Muse""

    export const LOGGED_OUT_PRODUCT_NAME = "Muse";
export const LOGGED_IN_PRODUCT_NAME = "Muse";
const LEGACY_PRODUCT_FULL_NAME = "Project Hatch";
const LEGACY_PRODUCT_SHORT_NAME_PATTERN = /\bHatch\b/g;

export type ProductBrandNames = {
  readonly fullName: string;
  readonly shortName: string;
};

function createProductBrand(productName: string) {
  return {
    fullName: productName,
    shortName: productName,
    shortNameLowercase: productName.toLowerCase(),
    assistantFallbackName: productName,
  } as const;
}

export const LOGGED_OUT_PRODUCT_BRAND = createProductBrand(
  LOGGED_OUT_PRODUCT_NAME,
);
export const LOGGED_IN_PRODUCT_BRAND = createProductBrand(
  LOGGED_IN_PRODUCT_NAME,
);

/** Existing signed-in surfaces use this authenticated-product alias. */
export const PRODUCT_BRAND = LOGGED_IN_PRODUCT_BRAND;
    import { LOGGED_IN_PRODUCT_BRAND } from "@/_lib/productBranding";
/** Browser-only product name revealed after the NDA has been accepted. */ export const POST_NDA_BROWSER_TITLE =
  LOGGED_IN_PRODUCT_BRAND.fullName;
/** The product mark that goes with {@link POST_NDA_BROWSER_TITLE}. */ export const POST_NDA_FAVICON_SVG_URL =
  "/images/favicon/app-squiggle.svg";
    return () => { unsub_0(); document.removeEventListener("visibilitychange", onReturnToTab); window.removeEventListener("focus", onReturnToTab); closePendingApprovalBrowserNotification(); document.title = POST_NDA_BROWSER_TITLE; setFaviconBadge(false); }; }, []);
    💬 4🔄 0⭐ 0

Replies