Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/remove-glide-font.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"diffhub": patch
---

Replace the bundled Glide/Glide Mono typeface with Inter, loaded via `next/font/google` instead of the removed local woff2 files. Required by a licence takedown demand from Lineto GmbH; no functional or visual-weight change beyond the typeface swap.
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,14 @@ curl -s localhost:2099/api/files # JSON file list; /api/diff streams text/p
```

There is no `pnpm run doctor`, `pnpm run verify`, or feature map. Gap: nothing scripts the build, serve, and API or browser check above, so UI behaviour (scroll anchoring, comments, themes) is proven only by the unit tests and by hand; `apps/web` has a Playwright `test:instant` that CI does not run.

<!-- BEGIN:turborepo-agent-rules -->

# This is NOT the Turborepo you know

Turborepo configuration, task behavior, and CLI commands can vary between installed versions and may differ from your training data. Resolve the `turbo` package from this file's directory or relevant workspace; in monorepos, it may not be visible from the repository root. For example, run `node -p "require.resolve('turbo/package.json')"` from a workspace that depends on `turbo`.

Read `docs/README.md` inside that installed package first, then read the relevant pages from its `docs/` directory before changing Turborepo configuration or commands. Heed deprecation notices. These bundled docs match the installed package version and are available without network access.

This block is written and re-added by `turbo` before repository-scoped commands when an AI agent is detected. In the Turborepo source repository, its template is defined in `crates/turborepo-cli/src/cli/agent_guidance.rs`. Removing the managed block while updates are enabled means a later qualifying invocation will add it again. Set `"agentGuidance": false` in the root `turbo.json` or `turbo.jsonc` to opt out; this does not remove an existing block. Keep the block committed with your work to avoid an uncommitted change on the next agent invocation.
<!-- END:turborepo-agent-rules -->
Binary file removed apps/cli/app/fonts/glide-variable-italic.woff2
Binary file not shown.
Binary file removed apps/cli/app/fonts/glide-variable.woff2
Binary file not shown.
4 changes: 2 additions & 2 deletions apps/cli/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-glide), ui-sans-serif, system-ui, sans-serif;
--font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
--font-mono: var(--font-jetbrains-mono), ui-monospace, monospace;
--font-heading: var(--font-glide), ui-sans-serif, system-ui, sans-serif;
--font-heading: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
Expand Down
15 changes: 5 additions & 10 deletions apps/cli/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { Agentation } from "agentation";
import type { Metadata } from "next";
import { JetBrains_Mono } from "next/font/google";
import localFont from "next/font/local";
import { Inter, JetBrains_Mono } from "next/font/google";
import { DiffsWorkerProvider } from "@diffhub/diff-core/react";
import { ThemeProvider } from "@/components/theme-provider";
import "./globals.css";

const glide = localFont({
const inter = Inter({
display: "swap",
src: [
{ path: "./fonts/glide-variable.woff2", style: "normal" },
{ path: "./fonts/glide-variable-italic.woff2", style: "italic" },
],
variable: "--font-glide",
weight: "100 950",
subsets: ["latin"],
variable: "--font-inter",
});

const jetbrainsMono = JetBrains_Mono({
Expand All @@ -35,7 +30,7 @@ export default function RootLayout({
return (
<html
lang="en"
className={`${glide.variable} ${jetbrainsMono.variable}`}
className={`${inter.variable} ${jetbrainsMono.variable}`}
suppressHydrationWarning
>
<body className="bg-background antialiased">
Expand Down
Binary file removed apps/web/app/fonts/glide-mono.woff2
Binary file not shown.
Binary file removed apps/web/app/fonts/glide-variable.woff2
Binary file not shown.
6 changes: 3 additions & 3 deletions apps/web/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-glide), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
--font-sans: var(--font-inter), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
--font-mono:
var(--font-glide-mono), ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
var(--font-geist-mono), ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
"Liberation Mono", monospace;
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
Expand Down Expand Up @@ -59,7 +59,7 @@
--radius-2xl: calc(var(--radius) * 1.8);
--radius-3xl: calc(var(--radius) * 2.2);
--radius-4xl: calc(var(--radius) * 2.6);
--font-display: var(--font-glide);
--font-display: var(--font-inter);
--shadow-card: var(--shadow-card);
--shadow-card-hover: var(--shadow-card-hover);
--shadow-inset: var(--shadow-inset);
Expand Down
20 changes: 8 additions & 12 deletions apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
import type { Metadata, Viewport } from "next";
import localFont from "next/font/local";
import { Geist_Mono, Inter } from "next/font/google";

import { siteConfig } from "@/lib/config";

import "./globals.css";

const glide = localFont({
const inter = Inter({
display: "swap",
// No italic face: nothing on the site sets italic sans, and preloading it
// cost every page 117 KB.
src: [{ path: "./fonts/glide-variable.woff2", style: "normal" }],
variable: "--font-glide",
weight: "100 950",
subsets: ["latin"],
variable: "--font-inter",
});

const glideMono = localFont({
const geistMono = Geist_Mono({
display: "swap",
src: "./fonts/glide-mono.woff2",
variable: "--font-glide-mono",
weight: "400",
subsets: ["latin"],
variable: "--font-geist-mono",
});

export const viewport: Viewport = {
Expand Down Expand Up @@ -98,7 +94,7 @@ export default function RootLayout({
}>) {
return (
<html
className={`${glide.variable} ${glideMono.variable} min-h-screen font-sans antialiased`}
className={`${inter.variable} ${geistMono.variable} min-h-screen font-sans antialiased`}
lang="en"
>
<head>
Expand Down
12 changes: 6 additions & 6 deletions apps/web/app/og-image-shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ImageResponse } from "next/og";

/**
* Layout helper for this zone's social card. The zone owns the route, the
* brand colours, and the mark. This file only sets type in Glide and the
* brand colours, and the mark. This file only sets type in Inter and the
* poster lockup (mark at the top, title on the baseline).
*
* It is not served by blode-co. `app/opengraph-image.tsx` in this repo is the
Expand All @@ -33,10 +33,10 @@ export const OG_CONTENT_TYPE = "image/png";

const ogAsset = (file: string) => path.join(process.cwd(), "lib/og-assets", file);

const glideFonts = [
const interFonts = [
{
data: readFileSync(ogAsset("glide-600.ttf")),
name: "Glide",
data: readFileSync(ogAsset("inter-600.ttf")),
name: "Inter",
style: "normal" as const,
weight: 600 as const,
},
Expand Down Expand Up @@ -80,7 +80,7 @@ export const renderZoneOgImage = ({
style={{
color,
display: "flex",
fontFamily: "Glide",
fontFamily: "Inter",
fontSize: titleSize,
fontWeight: 600,
letterSpacing: "-0.02em",
Expand All @@ -94,5 +94,5 @@ export const renderZoneOgImage = ({
</div>
);

return new ImageResponse(content, { ...OG_SIZE, fonts: glideFonts });
return new ImageResponse(content, { ...OG_SIZE, fonts: interFonts });
};
4 changes: 2 additions & 2 deletions apps/web/components/marketing/review-demo-hunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export interface DiffLine {
// Verbatim from `git show afe7d53 -- apps/cli/lib/export-comments.ts`, split
// into the tokens Shiki produces with packages/diff-core/src/themes/linear-dark.json,
// the theme the viewer itself renders with. Set in the system monospace stack,
// not Glide Mono, because Glide Mono's backtick has zero advance width and eats
// the space beside it.
// not the site's `--font-mono` (Geist Mono), to keep this static demo decoupled
// from font loading.
const PINK = "#fa9ce3";
const PURPLE = "#cc9dff";
const BLUE = "#8fa7ff";
Expand Down
6 changes: 4 additions & 2 deletions apps/web/lib/conversion-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ test("a product slug stays on location and does not invent $pathname", () => {
});

test("zip and dmg hrefs use download_clicked", () => {
expect(isDownloadHref("https://blode.co/glide/glide.zip")).toBe(true);
expect(isDownloadHref("https://blode.co/cascade/cascade.zip")).toBe(true);
expect(isDownloadHref("https://blode.co/convene/Convene.dmg")).toBe(true);
expect(isDownloadHref("https://blode.co/commandment/app.dmg?x=1")).toBe(true);
expect(conversionEventForHref("https://blode.co/glide/glide.zip")).toBe(DOWNLOAD_CLICKED_EVENT);
expect(conversionEventForHref("https://blode.co/cascade/cascade.zip")).toBe(
DOWNLOAD_CLICKED_EVENT,
);
expect(isDownloadHref("https://blode.co/diffhub")).toBe(false);
expect(isDownloadHref("https://github.com/mblode/diffhub")).toBe(false);
expect(isDownloadHref("npx diffhub@latest cmux")).toBe(false);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/conversion-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface ConversionClick {
const DOWNLOAD_HREF = /\.(?:zip|dmg)(?:[?#]|$)/iu;

/**
* Binary downloads (Glide zip, Convene/Commandment dmg) use `download_clicked`.
* Binary downloads (Cascade zip, Convene/Commandment dmg) use `download_clicked`.
* Install, GitHub, sign-in, and create flows stay on `cta_clicked`.
*/
export const isDownloadHref = (href: string): boolean => DOWNLOAD_HREF.test(href);
Expand Down
Loading
Loading