feat(settings): preview terminal font options#2186
Conversation
janburzinski
commented
May 22, 2026
Greptile SummaryThis PR adds inline font previews to the terminal font picker dropdown by wrapping each option label in a
Confidence Score: 4/5Safe to merge; the change is a one-line UI addition with no impact on how fonts are persisted or applied. The only concern is the duplicated 'Menlo' literal — it appears in both DEFAULT_OPTION.label and the new inline style fallback, so a future rename would need two edits to stay consistent. Everything else about the change is straightforward. src/renderer/features/settings/components/TerminalSettingsCard.tsx — the duplicated default font name literal.
|
| Filename | Overview |
|---|---|
| src/renderer/features/settings/components/TerminalSettingsCard.tsx | Wraps each font dropdown label in a that sets its own fontFamily to preview the font; minor duplication of the hardcoded 'Menlo' default name. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ComboboxCollection renders FontOption] --> B{item.value truthy?}
B -->|yes| C[fontFamily set to quoted item.value]
B -->|no - DEFAULT_OPTION| D[fontFamily set to hardcoded Menlo]
C --> E[span renders label in selected font]
D --> E
Comments Outside Diff (1)
-
src/renderer/features/settings/components/TerminalSettingsCard.tsx, line 49-52 (link)The default font name
'Menlo'is hardcoded here but is already embedded inDEFAULT_OPTION.label('Default (Menlo)'). If the default font changes, this fallback preview will silently show the wrong font. Extracting it to a shared constant keeps both in sync.Prompt To Fix With AI
This is a comment left during a code review. Path: src/renderer/features/settings/components/TerminalSettingsCard.tsx Line: 49-52 Comment: The default font name `'Menlo'` is hardcoded here but is already embedded in `DEFAULT_OPTION.label` (`'Default (Menlo)'`). If the default font changes, this fallback preview will silently show the wrong font. Extracting it to a shared constant keeps both in sync. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
src/renderer/features/settings/components/TerminalSettingsCard.tsx:49-52
The default font name `'Menlo'` is hardcoded here but is already embedded in `DEFAULT_OPTION.label` (`'Default (Menlo)'`). If the default font changes, this fallback preview will silently show the wrong font. Extracting it to a shared constant keeps both in sync.
```suggestion
const DEFAULT_FONT_FAMILY = 'Menlo';
const DEFAULT_OPTION: FontOption = {
value: '',
label: `Default (${DEFAULT_FONT_FAMILY})`,
};
```
### Issue 2 of 2
src/renderer/features/settings/components/TerminalSettingsCard.tsx:206
Once the shared constant exists, the fallback in the inline style should reference it instead of repeating the literal `'Menlo'`.
```suggestion
<span style={{ fontFamily: item.value ? `"${item.value}"` : DEFAULT_FONT_FAMILY }}>
```
Reviews (1): Last reviewed commit: "feat(settings): preview terminal font op..." | Re-trigger Greptile
