Skip to content

feat(web): chat text size separate from interface size - #16001

Closed
ni-co wants to merge 4 commits into
pingdotgg:mainfrom
ni-co:feat/chat-text-size
Closed

ni-co wants to merge 4 commits into
pingdotgg:mainfrom
ni-co:feat/chat-text-size

Conversation

@ni-co

@ni-co ni-co commented Oct 5, 2026 •

Copy link
Copy Markdown

Problem

Conversation text (assistant replies and sent messages) is fixed at text-sm, i.e. 87.5% of the Interface font size. The only way to read the conversation at a larger size is to raise the interface size or zoom the window, which also enlarges the sidebar, menus and every control.

The mismatch also shows up between the conversation and the prompt box: with Interface font and Prompt font both set to 16 px, replies render at 14 px while the prompt box renders at 16 px, so "the same size" looks different.

Change

A Chat text size under Settings → Appearance → Typography (simple and Advanced views):

  • fontSizeChat is a new client setting (ChatFontSize, 12–20 px, nullable). Null ("Auto", the default) keeps today's behavior: the conversation follows the interface size.
  • When set, it is applied as --font-size-chat. Assistant replies and user messages in MessagesTimeline and proposed plan cards size from it. Headings, inline code, tables and footnotes in .chat-markdown are now written as calc(var(--chat-text-size, 0.875rem) * <rem> / 0.875), so they keep their proportion to the chosen size. Without the variable (PR markdown, file previews, everything outside the conversation) the expression yields the previous rem values.
  • In simple typography the prompt box follows a chosen Chat text size, in line with how simple mode already cascades the interface family to the prompt and the code size to the terminal. While Chat text is Auto, the prompt keeps its own size, so existing settings render unchanged. Advanced always uses the independent Prompt font size (resolvePromptFontSizePreference, mirroring resolveTerminalFontSizePreference).
  • The size picker is extracted into FontSizeSelect with an optional "Auto" entry. "Chat text" is added to settings search, to the changed-typography labels and to the appearance restore-defaults list.

Desktop persists client settings through the shared ClientSettingsSchema, so it picks up the field without changes. Mobile has no typography settings.

Scope and approval

This is a focused configuration option for an established capability: the Typography section already offers per-surface sizes (Interface, Prompt, Code, Terminal). This adds the missing size for the conversation itself. Defaults are unchanged: with Chat text on Auto, every surface renders exactly as before at any interface size (replies 0.875 rem with the same line height, the prompt box at its own Prompt font size), and nothing outside the conversation changes. Only users who pick a Chat text size see a difference. No new workflow.

Verification

  • vp test run apps/web/src/appearanceFonts.test.ts apps/web/src/components/settings/SettingsPanels.logic.test.ts: 37 passed. New cases cover the prompt size resolution in simple and Advanced mode (including Auto keeping the prompt's own size), the chat variable being removed when unset and written when set, chat size clamping, and the changed-typography label.
  • vp run --filter @t3tools/contracts typecheck, vp run --filter @t3tools/web typecheck, vp lint and vp fmt --check on the changed files: clean (lint warning count unchanged from main).
  • Manual check in a web dev build (vp run dev --share, Chrome on macOS), with a real reply containing headings, inline code, a table and a list:
    • Defaults (Interface 16 px, Chat text Auto): replies and prompt box 14 px, same as main.
    • Interface 13 px, Chat text 17 px: replies, user messages and prompt box 17 px with line height 27.6 px (1.625, as on main); inline code and tables 14.6 px; headings 19.4 / 21.9 px; the root font size (and with it the rest of the UI) stays at 13 px.
    • Switching Chat text back to Auto removes the overrides.

Before (main, Interface 13 px): the conversation shrinks with the interface (replies 11.4 px, inline code 9.75 px).

Before: conversation at 11.4 px with Interface 13 px

After (Interface 13 px, Chat text 17 px): the conversation and prompt box read at 17 px; the surrounding UI stays at 13 px.

After: conversation at 17 px with Interface 13 px

Not checked: the Electron desktop build and Windows/Linux rendering. The change is web-layer CSS and client settings shared by desktop.

Written by Claude Opus 5.5 in Claude Code, run from T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 5, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a cross-cutting, user-facing chat typography setting and changes prompt inheritance in simple mode for existing non-default interface-size configurations. Its nullable default preserves most current rendering, but the new default behavior and broader runtime surface warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 29523601-6459-477d-8785-d0312ed66d58
📥 Commits

Reviewing files that changed from the base of the PR and between f04654b and 4f0671b.

📒 Files selected for processing (6)
  • apps/web/src/appearanceFonts.test.ts
  • apps/web/src/appearanceFonts.ts
  • apps/web/src/components/ChatMarkdown.tsx
  • apps/web/src/components/chat/ProposedPlanCard.tsx
  • apps/web/src/components/settings/SettingsPanels.tsx
  • apps/web/src/index.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/components/settings/SettingsPanels.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

This change adds a nullable chat text size preference, applies it to conversation Markdown, and adds chat text controls and previews to typography settings. In simple mode, prompt sizing follows chat sizing; advanced mode keeps the prompt size independent.

Changes

Chat Text Typography

Layer / File(s) Summary
Font-size contract and resolution
packages/contracts/src/settings.ts, apps/web/src/appearanceFonts.ts, apps/web/src/appearanceFonts.test.ts
Adds a nullable chat font-size setting with bounds of 12–20. Font helpers resolve prompt sizing by typography mode, remove unset CSS overrides, and clamp chat font sizes. Tests cover resolution, CSS variables, and clamping.
Apply chat sizing to Markdown
apps/web/src/routes/__root.tsx, apps/web/src/components/ChatMarkdown.tsx, apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/ProposedPlanCard.tsx, apps/web/src/index.css
FontAppearanceSync reads the chat size and advanced typography preference and applies font variables. Conversation and proposed-plan Markdown use a shared chat text-size class, and related Markdown elements scale with that size.
Configure chat text in typography settings
apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/components/settings/SettingsFontPreviews.tsx, apps/web/src/components/settings/SettingsPanels.logic.ts, apps/web/src/components/settings/SettingsPanels.logic.test.ts, apps/web/src/components/settings/settingsSearch.ts
Adds chat text previews and size controls, including an Auto option. Adds chat size to default restoration and changed-setting labels, and adds “Chat text” to settings search.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 4f067

No identified issue blocks merging this chat text sizing change after normal checks.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 4f067

The change remains confined to client-owned typography settings and presentation. Automatic sizing preserves existing behavior, explicit sizes are bounded, and the inspected changes do not expand content-processing permissions or workspace-write authority.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed preference affects client presentation of conversations, plan text, and the prompt. The inspected flow does not give message authors control over the preference, environment identity, or workspace-write arguments.

Trust Boundaries and Controls

  • observed — The full PR comparison shows that the Markdown change adds a fixed presentation class without changing the sanitization pipeline, URL transformation, or content-processing options. Plan-card changes pass that class to existing renderers without changing save callbacks or environment and workspace arguments.

Resilience and Maintainability Implications

  • observed — Client writes use the existing serialized persistence queue. Failed writes can leave optimistic in-memory settings changed until reload; comparison with the PR base establishes that this recovery behavior predates the new typography preference.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 12 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: a separate chat text size setting.
Description check ✅ Passed The description includes all required sections. It explains the problem, change, scope and approval rationale, focused verification results, screenshots, and checks that were not run. It also identifi…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 34.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 12 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

ni-co added 4 commits October 8, 2026 08:48
Conversation text was fixed at text-sm, so the only way to read replies
at a larger size was to scale the whole interface. Add a Chat text size
under Settings > Appearance > Typography. Auto (the default) keeps
today's behavior and follows the interface size. In simple typography
the prompt box follows the chat text size; Advanced keeps its own
Prompt font size.
They were sized in rem, so with a small interface and large chat text,
inline code shrank next to body text and headings could fall below it.
They now derive from --chat-text-size and keep their proportion; outside
the conversation the fallback yields the original rem sizes.
In simple typography the prompt followed the chat size even when it was
unset, so a non-default interface size changed the prompt box for users
who never touched Chat text. It now follows only a chosen chat size.
tailwind-merge dropped the markdown root's leading-relaxed once the chat
size class was appended, so replies lost their line height even on Auto.
Restate it in the class. Proposed plan cards now use the chat text size
too, the simple-mode row says the prompt box follows a chosen size, and
the chat clamp gets its own fallback constant.
@ni-co
ni-co force-pushed the feat/chat-text-size branch from 4f0671b to 4e38825 Compare October 8, 2026 06:50
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 11, 2026 — with ChatGPT Codex Connector
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Thanks for proposing independent conversation text sizing. The diff adds a Chat text preference, scales conversation markdown, and makes the simple-mode prompt follow the selected chat size. Right now we are only taking focused bug fixes from outside contributors under Read this first, even though the guide allows focused configuration options to be considered. Please discuss the reading-size need and proposed scope in an Ideas discussion before requesting reconsideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants