diff --git a/apps/www/DESIGN.md b/apps/www/DESIGN.md
index 8282d8d03..fadd0a868 100644
--- a/apps/www/DESIGN.md
+++ b/apps/www/DESIGN.md
@@ -118,6 +118,6 @@ Everything above describes the tech mode. Pages under `/hobby` (films, series, a
- **The sentence is the navigation.** The page opens with one sentence whose nouns (films, series, anime, games) are links that narrow the list to that kind, and widen it again when current.
- **A work opens as a sheet.** Choosing a line opens the work over the list in a sheet that covers the screen but for a margin. Its key art fills the whole sheet and stays put while the content scrolls; over it lies the page colour as a wash that is thin at the top and never opaque, thickened only on the side the text stands on, so the art reads through all of it. On that sit the cover, the title at display size, a short comment, then the facts as labelled values (status, a rating out of ten drawn as five stars, dates; for a game, hours played, achievements with a thin meter, last played). A work with a cover but no key art uses the cover, blurred, for its colours. The sheet has its own URL; opened directly, the same content is a page whose art fills the viewport behind the wordmark. The cover is capped by the height of its surface, so the work reads without scrolling in a short window.
- **The cover is a lit card.** It tilts towards the pointer under studio light: a band of light sweeps across as it turns, a glare follows the pointer and the bevelled edge catches both. It sweeps once when the sheet opens, draws only while something moves, and holds still under reduced motion.
-- **Chrome stays out of the way.** The wordmark is plain text at the top, beside the portrait that switches mode; the chat launcher and command menu float in the bottom-left corner; theme, language and settings close the page as one row.
-- **Where the shader cannot run** (no WebGPU), the key art itself stands in behind the page at low opacity, and the colour still follows the work. With reduced motion the field holds still.
+- **Chrome stays out of the way.** The wordmark is plain text at the top, beside the portrait that switches mode; the command menu floats in the bottom-left corner; theme, language and settings close the page as one row.
+- **Where the shader cannot run** (no WebGPU), the key art itself stands in behind the page at low opacity, and the colour still follows the work. With reduced motion the field holds still, and so do the field and the card when the reader reduces effects in settings, which is the default on touch devices.
- **Reader palette does not apply.** The palette settings recolour the tech mode only.
diff --git a/apps/www/__tests__/hooks/use-reduced-effects.test.ts b/apps/www/__tests__/hooks/use-reduced-effects.test.ts
new file mode 100644
index 000000000..138dc1fd4
--- /dev/null
+++ b/apps/www/__tests__/hooks/use-reduced-effects.test.ts
@@ -0,0 +1,47 @@
+import { renderHook } from "@testing-library/react";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+
+import { useReducedEffects } from "@/hooks/use-reduced-effects";
+import { useSettingsStore } from "@/stores/settings/store";
+
+const stubHover = (canHover: boolean) => {
+ vi.stubGlobal("matchMedia", (query: string) => ({
+ matches: canHover,
+ media: query,
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ }));
+};
+
+describe("useReducedEffects", () => {
+ beforeEach(() => {
+ useSettingsStore.setState({ reducedEffects: null });
+ });
+
+ afterEach(() => {
+ vi.unstubAllGlobals();
+ });
+
+ it("is off by default where the pointer hovers", () => {
+ stubHover(true);
+ expect(renderHook(() => useReducedEffects()).result.current).toBe(false);
+ });
+
+ it("is on by default on a touch device", () => {
+ stubHover(false);
+ expect(renderHook(() => useReducedEffects()).result.current).toBe(true);
+ });
+
+ it.each([
+ [true, true],
+ [false, false],
+ ])("the reader's choice of %s wins on either device", (choice, expected) => {
+ useSettingsStore.getState().setReducedEffects(choice);
+ for (const canHover of [true, false]) {
+ stubHover(canHover);
+ expect(renderHook(() => useReducedEffects()).result.current).toBe(
+ expected
+ );
+ }
+ });
+});
diff --git a/apps/www/src/components/agent/chat-dock.tsx b/apps/www/src/components/agent/chat-dock.tsx
index 8de2d8983..ae73d5e93 100644
--- a/apps/www/src/components/agent/chat-dock.tsx
+++ b/apps/www/src/components/agent/chat-dock.tsx
@@ -12,6 +12,8 @@ import { DockActions, DockMode, DockShell } from "@chia/ui/dock";
import { cn } from "@chia/ui/utils/cn.util";
import { CHBot } from "@/components/commons/ch-bot";
+import { usePathname } from "@/libs/i18n/navigation";
+import { SiteMode, siteModeOf } from "@/shared/site-mode";
import { useChatDockStore } from "@/stores/chat-dock/store";
import { useSettingsStore } from "@/stores/settings/store";
@@ -37,6 +39,10 @@ const DEFAULT_WIDTH = 384;
export const ChatDock = () => {
const t = useTranslations("chbot");
const aiEnabled = useSettingsStore((state) => state.aiEnabled);
+ const pathname = usePathname();
+ // The agent is not offered in the hobby mode: no launcher there, and a dock left open in the
+ // tech mode steps aside until the reader is back.
+ const isOffered = aiEnabled && siteModeOf(pathname) !== SiteMode.Hobby;
const mode = useChatDockStore((state) => state.mode);
const setMode = useChatDockStore((state) => state.setMode);
const toggle = useChatDockStore((state) => state.toggle);
@@ -48,9 +54,9 @@ export const ChatDock = () => {
void useChatDockStore.persist.rehydrate();
}, []);
- useHotkey("Mod+I", toggle, { enabled: aiEnabled });
+ useHotkey("Mod+I", toggle, { enabled: isOffered });
- if (!aiEnabled) {
+ if (!isOffered) {
return null;
}
diff --git a/apps/www/src/components/commons/footer.tsx b/apps/www/src/components/commons/footer.tsx
index 0f31aae32..f0d9c5bb3 100644
--- a/apps/www/src/components/commons/footer.tsx
+++ b/apps/www/src/components/commons/footer.tsx
@@ -117,7 +117,7 @@ const Footer: FC<{ locale?: Locale }> = ({ locale: _locale }) => {
}}
/>
-
+
diff --git a/apps/www/src/components/commons/settings.tsx b/apps/www/src/components/commons/settings.tsx
index 62c76955c..3f36498f2 100644
--- a/apps/www/src/components/commons/settings.tsx
+++ b/apps/www/src/components/commons/settings.tsx
@@ -1,25 +1,90 @@
"use client";
import { startTransition } from "react";
+import type { ReactNode } from "react";
import { Button, Description, Label, Modal, Switch } from "@heroui/react";
import { useTranslations } from "next-intl";
import { PaletteSettings } from "@/components/commons/palette-settings";
+import { useReducedEffects } from "@/hooks/use-reduced-effects";
+import { SiteMode } from "@/shared/site-mode";
import { useSettingsStore } from "@/stores/settings/store";
-/** `palette` is off in a mode that brings its own colours, where the reader palette does not apply. */
-export const Settings = ({ palette = true }: { palette?: boolean }) => {
+const Toggle = ({
+ label,
+ description,
+ isSelected,
+ onChange,
+}: {
+ label: string;
+ description: ReactNode;
+ isSelected: boolean;
+ onChange: (isSelected: boolean) => void;
+}) => (
+ startTransition(() => onChange(next))}
+ aria-label={label}>
+
+
+
+
+