fix: use getTerminalFontFamily for dev server logs terminal font#574
Conversation
Summary of ChangesHello @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 Highlights
🧠 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 AssistThe 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
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 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
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (2)
Note Other AI code review bot(s) detectedCodeRabbit 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. 📝 WalkthroughWalkthroughThe xterm log viewer now sources its terminal font family from the app store via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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.
6e675ff to
40aca0a
Compare
|
Updated to address the review feedback - now reads the user's font preference from Changes:
|
There was a problem hiding this comment.
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.
1516761 to
52e0aa7
Compare
917d69b to
6fbf148
Compare
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.
6fbf148 to
8ab9dc5
Compare
Summary
XtermLogViewerwas passingDEFAULT_TERMINAL_FONT('default') directly to xterm.js, which is a sentinel value for the dropdown selector, not a valid CSS font familygetTerminalFontFamily()to convert the sentinel to the actual font stack:"Menlo, Monaco, 'Courier New', monospace"Test plan
Summary by CodeRabbit
Refactor
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.