Skip to content

Add Settings Appearance typeface picker - #1405

Open
bharat-tf wants to merge 1 commit into
mainfrom
design/settings-appearance-typeface
Open

bharat-tf wants to merge 1 commit into
mainfrom
design/settings-appearance-typeface

Conversation

@bharat-tf

@bharat-tf bharat-tf commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • New Settings → Appearance section with a Visual style typeface row and pill dropdown
  • Alphabetized faces (Geist marked as Default), persistence, and reset-to-default
  • App default typeface switched to Geist (styles, preset, host font load)

Test plan

  • Open Settings → Appearance; dropdown lists faces alphabetically with Geist (Default)
  • Selecting a face updates UI chrome; reset restores Geist and clears stored preference
  • Dark + light dropdown styling; each option renders in its own typeface
  • pnpm --filter @truefoundry/trueforge-ui exec vitest run test/containers/SettingsBuilder/AppearanceSettings.test.tsx test/theme/ensureStyles.test.ts test/theme/ThemeProvider.test.tsx

Made with Cursor


Note

Low Risk
User-facing appearance and font loading only; no auth, API, or data-path changes. Host theme.tokens.fontFamily still overrides user picks.

Reviewed by Cursor Bugbot for commit 743eb28. Bugbot is set up for automated code reviews on this repo. Configure here.

Let users pick and reset the app typeface from Settings, with each face labeled in its own font and Geist marked as the default.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 743eb28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@veria-ai

veria-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

PR overview

The PR adds a typeface picker to Settings Appearance, with third-party font stylesheets supporting Geist font loading.

One hardening issue remains open: the CDN-hosted font stylesheets lack integrity verification. This leaves their content unchecked if the CDN is compromised, but exploitation depends on tampering outside this PR.

Open issues (1)

Fixed/addressed: 0 · PR risk: 3/10

Reviews

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TrueForge</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/style.css" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low: Add integrity verification for the CDN stylesheet

The new third-party stylesheet has no integrity attribute, leaving no expected-content check against CDN-side tampering. As hardening, self-host the font assets or add a verified SRI hash with crossorigin="anonymous", covering the Geist links created by theme/ensureStyles.ts and theme/ensureTypeface.ts as well. (developer.mozilla.org)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 743eb28. Configure here.

triggerRef.current?.focus();
};
document.addEventListener('mousedown', handlePointerDown);
document.addEventListener('keydown', handleKeyDown);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escape closes Settings, not typeface menu

Medium Severity

The typeface menu’s Escape handler never runs. Settings listens on window in the capture phase and calls stopImmediatePropagation() before the menu’s bubble-phase document listener, so Escape closes the whole Settings page instead of dismissing the open dropdown.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 743eb28. Configure here.

</div>,
themePortalRoot(rootRef.current),
)
: null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typeface listbox is not keyboard operable

Medium Severity

The typeface control uses role="listbox" / role="option" but never moves focus into the menu or handles Arrow/Home/End. Tab order stays on the trigger, so a keyboard user can open the dropdown and cannot highlight or choose a face.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 743eb28. Configure here.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant