Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
1eb824f
feat(files): let the file manager table fill the content pane
CubityFirst Nov 12, 2026
cc57d88
fix(docs): ask before the doc editor throws away unsaved work (CRT1)
CubityFirst Nov 16, 2026
ba43a6f
fix(frontend): sign-in survives a failed Turnstile, and crashes get a…
CubityFirst Nov 16, 2026
76d230b
fix(frontend): fix AlertDialog buttons at the root so destructive con…
CubityFirst Nov 16, 2026
73c75b6
fix(frontend): one name for recents, no 'workspace' on the 404, demo …
CubityFirst Nov 16, 2026
515dd70
fix(frontend): code blocks pass AA with tuned colours and a real ligh…
CubityFirst Nov 16, 2026
b790dfb
fix(frontend): make the active sidebar row distinct from a hovered on…
CubityFirst Nov 16, 2026
152ece1
fix(frontend): bring light-mode section labels up to WCAG AA (SHL2)
CubityFirst Nov 16, 2026
3d4c9e9
fix(frontend): readable dice results in light mode, stable order, ann…
CubityFirst Nov 16, 2026
6af69a0
fix(frontend): history banner uses real buttons with a clear primary …
CubityFirst Nov 16, 2026
1d53835
fix(frontend): export as PDF only offers toggles for what the page sh…
CubityFirst Nov 16, 2026
33db578
fix(frontend): drop the "TAG" eyebrow from the tag page (DOC4)
CubityFirst Nov 16, 2026
5bec536
fix(frontend): doc tag pills are real links with 28px+ targets (DOC5)
CubityFirst Nov 16, 2026
16c0001
fix(files): destructive confirm buttons actually render red (FIL1)
CubityFirst Nov 16, 2026
ac5c901
fix(files): file page says 'Move to recycle bin' like everywhere else…
CubityFirst Nov 16, 2026
8304ee6
fix(settings): change-password dialog: say why the submit is disabled…
CubityFirst Nov 16, 2026
91fd008
fix(settings): create API key dialog: add Cancel and label the Access…
CubityFirst Nov 16, 2026
52ddcc2
feat(frontend): add a real 'Show sidebar' button when the desktop sid…
CubityFirst Nov 16, 2026
54e32d5
feat(public): make the site name the public site's home link (PUB1)
CubityFirst Nov 16, 2026
cd2bdf4
fix(public): use the app's scrim and lift for the mobile reader drawe…
CubityFirst Nov 16, 2026
39a4c5b
fix(settings): fonts table fits a phone instead of hiding the Interfa…
CubityFirst Nov 16, 2026
bce8e98
fix(frontend): widen the mobile drawer so the site name is readable (…
CubityFirst Nov 16, 2026
356b44b
fix(public): give Report Site a visible label, counter, and primary s…
CubityFirst Nov 16, 2026
e4e94bf
fix(settings): branding rows on phones: full-width copy, preview besi…
CubityFirst Nov 16, 2026
7b3f24a
fix(frontend): show a real icon, honest title, and retry on invite er…
CubityFirst Nov 16, 2026
1a37f75
fix(settings): light theme: control outlines and off switches reach 3…
CubityFirst Nov 16, 2026
ba7a3b2
fix(oidc): keep the Sign in with Annex error from being a dead end (P…
CubityFirst Nov 16, 2026
8ffea55
fix(settings): real h3 sub-headings: drop the 'USING YOUR KEY' eyebro…
CubityFirst Nov 16, 2026
eae542e
fix(auth): show the strength meter when the password passes (PUB6)
CubityFirst Nov 16, 2026
46a4b8b
fix(settings): give 'Rebuild graph' its own sub-row instead of crowdi…
CubityFirst Nov 16, 2026
a4ebfc6
fix(auth): use one Back to sign in across every auth step (PUB7)
CubityFirst Nov 16, 2026
be60cfd
fix(settings): select and button rows stack on phones, like DangerRow…
CubityFirst Nov 16, 2026
a1ed4f0
fix(frontend): no stray focus ring in move/access dialogs, and mark t…
CubityFirst Nov 16, 2026
db243cd
fix(auth): say a security-key failure once and offer a way forward (P…
CubityFirst Nov 16, 2026
beff6ae
fix(public): lead a missing public page back to the site (PUB9)
CubityFirst Nov 16, 2026
2915ce4
style(frontend): drop the kicker labels over landing headings (PUB10)
CubityFirst Nov 16, 2026
dfd911d
feat(auth): add Forgot password? to the sign-in form (PUB11)
CubityFirst Nov 16, 2026
434024e
feat(frontend): one-line demo banner, with clearer copy (SHL5)
CubityFirst Nov 16, 2026
780c17c
feat(orgs): org page joins the shared top bar, page container and emp…
CubityFirst Nov 16, 2026
46210e7
fix(search): palette's dashboard action lands on the dashboard; align…
CubityFirst Nov 16, 2026
5bc1b36
feat(frontend): show that the account row opens a menu (SHL8)
CubityFirst Nov 16, 2026
06d44c0
fix(settings): tag-colour editor: named controls, one tab stop per sw…
CubityFirst Nov 16, 2026
f4edce7
fix(frontend): plain-language copy in the document access dialog (DOC7)
CubityFirst Nov 16, 2026
d5f89b0
fix(settings): delete-site dialog: no ghost placeholder, flag a typo,…
CubityFirst Nov 16, 2026
c124c69
fix(frontend): history sheet empty state that teaches (DOC8)
CubityFirst Nov 16, 2026
89fe715
fix(frontend): one row rhythm for every sidebar list (SHL9)
CubityFirst Nov 16, 2026
72eed59
feat(files): a selection bar instead of a solid red 'Delete (n)' slab…
CubityFirst Nov 16, 2026
1d8ecd5
feat(files): empty folder and no-results states offer the next step (…
CubityFirst Nov 16, 2026
4413904
feat(files): a real 'File not found' state with a way back (FIL5)
CubityFirst Nov 16, 2026
49c1ff7
feat(files): move dialog labels the current location instead of just …
CubityFirst Nov 16, 2026
26698d0
feat(files): rename names what it renames and selects just the name, …
CubityFirst Nov 16, 2026
5b9fa51
fix(files): long file names stay readable (FIL8)
CubityFirst Nov 16, 2026
6b63f14
fix(files): plain-text and Markdown previews soft-wrap (FIL9)
CubityFirst Nov 16, 2026
6cca770
fix(frontend): doc loading skeleton and a real not-found state (DOC9)
CubityFirst Nov 16, 2026
8fdf514
feat(files): drop zone says where the files will land (FIL10)
CubityFirst Nov 16, 2026
e97bd8c
fix(files): recycle bin shows the purge countdown on phones (FIL11)
CubityFirst Nov 16, 2026
1f65112
fix(frontend): revision diff gets a real compare control and the inte…
CubityFirst Nov 16, 2026
3842192
feat(frontend): add Home and Invites rows to the home sidebar (SHL10)
CubityFirst Nov 16, 2026
010f6b8
fix(frontend): scope create-menu test's Upload check to outside the e…
CubityFirst Nov 16, 2026
b708dfe
Merge branch 'picks/shell' into design-picks
CubityFirst Nov 16, 2026
d43ab2a
Merge branch 'picks/docs' into design-picks
CubityFirst Nov 16, 2026
dd2659f
Merge branch 'picks/settings' into design-picks
CubityFirst Nov 16, 2026
13481aa
Merge branch 'picks/public' into design-picks
CubityFirst Nov 16, 2026
e032634
Merge branch 'picks/files' into design-picks
CubityFirst Nov 16, 2026
ae38805
merge: bring design-picks up to date with main
CubityFirst Nov 16, 2026
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
2 changes: 1 addition & 1 deletion e2e/tests/demo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import { test, expect, type Page } from "@playwright/test";

const BANNER_TEXT = "This is a demo environment, any changes you make here are local, and will not be saved.";
const BANNER_TEXT = "You’re exploring a demo. Changes stay in this tab and are lost when you reload.";

async function enterDemo(page: Page) {
await page.goto("/demo");
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/limited-permissions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ test("owner grants the limited user VIEW access on the doc", async () => {
await expect(dialog).toBeVisible({ timeout: 5000 });

// Sanity: no shares yet - the empty-state copy is visible.
await expect(dialog.getByText("No users have been granted discrete access yet.")).toBeVisible();
await expect(dialog.getByText("Not shared with anyone yet.")).toBeVisible();

// Default permission for an addable limited member is already "View" - just
// click the per-row "Grant access" button.
await dialog.getByTitle("Grant access").click();

// After grant, the user moves into the "Members with access" section. The
// After grant, the user moves into the "Shared with" section. The
// "Revoke access" button only renders for existing shares, so its presence
// is the unambiguous post-grant signal (the user's name is visible in both
// sections).
Expand Down
5 changes: 3 additions & 2 deletions packages/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { TestAudioPage } from "./pages/TestAudioPage";
import { AnimationsTestPage } from "./pages/tests/AnimationsTestPage";
import { HomeVariantsPage } from "./pages/tests/home/HomeVariantsPage";
import { Toaster } from "@/components/ui/sonner";
import { ErrorBoundary } from "@/components/ErrorBoundary";

// `/@<handle>` profile links. React Router 6 can't match a literal `@` prefix
// on a param, so the route is the generic single segment `/:atHandle`: only
Expand Down Expand Up @@ -65,7 +66,7 @@ export function App() {
}
}, [location.pathname]);
return (
<>
<ErrorBoundary resetKey={location.pathname}>
<Routes location={backgroundLocation ?? location}>
<Route path="/" element={<LandingPage />} />
<Route path="/login" element={<LoginPage />} />
Expand Down Expand Up @@ -115,6 +116,6 @@ export function App() {
</Routes>
)}
<Toaster />
</>
</ErrorBoundary>
);
}
21 changes: 4 additions & 17 deletions packages/frontend/src/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
import { useState, useEffect, useCallback, type ReactNode } from "react";
import { Check, Copy } from "lucide-react";
import { getHighlighter, highlighterReady } from "@/lib/shiki";
import { highlightCode, highlighterReady } from "@/lib/shiki";
import { Button } from "@/components/ui/button";
import { DiceRoll } from "@/components/DiceRoll";
import { MermaidDiagram } from "@/components/MermaidDiagram";

const THEME = "vitesse-dark";

function highlight(code: string, lang: string): string | null {
const h = getHighlighter();
if (!h) return null;
try {
return h.codeToHtml(code, { lang, theme: THEME });
} catch {
// Unknown language - fall back to plain text
return h.codeToHtml(code, { lang: "text", theme: THEME });
}
}

interface CodeBlockProps {
lang: string;
code: string;
Expand All @@ -38,15 +25,15 @@ export function CodeBlock({ lang, code, className }: CodeBlockProps) {
return <ShikiCodeBlock lang={lang} code={code} className={className} />;
}

/** Highlighted fenced code block using Shiki (vitesse-dark theme on the card surface). */
/** Highlighted fenced code block using Shiki (vitesse light/dark on the card surface). */
function ShikiCodeBlock({ lang, code, className }: CodeBlockProps) {
const [html, setHtml] = useState<string | null>(() => highlight(code, lang));
const [html, setHtml] = useState<string | null>(() => highlightCode(code, lang));
const [copied, setCopied] = useState(false);

useEffect(() => {
// If highlighter wasn't ready on first render, wait for it then re-render.
if (html !== null) return;
highlighterReady.then(() => setHtml(highlight(code, lang)));
highlighterReady.then(() => setHtml(highlightCode(code, lang)));
}, [code, lang]); // eslint-disable-line react-hooks/exhaustive-deps

const copy = useCallback(() => {
Expand Down
39 changes: 30 additions & 9 deletions packages/frontend/src/components/DiceRoll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ export function DiceRoll({ notation }: DiceRollProps) {
const [open, setOpen] = useState(false);
const touchTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
const blockOpenRef = useRef(false);
// A roll swaps (and re-keys) the chip, which drops keyboard focus on the
// floor - put it back on the new chip so Enter/Space can keep re-rolling.
const rollBtnRef = useRef<HTMLButtonElement>(null);
const refocusRef = useRef(false);
useEffect(() => {
if (!refocusRef.current) return;
refocusRef.current = false;
rollBtnRef.current?.focus({ preventScroll: true });
}, [rollKey]);
const { showInkCritSparkles } = useRendererCtx();

const clearTouchTimer = useCallback(() => {
Expand All @@ -352,6 +361,8 @@ export function DiceRoll({ notation }: DiceRollProps) {
e.preventDefault();
e.stopPropagation();
clearTouchTimer();
// detail 0 = keyboard activation (mouse clicks report the click count).
refocusRef.current = e.detail === 0;
setResult(tryRoll(notation) ?? "invalid");
setRollKey((k) => k + 1);
setOpen(false);
Expand Down Expand Up @@ -385,7 +396,7 @@ export function DiceRoll({ notation }: DiceRollProps) {
if (result === "invalid") {
return (
<span
className="rounded bg-red-900/40 px-1.5 py-0.5 text-[0.875em] text-red-300"
className="rounded bg-destructive/10 px-1.5 py-0.5 text-[0.875em] text-destructive"
style={{ fontFamily: "var(--ui-font)" }}
>
dice: {notation}
Expand All @@ -396,6 +407,7 @@ export function DiceRoll({ notation }: DiceRollProps) {
if (result === null) {
return (
<button
ref={rollBtnRef}
onClick={doRoll}
className="inline-flex max-w-full items-center gap-1.5 overflow-hidden whitespace-nowrap rounded-md border border-input/70 bg-card px-2 py-0.5 text-left align-middle text-[0.875em] font-medium text-foreground shadow-xs hover:bg-accent transition-colors cursor-pointer max-sm:my-1 max-sm:min-h-11 max-sm:px-3 max-sm:py-1.5 max-sm:text-sm max-sm:whitespace-normal"
style={{ fontFamily: "var(--ui-font)" }}
Expand Down Expand Up @@ -423,6 +435,7 @@ export function DiceRoll({ notation }: DiceRollProps) {
const anyCritFail = result.terms.some((t) => t.anyCritFail);
const isCritSuccess = anyCritSuccess || isMaxRoll;
const showInkSparkles = !!showInkCritSparkles && isCritSuccess;
const { formula, label } = splitFormulaLabel(notation);

return (
<HoverCard key={rollKey} open={open} onOpenChange={handleOpenChange} openDelay={200}>
Expand All @@ -433,15 +446,23 @@ export function DiceRoll({ notation }: DiceRollProps) {
onPointerUp={handlePointerUp}
className="inline-flex max-w-full items-center gap-1.5 rounded-md border border-input/70 bg-card px-2 py-0.5 text-left text-[0.875em] text-foreground shadow-xs select-none not-prose hover:bg-accent transition-colors cursor-pointer max-sm:my-1 max-sm:min-h-11 max-sm:px-3 max-sm:py-1.5 max-sm:text-sm max-sm:whitespace-normal"
style={{ fontFamily: "var(--ui-font)" }}
aria-label="Re-roll"
ref={rollBtnRef}
// Name the roll and its result - a bare "Re-roll" hid the outcome
// from screen readers.
aria-label={`${label || prettyFormula(formula)}: rolled ${displayValue}. Re-roll`}
>
<Dices className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
<span className="font-mono text-[0.85em] text-muted-foreground max-sm:text-[0.9em] max-sm:break-words">{prettyFormula(splitFormulaLabel(notation).formula)}</span>
{result.label && (
<span className="text-zinc-400">{result.label}</span>
{/* Same order as the unrolled chip (label · formula), so rolling
only appends the result instead of reshuffling the chip. */}
{label && (
<>
<span className="font-medium">{label}</span>
<span aria-hidden="true" className="text-muted-foreground/60">&middot;</span>
</>
)}
<span className="text-zinc-500">:</span>
<span className={`relative font-semibold ${isMaxRoll || anyCritSuccess ? "text-green-400" : isMinRoll || anyCritFail ? "text-red-400" : "text-zinc-100"}`}>
<span className="font-mono text-[0.85em] text-muted-foreground max-sm:text-[0.9em] max-sm:break-words">{prettyFormula(formula)}</span>
<span className="text-muted-foreground/70">:</span>
<span className={`relative font-semibold ${isMaxRoll || anyCritSuccess ? "text-emerald-600 dark:text-emerald-400" : isMinRoll || anyCritFail ? "text-red-600 dark:text-red-400" : "text-foreground"}`}>
{displayValue}
{showInkSparkles && (
<span className="ink-crit-sparkles" aria-hidden="true">
Expand All @@ -453,9 +474,9 @@ export function DiceRoll({ notation }: DiceRollProps) {
</span>
)}
</span>
{isDiceSuccessCount && <span className="text-zinc-400 font-normal">succ</span>}
{isDiceSuccessCount && <span className="text-muted-foreground font-normal">succ</span>}
{exprST && (
<span className={`font-semibold ${result.successCount === 1 ? "text-green-400" : "text-red-400"}`}>
<span className={`font-semibold ${result.successCount === 1 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400"}`}>
{result.successCount === 1 ? "✓" : "✗"}
</span>
)}
Expand Down
71 changes: 71 additions & 0 deletions packages/frontend/src/components/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { Component, type ErrorInfo, type ReactNode } from "react";
import { AlertTriangle, RotateCw } from "lucide-react";
import { Button } from "@/components/ui/button";

interface ErrorBoundaryProps {
children: ReactNode;
// Clears a caught error when it changes (pass the pathname so navigating
// away from a broken page recovers without a reload).
resetKey?: string;
}

interface ErrorBoundaryState {
error: Error | null;
}

// Catches render/effect errors below it so one broken page shows a calm
// recovery panel instead of unmounting the whole app to a blank screen.
export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
state: ErrorBoundaryState = { error: null };

static getDerivedStateFromError(error: Error): ErrorBoundaryState {
return { error };
}

componentDidCatch(error: Error, info: ErrorInfo) {
console.error("Unhandled UI error", error, info.componentStack);
}

componentDidUpdate(prev: ErrorBoundaryProps) {
if (this.state.error && prev.resetKey !== this.props.resetKey) {
this.setState({ error: null });
}
}

render() {
if (!this.state.error) return this.props.children;
return <ErrorFallback error={this.state.error} />;
}
}

function ErrorFallback({ error }: { error: Error }) {
return (
<div role="alert" className="flex w-full justify-center bg-background px-4 py-[16vh] text-foreground">
<div className="w-full max-w-md">
<AlertTriangle className="h-5 w-5 text-muted-foreground" aria-hidden="true" />
<h1 className="mt-4 text-lg font-semibold">Something went wrong on this page</h1>
<p className="mt-1.5 text-sm text-muted-foreground">
Annex hit an unexpected error while showing it. Reloading usually fixes this; your saved
documents are safe.
</p>
<div className="mt-6 flex flex-wrap gap-2">
<Button onClick={() => window.location.reload()} className="gap-1.5">
<RotateCw className="h-3.5 w-3.5" aria-hidden="true" />
Reload
</Button>
<Button variant="outline" asChild>
<a href="/dashboard">Go to dashboard</a>
</Button>
</div>
{error.message && (
<details className="mt-6 text-xs text-muted-foreground">
<summary className="cursor-pointer select-none hover:text-foreground">Error details</summary>
<pre className="mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words rounded-md border bg-muted/40 p-3 font-mono">
{error.message}
</pre>
</details>
)}
</div>
</div>
);
}
57 changes: 27 additions & 30 deletions packages/frontend/src/components/ExportPdfDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ interface Props {
documentName?: string;
open?: boolean;
onOpenChange?: (open: boolean) => void;
/** The page shows an AI summary block - otherwise its toggle is a dead control and is hidden. */
hasAiSummary?: boolean;
/** The page shows the "Last updated" line - otherwise its toggle is hidden. */
hasLastUpdated?: boolean;
}

export function ExportPdfDialog({ trigger, documentName, open: controlledOpen, onOpenChange }: Props) {
export function ExportPdfDialog({ trigger, documentName, open: controlledOpen, onOpenChange, hasAiSummary = true, hasLastUpdated = true }: Props) {
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
const open = controlledOpen ?? uncontrolledOpen;
const setOpen = (next: boolean) => {
Expand Down Expand Up @@ -51,20 +55,14 @@ export function ExportPdfDialog({ trigger, documentName, open: controlledOpen, o
<DialogHeader>
<DialogTitle>Export as PDF</DialogTitle>
<DialogDescription>
Opens your browser's print dialog. Choose <strong>Save as PDF</strong> as the destination to download a file with selectable text and working links.
Opens your browser's print dialog. Choose <strong>Save as PDF</strong> as the destination for a file with selectable text and working links. Margins and scale are set there too.
</DialogDescription>
</DialogHeader>
<div className="flex flex-col gap-6 py-2">
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-0.5">
<h3 className="pt-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/80">Layout</h3>
<p className="text-xs text-muted-foreground">Paper size and colour theme for the PDF.</p>
</div>
<h3 className="pt-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/80">Layout</h3>
<div className="flex items-center justify-between gap-3">
<div className="flex flex-col gap-1">
<Label htmlFor="pdf-page-size" className="text-sm font-medium">Page size</Label>
<p className="text-xs text-muted-foreground">A4 is the default.</p>
</div>
<Label htmlFor="pdf-page-size" className="text-sm font-medium">Page size</Label>
<Select value={pageSize} onValueChange={v => setPageSize(v as PdfPageSize)}>
<SelectTrigger id="pdf-page-size" className="h-8 w-[90px] text-sm">
<SelectValue />
Expand Down Expand Up @@ -94,36 +92,35 @@ export function ExportPdfDialog({ trigger, documentName, open: controlledOpen, o
</div>
<Separator />
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-0.5">
<h3 className="pt-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/80">Content</h3>
<p className="text-xs text-muted-foreground">Choose which parts of the document appear in the export.</p>
</div>
<h3 className="pt-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/80">Include</h3>
<div className="flex items-center justify-between gap-3">
<div className="flex flex-col gap-1">
<Label htmlFor="pdf-include-title" className="text-sm font-medium cursor-pointer">Document name</Label>
<p className="text-xs text-muted-foreground">The title as a heading at the top of the first page.</p>
</div>
<Switch id="pdf-include-title" checked={includeTitle} onCheckedChange={setIncludeTitle} />
</div>
<div className="flex items-center justify-between gap-3">
<div className="flex flex-col gap-1">
<Label htmlFor="pdf-hide-ai-summary" className="text-sm font-medium cursor-pointer">AI summary</Label>
<p className="text-xs text-muted-foreground">The AI-generated summary block, if the document has one.</p>
{/* Only offer toggles for blocks this page actually shows. */}
{hasAiSummary && (
<div className="flex items-center justify-between gap-3">
<div className="flex flex-col gap-1">
<Label htmlFor="pdf-hide-ai-summary" className="text-sm font-medium cursor-pointer">AI summary</Label>
<p className="text-xs text-muted-foreground">The AI-generated summary block.</p>
</div>
{/* Positive phrasing (on = included); state stays "hide" internally. */}
<Switch id="pdf-hide-ai-summary" checked={!hideAiSummary} onCheckedChange={v => setHideAiSummary(!v)} />
</div>
{/* Positive phrasing (on = included); state stays "hide" internally. */}
<Switch id="pdf-hide-ai-summary" checked={!hideAiSummary} onCheckedChange={v => setHideAiSummary(!v)} />
</div>
<div className="flex items-center justify-between gap-3">
<div className="flex flex-col gap-1">
<Label htmlFor="pdf-hide-last-updated" className="text-sm font-medium cursor-pointer">Last updated &amp; reading time</Label>
<p className="text-xs text-muted-foreground">The &ldquo;Last updated&hellip; · X min read&rdquo; line.</p>
)}
{hasLastUpdated && (
<div className="flex items-center justify-between gap-3">
<div className="flex flex-col gap-1">
<Label htmlFor="pdf-hide-last-updated" className="text-sm font-medium cursor-pointer">Last updated &amp; reading time</Label>
<p className="text-xs text-muted-foreground">The &ldquo;Last updated&hellip; · X min read&rdquo; line.</p>
</div>
<Switch id="pdf-hide-last-updated" checked={!hideLastUpdated} onCheckedChange={v => setHideLastUpdated(!v)} />
</div>
<Switch id="pdf-hide-last-updated" checked={!hideLastUpdated} onCheckedChange={v => setHideLastUpdated(!v)} />
</div>
)}
</div>
<p className="text-xs text-muted-foreground">
Tip: margins, scale and other layout adjustments are available in the browser's print dialog.
</p>
</div>
<DialogFooter>
<Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
Expand Down
Loading
Loading