Skip to content

fix: use getTerminalFontFamily for dev server logs terminal font#574

Merged
webdevcody merged 1 commit intoAutoMaker-Org:v0.13.0rcfrom
stefandevo:fix/v0.13.0rc
Jan 18, 2026
Merged

fix: use getTerminalFontFamily for dev server logs terminal font#574
webdevcody merged 1 commit intoAutoMaker-Org:v0.13.0rcfrom
stefandevo:fix/v0.13.0rc

Conversation

@stefandevo
Copy link
Copy Markdown
Collaborator

@stefandevo stefandevo commented Jan 18, 2026

Summary

  • Fixed font rendering issue in the dev server logs panel
  • XtermLogViewer was passing DEFAULT_TERMINAL_FONT ('default') directly to xterm.js, which is a sentinel value for the dropdown selector, not a valid CSS font family
  • Now uses getTerminalFontFamily() to convert the sentinel to the actual font stack: "Menlo, Monaco, 'Courier New', monospace"

Test plan

  • Open a project with a dev server running
  • Open the dev server logs panel
  • Verify the terminal text displays with the correct monospace font (Menlo/Monaco)

Summary by CodeRabbit

  • Refactor

    • Terminal font initialization improved for greater configurability.
  • New Features

    • Terminal now uses the configured font and updates the display automatically when the font setting changes.
  • Chores

    • Project switcher test identifiers standardized for more consistent testing.

✏️ Tip: You can customize this high-level summary in your review settings.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @stefandevo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a font rendering bug within the dev server logs panel. Previously, the XtermLogViewer component was misinterpreting a configuration value intended for a dropdown as a direct CSS font family, leading to incorrect font display. The fix involves introducing a utility function to correctly convert this configuration value into a valid CSS font stack, thereby ensuring that terminal logs are rendered with the appropriate monospace font.

Highlights

  • Font Rendering Fix: Corrected an issue where the dev server logs panel displayed an incorrect font.
  • Incorrect Font Usage: The XtermLogViewer component was passing DEFAULT_TERMINAL_FONT ('default'), a sentinel value, directly to xterm.js as a font family, which is not a valid CSS font.
  • Resolution: Implemented getTerminalFontFamily() to translate the sentinel value into a proper CSS font stack (e.g., "Menlo, Monaco, 'Courier New', monospace"), ensuring correct monospace font display.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 18, 2026

Warning

Rate limit exceeded

@stefandevo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1516761 and 8ab9dc5.

📒 Files selected for processing (2)
  • apps/ui/src/components/ui/xterm-log-viewer.tsx
  • apps/ui/src/components/views/board-view/worktree-panel/components/dev-server-logs-panel.tsx

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

The xterm log viewer now sources its terminal font family from the app store via getTerminalFontFamily and applies runtime updates to xterm when that value changes. A project switcher item's test ID generation was changed to use a sanitized project name instead of the project ID.

Changes

Cohort / File(s) Summary
Terminal font wiring & runtime update
apps/ui/src/components/ui/xterm-log-viewer.tsx
Replaced DEFAULT_TERMINAL_FONT with getTerminalFontFamily(...); initialize terminal fontFamily from getTerminalFontFamily(useAppStore.getState().terminalState.fontFamily); add effect to update xterm's fontFamily and call fit() when terminalFontFamily changes.
Project switcher test ID change
apps/ui/src/components/layout/project-switcher/components/project-switcher-item.tsx
Generate data-testid from a sanitized, lowercased project name with spaces replaced by hyphens (project-switcher-project-{sanitizedName}) instead of using project.id.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibble fonts from state and stitch them fine,
Swapping hardcoded crumbs for a threadline.
Buttons renamed by name, not by id,
Hopping through changes with a joyful skid.
Terminal snug, the meadow hums — I did. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly describes the main change: using getTerminalFontFamily for the dev server logs terminal font, which aligns with the primary fix addressing font rendering issues in XtermLogViewer.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a font rendering issue in the dev server logs panel by using getTerminalFontFamily to resolve the correct font stack for xterm.js. The change is effective in solving the described problem. I've included one suggestion to further enhance this by respecting the user's configured terminal font from the application store, which would improve consistency across the UI. Overall, a solid fix.

Comment thread apps/ui/src/components/ui/xterm-log-viewer.tsx Outdated
@stefandevo
Copy link
Copy Markdown
Collaborator Author

Updated to address the review feedback - now reads the user's font preference from terminalState.fontFamily instead of always using the default. Also added a useEffect to update the font dynamically when settings change.

Changes:

  • Removed DEFAULT_TERMINAL_FONT import (no longer needed)
  • Added terminalFontFamily from store: useAppStore((state) => state.terminalState.fontFamily)
  • Initialization uses getTerminalFontFamily(useAppStore.getState().terminalState.fontFamily)
  • Added useEffect to update font when terminalFontFamily changes

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@apps/ui/src/components/layout/project-switcher/components/project-switcher-item.tsx`:
- Around line 40-42: The data-testid generation using sanitizedName
(project.name.toLowerCase().replace(/\s+/g, '-')) can produce collisions and
leaves special characters; update the test-id logic in ProjectSwitcherItem
(where sanitizedName is created and used for data-testid) to combine the stable
unique project.id with a human-readable sanitized name (e.g.,
`${project.id}-${sanitizedName}`) and expand the sanitization to remove or
replace non-alphanumeric characters so the resulting test id is deterministic,
unique, and safe for selectors.

XtermLogViewer was passing DEFAULT_TERMINAL_FONT directly to xterm.js,
but this value is 'default' - a sentinel string for the dropdown selector,
not a valid CSS font family. Also the font size was hardcoded to 13px.

Now reads the user's font preference from terminalState:
- fontFamily: Uses getTerminalFontFamily() to convert to CSS font stack
- defaultFontSize: Uses store value when fontSize prop not provided

Also adds useEffects to update font settings dynamically when they change.

This ensures dev server logs respect Settings > Terminal settings.
@webdevcody webdevcody merged commit af95dae into AutoMaker-Org:v0.13.0rc Jan 18, 2026
6 checks passed
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.

2 participants