Repository navigation
Conversation
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 detectedLatest commit: 743eb28 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
PR overviewThe 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" /> |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ 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); |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 743eb28. Configure here.
| </div>, | ||
| themePortalRoot(rootRef.current), | ||
| ) | ||
| : null; |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 743eb28. Configure here.


Summary
Test plan
pnpm --filter @truefoundry/trueforge-ui exec vitest run test/containers/SettingsBuilder/AppearanceSettings.test.tsx test/theme/ensureStyles.test.ts test/theme/ThemeProvider.test.tsxMade with Cursor
Note
Low Risk
User-facing appearance and font loading only; no auth, API, or data-path changes. Host
theme.tokens.fontFamilystill overrides user picks.Reviewed by Cursor Bugbot for commit 743eb28. Bugbot is set up for automated code reviews on this repo. Configure here.