Skip to content
Closed
Show file tree
Hide file tree
Changes from 13 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
1 change: 1 addition & 0 deletions apps/desktop/src/clientPersistence.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function makeSecretStorage(available: boolean): DesktopSecretStorage {
}

const clientSettings: ClientSettings = {
chatFontSize: 14,
confirmThreadArchive: true,
confirmThreadDelete: false,
diffWordWrap: true,
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@
(store) => store.setStickyModelSelection,
);
const timestampFormat = settings.timestampFormat;
const chatFontSize = settings.chatFontSize;
const navigate = useNavigate();
const rawSearch = useSearch({
strict: false,
Expand Down Expand Up @@ -1556,7 +1557,7 @@
);

const focusComposer = useCallback(() => {
composerRef.current?.focusAtEnd();

Check warning on line 1560 in apps/web/src/components/ChatView.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'composerRef.current'
}, []);
const scheduleComposerFocus = useCallback(() => {
window.requestAnimationFrame(() => {
Expand All @@ -1564,7 +1565,7 @@
});
}, [focusComposer]);
const addTerminalContextToDraft = useCallback((selection: TerminalContextSelection) => {
composerRef.current?.addTerminalContext(selection);

Check warning on line 1568 in apps/web/src/components/ChatView.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'composerRef.current'
}, []);
const setTerminalOpen = useCallback(
(open: boolean) => {
Expand Down Expand Up @@ -2758,7 +2759,7 @@
};
});
promptRef.current = "";
composerRef.current?.resetCursorState({ cursor: 0 });

Check warning on line 2762 in apps/web/src/components/ChatView.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'composerRef.current'
},
[activePendingProgress?.activeQuestion, activePendingUserInput],
);
Expand All @@ -2785,7 +2786,7 @@
),
},
}));
const snapshot = composerRef.current?.readSnapshot();

Check warning on line 2789 in apps/web/src/components/ChatView.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'composerRef.current'
if (
snapshot?.value !== value ||
snapshot.cursor !== nextCursor ||
Expand Down Expand Up @@ -2848,7 +2849,7 @@
return;
}

const sendCtx = composerRef.current?.getSendContext();

Check warning on line 2852 in apps/web/src/components/ChatView.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'composerRef.current'
if (!sendCtx) {
return;
}
Expand Down Expand Up @@ -2983,7 +2984,7 @@
return;
}

const sendCtx = composerRef.current?.getSendContext();

Check warning on line 2987 in apps/web/src/components/ChatView.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'composerRef.current'
if (!sendCtx) {
return;
}
Expand Down Expand Up @@ -3280,6 +3281,7 @@
markdownCwd={gitCwd ?? undefined}
resolvedTheme={resolvedTheme}
timestampFormat={timestampFormat}
chatFontSize={chatFontSize}
workspaceRoot={activeWorkspaceRoot}
onIsAtEndChange={onIsAtEndChange}
/>
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/chat/MessagesTimeline.browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function buildProps() {
markdownCwd: undefined,
resolvedTheme: "dark" as const,
timestampFormat: "24-hour" as const,
chatFontSize: 14,
workspaceRoot: undefined,
onIsAtEndChange: vi.fn(),
};
Expand Down
27 changes: 27 additions & 0 deletions apps/web/src/components/chat/MessagesTimeline.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function buildProps() {
markdownCwd: undefined,
resolvedTheme: "light" as const,
timestampFormat: "locale" as const,
chatFontSize: 14,
workspaceRoot: undefined,
onIsAtEndChange: () => {},
};
Expand Down Expand Up @@ -160,6 +161,32 @@ describe("MessagesTimeline", () => {
expect(markup).toContain("Work log");
});

it("propagates chatFontSize as the --chat-font-size CSS variable on the list wrapper", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const markup = renderToStaticMarkup(
<MessagesTimeline
{...buildProps()}
chatFontSize={20}
timelineEntries={[
{
id: "entry-1",
kind: "message",
createdAt: "2026-03-17T19:12:28.000Z",
message: {
id: MessageId.make("message-1"),
role: "user",
text: "hi",
createdAt: "2026-03-17T19:12:28.000Z",
streaming: false,
},
},
]}
/>,
);

expect(markup).toContain("--chat-font-size:20px");
});

it("formats changed file paths from the workspace root", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const markup = renderToStaticMarkup(
Expand Down
Loading
Loading