Skip to content

Comments

feat(ui): add chat font size multiplier setting#10489

Draft
roomote[bot] wants to merge 4 commits intomainfrom
feature/chat-font-size-multiplier
Draft

feat(ui): add chat font size multiplier setting#10489
roomote[bot] wants to merge 4 commits intomainfrom
feature/chat-font-size-multiplier

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 6, 2026

Related GitHub Issue

Closes: #8100

Roo Code Task Context (Optional)

This PR was implemented by @roomote per the request in issue #8100 based on feedback from Bruno in PR #8457.

Description

This PR attempts to address Issue #8100 by implementing a chat font size multiplier feature. Feedback and guidance are welcome.

Key implementation details:

  • Scoped to ChatView only: Per Bruno's feedback, the font size multiplier only affects the ChatView component, not settings, onboarding, or auto-approve dropdown areas
  • UI Settings control: Added a text input with number type (min 0.5, max 2, step 0.1) in the UI Settings section with a reset button
  • Commands: Added three commands for keyboard control:
    • roo-cline.increaseChatFontSize - increases by 0.1 (capped at 2)
    • roo-cline.decreaseChatFontSize - decreases by 0.1 (capped at 0.5)
    • roo-cline.resetChatFontSize - resets to default value of 1
  • Persistence: The setting is stored in global settings and persists across sessions

Test Procedure

  1. Manual testing:

    • Open Roo Code extension
    • Go to Settings > UI section
    • Verify "Chat Font Size Multiplier" input is visible with default value of 1
    • Change the value (e.g., 1.5) and verify text in the chat view scales accordingly
    • Click reset button and verify the value returns to 1
    • Verify settings, onboarding, and auto-approve areas remain unaffected
  2. Command testing:

    • Use command palette to run "Roo: Increase Chat Font Size"
    • Verify the chat font size increases by 0.1
    • Use command palette to run "Roo: Decrease Chat Font Size"
    • Verify the chat font size decreases by 0.1
    • Use command palette to run "Roo: Reset Chat Font Size"
    • Verify the chat font size resets to 1
  3. Automated tests:

    • cd webview-ui && npx vitest run src/components/settings/__tests__/UISettings.spec.tsx
    • All tests pass

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A - UI changes are minimal (number input and reset button in settings)

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates may be required to document the new commands and setting.

Additional Notes

This implementation follows Bruno's specific feedback from PR #8457:

  1. Font size scaling is scoped to only the ChatView (not settings, onboarding, etc.)
  2. Added UI control with text input for multiplier value (0.5-2) plus reset button
  3. Added reset command alongside increase/decrease commands

Get in Touch

@roomote (automated assistant)

Interactively review PR in Roo Code Cloud

@roomote
Copy link
Contributor Author

roomote bot commented Jan 6, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. Found 1 issue (the previous floating point issue has been fixed):

  • Floating point precision in font size increment/decrement commands could display values like "1.2000000000000002" (fixed)
  • chatFontSizeMultiplier is missing from the handleSubmit save payload in SettingsView.tsx, so changes made through the Settings UI are not persisted

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines 205 to 206
const currentMultiplier = visibleProvider.contextProxy.getValue("chatFontSizeMultiplier") ?? 1
const newMultiplier = Math.min(2, currentMultiplier + 0.1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Floating point precision issue: using currentMultiplier + 0.1 can produce values like 1.2000000000000002 after repeated increments, which will display in the UI input field. Consider rounding to one decimal place:

Suggested change
const currentMultiplier = visibleProvider.contextProxy.getValue("chatFontSizeMultiplier") ?? 1
const newMultiplier = Math.min(2, currentMultiplier + 0.1)
const currentMultiplier = visibleProvider.contextProxy.getValue("chatFontSizeMultiplier") ?? 1
const newMultiplier = Math.min(2, Math.round((currentMultiplier + 0.1) * 10) / 10)

The same applies to decreaseChatFontSize below.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 6, 2026
@hannesrudolph
Copy link
Collaborator

Closing because the linked issue is being closed.

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 27, 2026
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 27, 2026
@semidark-kiki
Copy link

semidark-kiki commented Feb 14, 2026

Hi @hannesrudolph / @roomote – the PR was closed but not merged. Could you please elaborate on why?. I could not find any PR or Merge that actually enabled Font Size adjustment for roo anywhere. Thanks

@roomote
Copy link
Contributor Author

roomote bot commented Feb 14, 2026

Fixaroo Clock   See task

Fixed floating point precision in font size increment/decrement commands by rounding to 1 decimal place. All local checks passed.

View commit | Revert commit

@hannesrudolph hannesrudolph reopened this Feb 20, 2026
@github-project-automation github-project-automation bot moved this from Done to New in Roo Code Roadmap Feb 20, 2026
- Add chatFontSizeMultiplier to global settings with min 0.5 max 2 bounds
- Add commands: increaseChatFontSize, decreaseChatFontSize, resetChatFontSize
- Add UI Settings control with number input and reset button
- Apply font size multiplier only to ChatView container (scoped per Bruno feedback)
- Add English translations for the new setting
- Update UISettings tests

Addresses issue #8100 per feedback from Bruno in PR #8457
@roomote roomote bot force-pushed the feature/chat-font-size-multiplier branch from 1df005a to 007629a Compare February 20, 2026 15:41
openRouterImageGenerationSelectedModel,
reasoningBlockCollapsed,
enterBehavior,
chatFontSizeMultiplier,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

chatFontSizeMultiplier is destructured from cachedState here but is never included in the updatedSettings payload inside handleSubmit (around line 416, next to enterBehavior). The commands persist correctly via contextProxy.setValue(), but changes made through the Settings UI will be lost on reload because handleSubmit never sends this field to the extension host. Add chatFontSizeMultiplier: chatFontSizeMultiplier ?? 1, to the updatedSettings object in handleSubmit.

Fix it with Roo Code or mention @roomote and request a fix.

@roomote
Copy link
Contributor Author

roomote bot commented Feb 21, 2026

Code Review Summary - PR #10489

Previous review items (telemetry on intermediate keystrokes, missing test coverage) have been addressed. One new minor issue flagged.

  • Telemetry on intermediate values (UISettings.tsx): handleFontSizeMultiplierChange fires telemetry on every onChange (fixed: moved to blur handler)
  • Minimal test coverage (UISettings.spec.tsx): No tests for the font size input (fixed: 14 new test cases added)
  • Telemetry on unchanged blur (UISettings.tsx): handleFontSizeMultiplierBlur fires ui_settings_chat_font_size_changed on every blur even when the value hasn't changed, inflating the metric

View task on Roo Code Cloud

- Move telemetry capture from onChange to onBlur in handleFontSizeMultiplierBlur
  so intermediate keystrokes do not emit events (addresses review comment 3e180acf39)
- Add 14 new test cases covering font size input rendering, change/blur/reset
  handlers, clamping logic, NaN handling, and telemetry behavior
  (addresses review comment 4bf3aa3bb4)
Comment on lines +83 to +89
const clampedValue = Math.max(0.5, Math.min(2, numValue))
setLocalMultiplier(clampedValue.toString())

// Track telemetry event on blur to capture only the user's final value
telemetryClient.capture("ui_settings_chat_font_size_changed", {
multiplier: clampedValue,
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

handleFontSizeMultiplierBlur fires ui_settings_chat_font_size_changed telemetry on every blur with a valid number, even when the value hasn't actually changed (e.g., user clicks into the input and tabs away without editing). The event name implies a change occurred, but none did. This inflates the metric and makes it unreliable for measuring real setting changes. Adding a guard if (clampedValue !== chatFontSizeMultiplier) before the capture call would limit it to actual changes.

Suggested change
const clampedValue = Math.max(0.5, Math.min(2, numValue))
setLocalMultiplier(clampedValue.toString())
// Track telemetry event on blur to capture only the user's final value
telemetryClient.capture("ui_settings_chat_font_size_changed", {
multiplier: clampedValue,
})
const clampedValue = Math.max(0.5, Math.min(2, numValue))
setLocalMultiplier(clampedValue.toString())
// Only fire telemetry if the value actually changed
if (clampedValue !== chatFontSizeMultiplier) {
telemetryClient.capture("ui_settings_chat_font_size_changed", {
multiplier: clampedValue,
})
}

Fix it with Roo Code or mention @roomote and request a fix.

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

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Text size setting for Roo UI (Small/Medium/Large, no VS Code zoom)

3 participants